Changes

Jump to navigation Jump to search
Line 151: Line 151:  
== Creating UI ==
 
== Creating UI ==
 
=== Button in the main HUD ===
 
=== Button in the main HUD ===
You can add buttons to the bottom main HUD by calling '''HUD.Instance.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'''(ModController.DLLMod parentMod) method. The game uses 32x32 icons that are completely white with a transparent background, if you want to stay consistent.
+
You can add buttons to the bottom main HUD by calling '''HUD.Instance.AddBottomButton'''(string panel, string name, string desc, Sprite icon). You can use one of the built-in icons by calling '''ObjectDatabase.Instance.GetIcon'''(name) and use the console command '''SHOW_ICONS''' to see all the built-in icons, or 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'''(ModController.DLLMod parentMod) method. The game uses 32x32 icons that are completely white with a transparent background, if you want to stay consistent.
    
=== HTML-like UI ===
 
=== HTML-like UI ===

Navigation menu