Skin¶
- structure Skin¶
A
Skin
is a set ofStyle
settings defined for various widget types. It defines what default style will be used for each type of widget inside the GUI. Changes to the styles on a GUI:SKIN will affect the subsequently created widgets inside that GUI window. Note that some of the styles are used by subparts of widgets, such as the HORIZONTALSLIDERTHUMB, which is used by a SLIDER when oriented horizontally.If you create your own composite widgets, you can use ADD and GET to centralize setting up the style of your composite widgets.
If you wish to make a complete new Skin, the cleanest method would be to put all the graphics in a directory, along with a kOS script that given a GUI:SKIN, changes everything in that skin as needed, allowing users to run your script with their GUI:SKIN to make it use your custom skin.
Suffix
Type
Description
Style for
Box
widgets.Style for
Button
widgets.Style for the horizontal scrollbar of
ScrollBox
widgets.Style for the horizontal scrollbar left button of
ScrollBox
widgets.Style for the horizontal scrollbar right button of
ScrollBox
widgets.Style for the horizontal scrollbar thumb of
ScrollBox
widgets.Style for horizontal
Slider
widgets.Style for the thumb of horizontal
Slider
widgets.Style for the vertical scrollbar of
ScrollBox
widgets.Style for the vertical scrollbar left button of
ScrollBox
widgets.Style for the vertical scrollbar right button of
ScrollBox
widgets.Style for the vertical scrollbar thumb of
ScrollBox
widgets.Style for vertical
Slider
widgets.Style for the thumb of vertical
Slider
widgets.Style for
Label
widgets.Style for
ScrollBox
widgets.Style for
TextField
widgets.Style for
Button
widgets in toggle mode (GUI:ADDCHECKBOX and GUI:ADDRADIOBUTTON).Style for
Box
transparent widgets (GUI:ADDHLAYOUT and GUI:ADDVLAYOUT).Style for
PopupMenu
widgets.Style for the popup window of
PopupMenu
widgets.Style for the menu items of
PopupMenu
widgets.Style for tooltips overlayed on
Label
widgets.Style for
GUI
windows.The name of the font used (if STYLE:FONT does not change it for an element).
The background color of selected text (eg. TEXTFIELD).
Adds a new style.
Does the skin have the named style?
Gets a style by name (including ADDed styles).
- Skin:HORIZONTALSCROLLBAR¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar of
ScrollBox
widgets.
- Skin:HORIZONTALSCROLLBARLEFTBUTTON¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar left button of
ScrollBox
widgets.
- Skin:HORIZONTALSCROLLBARRIGHTBUTTON¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar right button of
ScrollBox
widgets.
- Skin:HORIZONTALSCROLLBARTHUMB¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar thumb of
ScrollBox
widgets.
- Skin:VERTICALSCROLLBARLEFTBUTTON¶
- Type
- Access
Get/Set
Style for the vertical scrollbar left button of
ScrollBox
widgets.
- Skin:VERTICALSCROLLBARRIGHTBUTTON¶
- Type
- Access
Get/Set
Style for the vertical scrollbar right button of
ScrollBox
widgets.
- Skin:VERTICALSCROLLBARTHUMB¶
- Type
- Access
Get/Set
Style for the vertical scrollbar thumb of
ScrollBox
widgets.
- Skin:TOGGLE¶
- Type
- Access
Get/Set
Style for
Button
widgets in toggle mode (GUI:ADDCHECKBOX and GUI:ADDRADIOBUTTON).
- Skin:FLATLAYOUT¶
- Type
- Access
Get/Set
Style for
Box
transparent widgets (GUI:ADDHLAYOUT and GUI:ADDVLAYOUT).
- Skin:FONT¶
- Type
- Access
Get/Set
The name of the font used (if STYLE:FONT does not change it for an element). If you want to see the list of available font names, you can do so with List Fonts.. Please note that just because you see a font in that list on your computer, that doesn’t always mean that same font will exist on someone else’s computer. KSP ships with a few fonts that it does universally put on all platform installs, but other fonts in that list might be installed locally on your computer only by other mods (like kOS itself, which loads all your monospaced fonts for optional use as the terminal font). Fonts that we know KSP itself tends to install are: Arial, CALIBRI, HEADINGFONT, calibri, calibrib, calibriz, calibril, and dotty
- Skin:SELECTIONCOLOR¶
- Type
- Access
Get/Set
The background color of selected text (eg. TEXTFIELD).
- Skin:ADD(name, style)¶
- Parameters
- Returns
Style
- the copy of the style that was made.
Adds a new style to the skin and names it. The skin holds a list of styles by name which you can retrieve later. Note, this makes a copy of the style you pass in, so changes you make to this new style afterward shouldn’t affect the one you passed in, and visa versa.