Utilities Interface

From HEWIKI
(Redirected from Hot Spot Menu)
Jump to: navigation, search
The Utilities Interface, aka the HotSpot Menu

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

HeroBladeOpenHotspot.png

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:

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
.

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.

Screenshot of the Commands tab of the Utilities Interface, pointing out how to rebuild the menu in the case of an update. Note that it uses an older name, "HotSpot Interface", but it is the same thing as the Utilities 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>

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox