Utilities Interface
The Utilities Interface (originally called the HotSpot Menu) is a tool for developers who are using HeroBlade. It is opened by hitting F5. The interface has various tabs, as shown at right.
Contents |
Opening the Utilities Interface
- To activate the menu, hold down CTRL-SHIFT and click in the upper lefthand corner of the viewport.
- F5 will also open the Utilities Interface (on some keyboards, you may also need to have your "Function Lock" turned on for this to work)
Note that some Utilities Interface options, such as for Area Checkpoints, may require that you be in an Edit Instance in order to access them.
Modifying the Utilities Interface
The Menu is handled via the _HotSpot.xml file. However, this is a part of HeroEngine and should not be modified directly.
Instead, the way to add options is to modify a game-specific GUI Control that inherits from _hotSpotGUI (we have sample XML for such a control in the _cleanengineutilitiesinterfacetemplate.xml file). The GUI Control will need to be created by you for the first modification, and from then on, your team members can just modify the existing Control. When you first create this Control, you also need to create a new class, which you will glom onto the $HOTSPOT system node, a prototype on the client side. The new class will implement calls to its own method script, to the HeroEngine HE_buildHotSpotGUI(), but with different parameters. By calling the method with your new game-specific class, it overrides the call from the Clean Engine _HotSpotClassMethods script, and thereby extends the functionality for your own game-specific needs.
For details, see System nodes#Adding Game Specific Functionality to HeroEngine System Nodes
Example: Modifying the Utilities Interface for the first time
For example, if your game were called "Eagle", and you had created a new set of Eagle Spec Oracles that you wanted to appear on the HotSpot Menu, but you had never added anything game-specific to the Menu yet:
- In the DOM Editor, create a game-specific hotspot class, such as EagleHotSpot
- Using the HeroEngine Control Panel GUI, glom the new class onto the $HOTSPOT client system node
- Create a new GUI Control using either the GUI Editor or creating a new gui xml file using the script editor. Its generally faster to use the script editor for this particular case.
- Using the Script Editor, create a new GUI Xml file giving it a name such as EagleUtilitiesInterface then paste in the sample xml located in the _cleanengineutilitiesinterfacetemplate.xml, and modify it to replace GAMESPECIFIC with the name of your game.
- (or) Using the GUI Editor, create a new GUI Control, such as EaglehotSpotGUI, that inherits from the GUI Control _hotSpotGUI
- In your newly-created control, add the new HotSpot entries that you wish, such as "Eagle Spec Oracles"
- Save and exit the GUI Editor
- Create a client-side class method script for the EagleHotSpot class, EagleHotSpotClassMethods
- This can be copied from another script such as HJHotSpotClassMethods, or use something like the following:
method HE_buildHotSpotGUI() as NodeRef of Class GUIControl // Calling HE_buildHotSpotGUI here, overrides the HeroEngine call gui as NodeRef of Class GUIControl = createNodeFromPrototype("EaglehotSpotGUI") // Here is where you have it use your own GUI Control, instead of the HeroEngine one gui.build = true return gui . method HE_getHotSpotGUI() as NodeRef of Class GUIControl // Calling HE_buildHotSpotGUI here, overrides the HeroEngine call var gui = FindGUIControlByName($GUI._findLayerByName("hotspot"), "EaglehotSpotGUI")// Here is where you have it use your own GUI Control, instead of the HeroEngine one if gui == None gui = me._buildHotSpotGUI() // A call back is made to _HotSpot which overrides to reference the above method. . gui.visible = true SetKeyBoardFocus(gui._getTextInputBoxDelay()._GetTextInputBoxDelayTextBox()) gui._ValidateSelectableHotSpotItems() return gui .
- Once all the above is done, rebuild the HotSpot Interface, via the option on the "Commands" tab of the HotSpot Menu.
- If any script errors pop up, this is where you will need to fix them.
- Note that you must set the name of your added _collapsableCategoryItem to match that of your Spec Oracle, or you will raise an error stating that your Spec Oracle cannot be found.
- If any script errors pop up, this is where you will need to fix them.
- The Eagle Spec Oracle should now be available on the HotSpot Menu
Adding more Utilities Interface options later
Once you have done the above steps, to add further game-specific options, all you need to do is modify the hotSpotGUI that you created, via the GUI Editor.
Rebuilding the Utilities Interface Menu
If you have made changes to the XML or GUI Controls that make up the Menu, you need to "Rebuild" it for the changes to show up. This is done via an option on the Menu itself, under the "Commands" tab, Rebuild HotSpot Interface.
Reference
Sample Game-Specific Utilities Interface XML file
The following xml is from the '_cleanengineutilitiesinterface.xml file.
<createControlType inheritFrom='_hotSpotGUI' type='GAMESPECIFICUtilitiesInterface' description='GAMESPECIFIC Implementation of the Utilities Interface GUI' treePath='GAMESPECIFIC\UtilitiesInterface' name='hotspotGUI'> <set name='scrollable.clientarea._tabbedParent.clientarea.Commands.clientarea'> <_CollapsableCategory name="GAMESPECIFIC"> <set name='title'> <set name='icon' attribute='texture' value='GUI\HE_logo_128x128.dds'> <defaultStatePresentation> <size x='128' y='128'/> <color r='0' g='0.49' b='0.74' a='1'/> </defaultStatePresentation> </set> <set name='text' attribute='text' value="GAMESPECIFIC"/> </set> <set name='clientarea'> <!-- // <_CollapsableCategoryItem name='BillboardGUIHandler' glomClass='_HotSpotItem' _hotSpotItemCheckable='true' script='BillboardGUIHandler'> // <set name='text' attribute='text' value="{u}Billboard GUI Handler{/}"/> // <set name='icon' attribute='texture' value="GUI\_CleanEngineGUI.dds"> // <selectedStatePresentation> // <size x='20.0' y='20.0'/> // <position x='21.0' y='41.0'/> // <color r='0.66' g='0.66' b='0.73' a='1'/> // </selectedStatePresentation> // </set> // <set name='icon' attribute='texture' value="GUI\_CleanEngineGUI.dds"/> // </_CollapsableCategoryItem> --> </set> </_CollapsableCategory> </set> <set name='scrollable.clientarea._tabbedParent.clientarea.Tools.clientarea'> <set name='Areas.clientarea'> <_CollapsableCategory name="GAMESPECIFIC"> <set name='title'> <set name='icon' attribute='texture' value='GUI\HE_logo_128x128.dds'> <defaultStatePresentation> <size x='128' y='128'/> <color r='0' g='0.49' b='0.74' a='1'/> </defaultStatePresentation> </set> <set name='text' attribute='text' value="GAMESPECIFIC"/> </set> <set name='clientarea'> <!-- <_CollapsableCategoryItem name='AreaSeamless' glomClass='_HotSpotItem' _hotSpotItemCheckable='true' script='SeamlessCore'> <set name='text' attribute='text' value="{u}Seamless Area Links{/}"/> </_CollapsableCategoryItem> --> </set> </_CollapsableCategory> </set> <set name='SpecOracles.clientarea'> <_CollapsableCategory name="GAMESPECIFIC"> <set name='title'> <set name='icon' attribute='texture' value='GUI\HE_logo_128x128.dds'> <defaultStatePresentation> <size x='128' y='128'/> <color r='0' g='0.49' b='0.74' a='1'/> </defaultStatePresentation> </set> <set name='text' attribute='text' value="GAMESPECIFIC"/> </set> <set name='clientarea'> <_CollapsableCategory name="Cards"> <set name='title'> <set name='icon' attribute='texture' value='GUI\HE_logo_128x128.dds'> <defaultStatePresentation> <size x='128' y='128'/> <color r='0' g='0.49' b='0.74' a='1'/> </defaultStatePresentation> </set> <set name='text' attribute='text' value="Abilities"/> </set> <set name='clientarea'> <_CollapsableCategoryItem name='CardSpecOracle' glomClass='_HotSpotItem' _hotSpotItemCheckable='true' script='_SpecOracleUtilsClassMethods'> <set name='text' attribute='text' value="{u}Card Specs{/}"/> </_CollapsableCategoryItem> </set> </_CollapsableCategory> </set> </_CollapsableCategory> </set> <set name='Miscellaneous.clientarea'> <!-- <_CollapsableCategoryItem name='DemoOutfitBrowser' glomClass='_HotSpotItem' _hotSpotItemCheckable='true' script='DemoOutfitsClassMethods'> <set name='text' attribute='text' value="{u}Demo Outfits Browser{/}"/> </_CollapsableCategoryItem> --> </set> </set> <set name='scrollable.clientarea._tabbedParent.clientarea.CCS.clientarea'> <_CollapsableCategory name="GAMESPECIFIC"> <set name='title'> <set name='icon' attribute='texture' value='GUI\HE_logo_128x128.dds'> <defaultStatePresentation> <size x='128' y='128'/> <color r='0' g='0.49' b='0.74' a='1'/> </defaultStatePresentation> </set> <set name='text' attribute='text' value="GAMESPECIFIC"/> </set> <set name='clientarea'> <!-- <_CollapsableCategoryItem name='LaunchCCS' glomClass='_HotSpotItem' _hotSpotItemCheckable='true' script='CCSModularSystem'> <set name='text' attribute='text' value="{u}Launch CCS{/}"/> </_CollapsableCategoryItem> --> </set> </_CollapsableCategory> </set> <set name='scrollable.clientarea._tabbedParent.clientarea.Interface.clientarea'> <_CollapsableCategory name="GAMESPECIFIC"> <set name='title'> <set name='icon' attribute='texture' value='GUI\HE_logo_128x128.dds'> <defaultStatePresentation> <size x='128' y='128'/> <color r='0' g='0.49' b='0.74' a='1'/> </defaultStatePresentation> </set> <set name='text' attribute='text' value="GAMESPECIFIC"/> </set> <set name='clientarea'> <!-- <_CollapsableCategoryItem name='AbilityBar' glomClass='_HotSpotItem' _hotSpotItemCheckable='true' script='AbilityBarGUIClassMethods'> <set name='text' attribute='text' value="{u}Ability Bar{/}"/> <set name='icon' attribute='texture' value="GUI\_CleanEngineGUI.dds"> <selectedStatePresentation> <size x='20.0' y='20.0'/> <position x='21.0' y='41.0'/> <color r='0.66' g='0.66' b='0.73' a='1'/> </selectedStatePresentation> </set> </_CollapsableCategoryItem> --> </set> </_CollapsableCategory> </set> </createControlType>