Changes

Jump to navigation Jump to search
Line 152: Line 152:     
== Creating UI ==
 
== Creating UI ==
You can add buttons to the bottom main HUD by calling '''AddBottomButton'''(string panel, string name, string desc, Sprite icon). If you want your own Icon you need to instantiate a Sprite with a texture that you load using ParentMod.LoadTexture or in the ModMeta's initialize method.
+
You can add buttons to the bottom main HUD by calling '''AddBottomButton'''(string panel, string name, string desc, Sprite icon). If you want your own Icon you need to instantiate a Sprite with a texture that you load using ParentMod.LoadTexture or in the ModMeta's initialize method. The game uses 32x32 icons that are completely white with a transparent background, if you want to stay consistent.
    
You can load in UIs using xml files with an html like structure using '''WindowManager.GenerateUI'''(List<XMLParser.XMLNode> nodes, GameObject parent, object callback). Example:  
 
You can load in UIs using xml files with an html like structure using '''WindowManager.GenerateUI'''(List<XMLParser.XMLNode> nodes, GameObject parent, object callback). Example:  

Navigation menu