Edit 2: Figured out how to set hotkeys for inventory items. It turns out the new UI area of the editor does not allow you to modify the gamestrings.txt and gamehotkeys.txt file. For anyone else interested, you need to use an MPQ editor and open up your <map name>.SC2Map file. Then browse to <map name>.SC2Map/enUS.SC2Data/LocalizedData and edit the GameHotkeys.txt file. Remember to exit the SC2 editor and game first so that you can edit the files.
For example, I added the following lines to GameHotkeys.txt:
The above lines specify hotkey aliases that I can now use in my custom UI files.
So now that I've saved the updated GameHotkeys.txt file, I re-open the editor, go to the UI section, find the button that I want to add the hotkey for (in this example I had first created an override file to change the UI layout of inventory container buttons), and add the appropriate <Shortcut> tag line:
Just like I said that in #18. You need to override the game UI. And insert a <Shortcut> line. I never said the ingame hotkey menu would work.
You can search for UI override in this site. I sure there already many tutorials about this.
Those tutorials are all very confusing given the updates to the override system over time.
Are you still required to use the old ovveride system?
As in, create a .SC2Layout file, link it via UI Game Data. Or can you go into the UI editor and 'Add a Layout'?
Yea, you can use the UI editor's 'Add a Layout' feature, it would automaticly create a new .SC2Layout file into your map.
And you doesn't need to link it via data editor's Game UI sheet. UI editor would do it for you too.
@Renee2islga: Go
Edit 2: Figured out how to set hotkeys for inventory items. It turns out the new UI area of the editor does not allow you to modify the gamestrings.txt and gamehotkeys.txt file. For anyone else interested, you need to use an MPQ editor and open up your <map name>.SC2Map file. Then browse to <map name>.SC2Map/enUS.SC2Data/LocalizedData and edit the GameHotkeys.txt file. Remember to exit the SC2 editor and game first so that you can edit the files.
For example, I added the following lines to GameHotkeys.txt:
UI/Hotkey/C00B01=1
UI/Hotkey/C00B02=2
UI/Hotkey/C00B03=3
UI/Hotkey/C00B04=4
UI/Hotkey/C00B05=5
UI/Hotkey/C00B06=6
UI/Hotkey/C00B07=7
UI/Hotkey/C00B08=8
UI/Hotkey/C00B09=9
The above lines specify hotkey aliases that I can now use in my custom UI files.
So now that I've saved the updated GameHotkeys.txt file, I re-open the editor, go to the UI section, find the button that I want to add the hotkey for (in this example I had first created an override file to change the UI layout of inventory container buttons), and add the appropriate <Shortcut> tag line:
<Frame type="CommandButton" name="Slot01">
<Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
<Shortcut val="@UI/Hotkey/C00B01"/>
<Width val="120"/>
<Height val="120"/>
</Frame>
This sets the first inventory slot to have '1' as its hotkey (as specified in the GameHotkeys.txt file)