Skip to content

Instantly share code, notes, and snippets.

@Tonetfal
Last active August 13, 2021 09:25
Show Gist options
  • Save Tonetfal/06c7b7dc0401729c2574a04442b19225 to your computer and use it in GitHub Desktop.
Save Tonetfal/06c7b7dc0401729c2574a04442b19225 to your computer and use it in GitHub Desktop.
JKPS-Config-explanation

Main info

The program: JKPS

My Discord: Jeki the Monkey from München#3932

How to write parameters in the config in a correct way

To make the program read the written value correctly you have to put a space between colon and the rest of the data.

If the data are some numbers, keys or buttons, they must be separated with a comma without any extra space between.

If it is a path to a texture or font, it must be written without any quotes, and must include the extension, such as png, jpg, ttf etc.

If anything will be done wrong, default value will be set, and "JKPSErrorLog.txt" will be generated, and will contain the error message.

Notes

Everything below is shown by modifying the v0.10-alpha default config

Keys and buttons

You can check the list of available keys and buttons here.

If you don't want to add keys or buttons just write "No" as the value.

Statistics text

Statistics text distance

The parameter means the distance between statistic lines.

Available values: -500 - 500

The shown values are 0 and 10

Statistics text position

Available values: -1000 - 1000

The shown values are 10,0 and -95,0

Statistics value text position

The shown values are 0,0 and 35,-10

Statistics text font

The parameter takes the name of the font with the extension. Read How to write parameters in a correct way to understand better.

Statistics text color

Read Colors explanation to understand better.

The shown values are 255,255,255 and 0,128,255

Statistics text character size

Available values: 0 - 500

The shown values are 5 and 20

Statistics text bold

The parameter takes boolean values. Write True to make statistics text bold, else write False.

The shown values are True and False

Statistics text italic

The parameter takes boolean values. Write True to make statistics text italic, else write False.

The shown values are True and False

Show statistics text

The parameter takes boolean values.

Show KPS

The parameter takes boolean values. It hides the "KPS" line.

The shown value is False

Show total

The parameter takes boolean values. It hides the "Total" line.

The shown value is False

Show BPM

The parameter takes boolean values. It hides the "BPM" line.

The shown value is False

Buttons text

Buttons text font

The parameter takes the name of the font with the extension. Read How to write parameters in a correct way to understand better.

Buttons text color

Read Colors explanation to understand better.

The shown values are 0,128,255 and 255,128,255

Buttons text character size

Available values: 0 - 500

The shown values are 10 and 30

Buttons text position

The parameter means the distance in pixels from the origin.

Available values: -500 - 500

The shown value are -5,0 and 20,0

Buttons text bounds

The parameter means the bounds in pixels from the edges for buttons text. The text cannot go beyond them.

Violet square is displayed when the parameter is selected.

Available values: -500 - 500

The shown value is 8,8 and 23,8

Buttons text bold

The parameter takes boolean values. Write True to make statistics text bold, else write False.

The shown value is True

Buttons text italic

The parameter takes boolean values. Write True to make statistics text italic, else write False.

Show visual keys

The parameter takes boolean values. If it is set to True, visual keys (the written ones when you change the key) will be displayed.

Show key counters

The parameter takes boolean values. If it is set to True, then key counters will be visible.

Show key KPS

The parameter takes boolean values. If it is set to True, then KPS for a key will be displayed. So if you sum up every key KPS, then you will get the KPS displayed in the statistics.

Show key BPM

The parameter takes boolean values. If it is set to True, then BPM for a key will be displayed. So if you sum up every key BPM, then you will get the BPM displayed in the statistics.

Button graphics

Button distance

The parameter means the distance in pixels between buttons.

Available values: -500 - 500

The shown values are -15 and 10

Button texture

The parameter takes the name of the texture with the extension. Read How to write parameters in a correct way to understand better.

Button texture size

The parameter means width and height of the button texture. If size of the button texture is different from the written one, it will be scaled to the written one.

Available values: -500 - 500

The shown values are 100,30 and 40,100

Button texture color

Read Colors explanation to understand better.

The shown values are 0,128,255 and 255,128,255

Animation graphics

Light animation

The parameter takes boolean values. If it is set to true, then the animation sprite will become non transparent and the button will change its size by the set Animation scale on click on click.

Press animation

The parameter takes boolean values. If it is set to true, then the graphical button will move by the set Animation offset on click.

Animation texture

The parameter takes the name of the texture with the extension. Read How to write parameters in a correct way to understand better.

Animation frames (Light animation)

The parameter means the amount of frames for the animation. The program works in 60 frames, so 60 frames last 1 second.

Available values: 1 - 120

The shown values are 1 and 120.

Animation scale on click (Light animation)

The parameter is used to represent the relationship between a measurement on a model and the corresponding measurement on the actual object in a percentage.

Available values: 0 - 200

The shown values are 50 and 200. The key is held.

Animation color (Light animation)

Read Colors explanation to understand better.

The shown values are 0,128,255 and 255,128,255

Animation offset (Press animation)

The parameter means the distance from the origin on button press.

Available values: -100 - 100

The shown values are 2 and 10. The key is held.

Main window

Background texture

The parameter takes the name of the texture with the extension. Read How to write parameters in a correct way to understand better.

Background color

Read Colors explanation to understand better.

Note: the default theme background is not monocolor, it is a gradient, so if you want to have only one color, you have to provide a white image as the texture.

The shown values are 0,128,255 and 0,177,64

Scale background texture if it does not fit

The parameter takes boolean values.

The shown values are True and False. The window is made bigger and the texture is changed in order to show the difference.

Window title bar

The parameter takes boolean values. If it is set to True, then window of the program will have title bar, else, it will not.

The shown values are True and False

Window bonus size top, Window bonus size bottom, Window bonus size left, Window bonus size right

These parameters mean bonus space on top/bottom/left/right in pixels.

Available values: 0 - 500

The presentation is made only on Window bonus size top, and shown values are 0 and 30

Extra KPS window

Enable from start

The parameter uses boolean values. If it is True, then when you open JKPS, then main and KPS windows will appear, else, if it is False, then only main window will appear on start.

Window size

The parameter means width and height of the window.

Available values: 0 - 1000

Text size

The parameter means the size of the KPS abbreviation on the top.

Available values: 0 - 500

Number size

The parameter means the size of the actual number of KPS.

Available values: 0 - 500

KPS Background color

Read Colors explanation to understand better.

The shown values are 0,128,255 and 0,177,64

KPS text color

Read Colors explanation to understand better.

The shown values are 0,128,255 and 255,128,255

KPS text color

Read Colors explanation to understand better.

The shown values are 0,128,255 and 255,128,255

KPS window text font

The parameter takes the name of the font with the extension. You should provide a monospace font in order to make text do not move on different values. Read How to write parameters in a correct way to understand better.

KPS window number font

The parameter takes the name of the font with the extension. You should provide a monospace font in order to make text do not move on different values. Read How to write parameters in a correct way to understand better.

KPS top padding

The parameter takes the distance in pixels.

Available values: 0 - 500

The shown values are 100 and 0

KPS extra window distance between text

The parameter takes the distance in pixels.

Available values: 0 - 500

The shown values are 0 and 100

Other

Update statistics on quit

The parameter takes boolean value. If it is set to True, then key counters, total and KPS will be the same after your reload the program. If it is set to False, then key counters, total and KPS will remain the same as they were after the start up.

Value to multiply on click

The parameter is needed to test new themes in a quick way. For example, if set vertical bounds work well, or if 6 digit numbers on Total counter do not go beyond the window.

Colors explanation

The color parameters use the RGB system, so you need to specify 3 or 4 channels. The first is the red channel, the second is the green channel, the third is the blue channel, and the last is the alpha channel, also known as transparency. If the alpha channel is not specified, then it will be 255 (visible).

Available values: 0 - 255 for each value

How to calculate window size

Width = (Texture size width + Button distance) * Buttons amount - Button distance + Window bonus size left + Window bonus size right

Height = Texture size height * Buttons amount + Window bonus size left + Window bonus size right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment