TYPE | USAGE | EXAMPLE |
Colour | kmapi.addToTable( "colour", String name, Table colours ) | kmapi.addToTable( "colour", "Space Oddosy", SO ) |
Language | kmapi.addToTable( "language", String name, Int ModID ; | kmapi.addToTable( "language", "Space Oddosy", ModID ) |
Buttons | kmapi.addToTable( "buttons", String name, Table buttons ) | kmapi.addToTable( "buttons", "Space Oddosy", space_oddosy_buttons ) |
String Name is the name which appears in the listbox on the options menu pannel.
Table colours and Table buttons are both tables that contain the data needed to display the correct colour scheme or buttons for your modification.
ModID is the id of your mod, gathered by using: kmapi.getNextFreeId()
An example for both could be:
space_oddosy_buttons = {
modpath ..identifyer ..button.lyricalbasic,
modpath ..identifyer ..button.lyricalhover,
modpath ..identifyer ..button.compactbasic,
modpath ..identifyer ..button.compacthover,
modpath ..identifyer ..button.musicbasic,
modpath ..identifyer ..button.musichover,
modpath ..identifyer ..button.playbasic,
modpath ..identifyer ..button.playhover,
modpath ..identifyer ..button.playstartbasic,
modpath ..identifyer ..button.playstarthover,
modpath ..identifyer ..button.playsyncbasic,
modpath ..identifyer ..button.playsynchover
}
As long as you supply a unique identifyer variable, this code should work for any modification.
SO = { 0.1, 0.2, 0.3, - RGB for: Notebox
0.4, 0.5, 0.6, - RGB for: All other Controls
0.7, 0.8, 0.9 }; - RGB for: Buttons
There are some other calls, however these have been made simpler by using other calls. an example of this is "package". This adds a button to the package list, however there are other parts necessary, so I made a seperate function for you to use.