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 BOXStyleStyle for Boxwidgets.BUTTONStyleStyle for Buttonwidgets.HORIZONTALSCROLLBARStyleStyle for the horizontal scrollbar of ScrollBoxwidgets.HORIZONTALSCROLLBARLEFTBUTTONStyleStyle for the horizontal scrollbar left button of ScrollBoxwidgets.HORIZONTALSCROLLBARRIGHTBUTTONStyleStyle for the horizontal scrollbar right button of ScrollBoxwidgets.HORIZONTALSCROLLBARTHUMBStyleStyle for the horizontal scrollbar thumb of ScrollBoxwidgets.HORIZONTALSLIDERStyleStyle for horizontal Sliderwidgets.HORIZONTALSLIDERTHUMBStyleStyle for the thumb of horizontal Sliderwidgets.VERTICALSCROLLBARStyleStyle for the vertical scrollbar of ScrollBoxwidgets.VERTICALSCROLLBARLEFTBUTTONStyleStyle for the vertical scrollbar left button of ScrollBoxwidgets.VERTICALSCROLLBARRIGHTBUTTONStyleStyle for the vertical scrollbar right button of ScrollBoxwidgets.VERTICALSCROLLBARTHUMBStyleStyle for the vertical scrollbar thumb of ScrollBoxwidgets.VERTICALSLIDERStyleStyle for vertical Sliderwidgets.VERTICALSLIDERTHUMBStyleStyle for the thumb of vertical Sliderwidgets.LABELStyleStyle for Labelwidgets.SCROLLVIEWStyleStyle for ScrollBoxwidgets.TEXTFIELDStyleStyle for TextFieldwidgets.TOGGLEStyleStyle for Buttonwidgets in toggle mode (GUI:ADDCHECKBOX and GUI:ADDRADIOBUTTON).FLATLAYOUTStyleStyle for Boxtransparent widgets (GUI:ADDHLAYOUT and GUI:ADDVLAYOUT).POPUPMENUStyleStyle for PopupMenuwidgets.POPUPWINDOWStyleStyle for the popup window of PopupMenuwidgets.POPUPMENUITEMStyleStyle for the menu items of PopupMenuwidgets.LABELTIPOVERLAYStyleStyle for tooltips overlayed on Labelwidgets.WINDOWStyleStyle for GUIwindows.FONTstringThe name of the font used (if STYLE:FONT does not change it for an element). SELECTIONCOLORColor The background color of selected text (eg. TEXTFIELD). ADD(name, style)StyleAdds a new style. HAS(name)BooleanDoes the skin have the named style? GET(name)StyleGets a style by name (including ADDed styles). -
Skin:
HORIZONTALSCROLLBAR¶ Type: StyleAccess: Get/Set Style for the horizontal scrollbar of
ScrollBoxwidgets.
-
Skin:
HORIZONTALSCROLLBARLEFTBUTTON¶ Type: StyleAccess: Get/Set Style for the horizontal scrollbar left button of
ScrollBoxwidgets.
-
Skin:
HORIZONTALSCROLLBARRIGHTBUTTON¶ Type: StyleAccess: Get/Set Style for the horizontal scrollbar right button of
ScrollBoxwidgets.
-
Skin:
HORIZONTALSCROLLBARTHUMB¶ Type: StyleAccess: Get/Set Style for the horizontal scrollbar thumb of
ScrollBoxwidgets.
-
Skin:
HORIZONTALSLIDERTHUMB¶ Type: StyleAccess: Get/Set Style for the thumb of horizontal
Sliderwidgets.
-
Skin:
VERTICALSCROLLBAR¶ Type: StyleAccess: Get/Set Style for the vertical scrollbar of
ScrollBoxwidgets.
-
Skin:
VERTICALSCROLLBARLEFTBUTTON¶ Type: StyleAccess: Get/Set Style for the vertical scrollbar left button of
ScrollBoxwidgets.
-
Skin:
VERTICALSCROLLBARRIGHTBUTTON¶ Type: StyleAccess: Get/Set Style for the vertical scrollbar right button of
ScrollBoxwidgets.
-
Skin:
VERTICALSCROLLBARTHUMB¶ Type: StyleAccess: Get/Set Style for the vertical scrollbar thumb of
ScrollBoxwidgets.
-
Skin:
TOGGLE¶ Type: StyleAccess: Get/Set Style for
Buttonwidgets in toggle mode (GUI:ADDCHECKBOX and GUI:ADDRADIOBUTTON).
-
Skin:
FLATLAYOUT¶ Type: StyleAccess: Get/Set Style for
Boxtransparent widgets (GUI:ADDHLAYOUT and GUI:ADDVLAYOUT).
-
Skin:
FONT¶ Type: stringAccess: Get/Set The name of the font used (if STYLE:FONT does not change it for an element).
-
Skin:
SELECTIONCOLOR¶ Type: Color 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.
-
Skin: