= styles :author: :revnumber: :revdate: 2016/03/17 20:48 :relfileprefix: ../../../ :imagesdir: ../../.. ifdef::env-github,env-browser[:outfilesuffix: .adoc] == Creating a new Theme === Understanding Styles The Style class is set up to be as open ended as possible for creating custom controls. Each property of a style can be one of the following data type: * String * float * int * boolean * ColorRGBA * Vector2f * Vector3f * Vector4f * Effect * Object To retrieve a tag from a style you must use the get method for the data type you trying to retrieve like so: [source,java] ---- screen.getStyle(“StyleName”).getColorRGBA(“TagNameInStyle”); ---- These can be used as flags for configuring you control, or style specific info for default Look & Feel Lets look at the Button.xml file as an example: [source,htmlblock] ---- ---- The Style XML file for any given control can contain as many element tags as you would like. Each becomes another style that can be retrieved via: [source,java] ---- screen.getStyle("styleName"); ---- Each element tag is divided into 4 sections: * fonts * attributes * images * effects The first 3 are interchangeable and only there for organizational purposes. The 4th (effects) is more specific, as the effects are stored and retrieved via the EffectManage of the Screen. The tags for storing properties are fomatted as follows: * If the data type has a single value, the value is stored in the single property tag: [source,htmlblock] ---- ---- * If the data type has multiple value, the property tag would contain inner tags named after the value, like such: [source,htmlblock] ---- ---- Using Effects can be found HERE. === style_map.xml The style_map.xml file consists of a list of all other XML documents that contain style information for controls. All other XMLdocs could very well could be a single XML document containing all styles, however, for organization purposes, I read in as many from this list as you would like to add. Each entry in the style_map.xml file are formatted as follows: [source,htmlblock] ----