Skin¶
- structure Skin¶
A
Skinis a set ofStylesettings 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
Boxwidgets.Style for
Buttonwidgets.Style for the horizontal scrollbar of
ScrollBoxwidgets.Style for the horizontal scrollbar left button of
ScrollBoxwidgets.Style for the horizontal scrollbar right button of
ScrollBoxwidgets.Style for the horizontal scrollbar thumb of
ScrollBoxwidgets.Style for horizontal
Sliderwidgets.Style for the thumb of horizontal
Sliderwidgets.Style for the vertical scrollbar of
ScrollBoxwidgets.Style for the vertical scrollbar left button of
ScrollBoxwidgets.Style for the vertical scrollbar right button of
ScrollBoxwidgets.Style for the vertical scrollbar thumb of
ScrollBoxwidgets.Style for vertical
Sliderwidgets.Style for the thumb of vertical
Sliderwidgets.Style for
Labelwidgets.Style for
ScrollBoxwidgets.Style for
TextFieldwidgets.Style for
Buttonwidgets in toggle mode (GUI:ADDCHECKBOX and GUI:ADDRADIOBUTTON).Style for
Boxtransparent widgets (GUI:ADDHLAYOUT and GUI:ADDVLAYOUT).Style for
PopupMenuwidgets.Style for the popup window of
PopupMenuwidgets.Style for the menu items of
PopupMenuwidgets.Style for tooltips overlayed on
Labelwidgets.Style for
GUIwindows.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
ScrollBoxwidgets.
- Skin:HORIZONTALSCROLLBARLEFTBUTTON¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar left button of
ScrollBoxwidgets.
- Skin:HORIZONTALSCROLLBARRIGHTBUTTON¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar right button of
ScrollBoxwidgets.
- Skin:HORIZONTALSCROLLBARTHUMB¶
- Type
- Access
Get/Set
Style for the horizontal scrollbar thumb of
ScrollBoxwidgets.
- Skin:VERTICALSCROLLBARLEFTBUTTON¶
- Type
- Access
Get/Set
Style for the vertical scrollbar left button of
ScrollBoxwidgets.
- Skin:VERTICALSCROLLBARRIGHTBUTTON¶
- Type
- Access
Get/Set
Style for the vertical scrollbar right button of
ScrollBoxwidgets.
- Skin:VERTICALSCROLLBARTHUMB¶
- Type
- Access
Get/Set
Style for the vertical scrollbar thumb of
ScrollBoxwidgets.
- Skin:TOGGLE¶
- Type
- Access
Get/Set
Style for
Buttonwidgets in toggle mode (GUI:ADDCHECKBOX and GUI:ADDRADIOBUTTON).
- Skin:FLATLAYOUT¶
- Type
- Access
Get/Set
Style for
Boxtransparent 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.