I'm having an issue with the inventory container not expanding to fill the border around it to the individual item slots. I've tried manually changing the container size via triggers and hook up dialogs but changing that size doesn't effect it at all. Anyone know why the dialog border isn't expanding?
Here is the hookup trigger where I'm changing the button sizes for each slot and trying to change the size of the dialog.
Actions Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot00" Dialog - Set (Last created dialog item) size to (60, 60) for (All players) Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot01" Dialog - Set (Last created dialog item) size to (60, 60) for (All players) Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot02" Dialog - Set (Last created dialog item) size to (60, 60) for (All players) Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot08" Dialog - Set (Last created dialog item) size to (60, 60) for (All players) Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot09" Dialog - Set (Last created dialog item) size to (60, 60) for (All players) Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot10" Dialog - Set (Last created dialog item) size to (60, 60) for (All players) Dialog - Hooks up an existing Panel in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00" Dialog - Set (Last created dialog item) size to (200, 200) for (All players)
I believe the InventoryContainer frames (ContainerPanel00, ContainerPanel01, etc) are hardcoded to scale with Top Left and Bottom Right inventory slots (00 and 10) at map initialization, and thus before your triggers are run.
InventoryContainer dimensions can be manipulate by changing the size of these two slots in a new layout file (and possibly their offsets? I don't quite remember)
It's been a while since I set this up so I'm quite rusty, but I set up a custom inventory layout for a map I'm working on; custom layout file is what greythepirate mentioned. I've attached the custom layout file I am using - feel free to modify and use.
You can do a lot of modifying with the custom layout file, it just takes a lot of playing around to figure out what you need. I found the settings I used from an enumeration of available functions on SC2mapster, but I don't know where that link is anymore :/
To use a custom layout, import via the import manager. Make sure the import path is "Base.SC2Data\CustomUI\". Save the map. Then go to the "Game UI Data" tab of the data editor and make sure the view is set to "Detail View". Click on the "UI" tab and scroll down to "Custom Layout Files". Add the newly imported file - you should be good.
If I recall correctly, you can only have one custom layout file at any given time, so if you want to change more, make the appropriate modifications to that one layout file. Lastly, when you make modifications to the layout file, just import it again (same path); no need to go through the process of selecting it in the Data editor every time.
EDIT: Doh, I forgot to mention that the style being set in the attached layout file is a custom font - just make your own and put the name there, or remove all together to use default font.
Thank you for the reply! However when I attempt to download the Inventory_Layout.SC2Layout file is gives a 404 error? Problem with the new sc2mapster site or...??
Doh, my apologies, I forgot to check that the file uploaded properly. Yes, lots of people have had problems with uploading files on the new site, and I've even seen some people report problems with threads disappearing.
Erm, I don't have a dropbox or anything...soooo, sorry, but here's the plaintext (see spoiler below). Just open up notepad or whatever other plain-text editor you prefer, copy paste this into it, and save as [filename].SC2Layout
Remember to modify/remove the 'Style val="" ' tags, or create a font style named "InventoryLabels" using the Text(F8) editor with SC2 editor.
<!-- Set position of the inventory button --> <Anchor side="Right" relative="$parent" pos="Mid" offset="727"/>
<!-- Set position of the inventory container --> <Frame type="Frame" name="ContainerSizeFrame"> <Anchor side="Bottom" relative="$parent/Button00" pos="Min" offset="100"/> </Frame>
<!-- Close Button - Set Position --> <!-- NOTE! Somehow, the close button is broken... Oh well... --> <Frame type="Button" name="Close"> <Visible val="false"/> </Frame>
I'm having an issue with the inventory container not expanding to fill the border around it to the individual item slots. I've tried manually changing the container size via triggers and hook up dialogs but changing that size doesn't effect it at all. Anyone know why the dialog border isn't expanding?
Here is the hookup trigger where I'm changing the button sizes for each slot and trying to change the size of the dialog.
Actions
Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot00"
Dialog - Set (Last created dialog item) size to (60, 60) for (All players)
Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot01"
Dialog - Set (Last created dialog item) size to (60, 60) for (All players)
Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot02"
Dialog - Set (Last created dialog item) size to (60, 60) for (All players)
Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot08"
Dialog - Set (Last created dialog item) size to (60, 60) for (All players)
Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot09"
Dialog - Set (Last created dialog item) size to (60, 60) for (All players)
Dialog - Hooks up an existing Button in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00/Slot10"
Dialog - Set (Last created dialog item) size to (60, 60) for (All players)
Dialog - Hooks up an existing Panel in the standard UI called "UIContainer/ConsoleUIContainer/InventoryPanel/ContainerPanel00"
Dialog - Set (Last created dialog item) size to (200, 200) for (All players)
Inventory UI is special and weird.
I believe the InventoryContainer frames (ContainerPanel00, ContainerPanel01, etc) are hardcoded to scale with Top Left and Bottom Right inventory slots (00 and 10) at map initialization, and thus before your triggers are run.
InventoryContainer dimensions can be manipulate by changing the size of these two slots in a new layout file (and possibly their offsets? I don't quite remember)
@PirateArcade | I make games | Ask me things on Discord
It's been a while since I set this up so I'm quite rusty, but I set up a custom inventory layout for a map I'm working on; custom layout file is what greythepirate mentioned. I've attached the custom layout file I am using - feel free to modify and use.
You can do a lot of modifying with the custom layout file, it just takes a lot of playing around to figure out what you need. I found the settings I used from an enumeration of available functions on SC2mapster, but I don't know where that link is anymore :/
To use a custom layout, import via the import manager. Make sure the import path is "Base.SC2Data\CustomUI\". Save the map. Then go to the "Game UI Data" tab of the data editor and make sure the view is set to "Detail View". Click on the "UI" tab and scroll down to "Custom Layout Files". Add the newly imported file - you should be good.
If I recall correctly, you can only have one custom layout file at any given time, so if you want to change more, make the appropriate modifications to that one layout file. Lastly, when you make modifications to the layout file, just import it again (same path); no need to go through the process of selecting it in the Data editor every time.
EDIT: Doh, I forgot to mention that the style being set in the attached layout file is a custom font - just make your own and put the name there, or remove all together to use default font.
Thank you for the reply! However when I attempt to download the Inventory_Layout.SC2Layout file is gives a 404 error? Problem with the new sc2mapster site or...??
Doh, my apologies, I forgot to check that the file uploaded properly. Yes, lots of people have had problems with uploading files on the new site, and I've even seen some people report problems with threads disappearing.
Erm, I don't have a dropbox or anything...soooo, sorry, but here's the plaintext (see spoiler below). Just open up notepad or whatever other plain-text editor you prefer, copy paste this into it, and save as [filename].SC2Layout
Remember to modify/remove the 'Style val="" ' tags, or create a font style named "InventoryLabels" using the Text(F8) editor with SC2 editor.
<Desc>
<Frame type="InventoryPanel" name="GameUI/UIContainer/ConsoleUIContainer/InventoryPanel" file="GameUI">
<Frame type="InventoryContainer" name="InventoryButtons">
<!-- Set position of the inventory button -->
<Anchor side="Right" relative="$parent" pos="Mid" offset="727"/>
<!-- Set position of the inventory container -->
<Frame type="Frame" name="ContainerSizeFrame">
<Anchor side="Bottom" relative="$parent/Button00" pos="Min" offset="100"/>
</Frame>
</Frame>
<Frame type="InventoryContainer" name="ContainerPanel00">
<!-- New Label - Offensive -->
<Frame type="Label" name="Offensive">
<Text val="Offensive"/>
<Style val="InventoryLabels"/>
<Anchor side="Top" relative="$parent" pos="Min" offset="-25"/>
<Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
<RenderPriority val="555"/>
</Frame>
<!-- New Label - Defensive -->
<Frame type="Label" name="Defensive">
<Text val="Defensive"/>
<Style val="InventoryLabels"/>
<Anchor side="Top" relative="$parent" pos="Min" offset="48"/>
<Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
<RenderPriority val="555"/>
</Frame>
<!-- New Label - Storage -->
<Frame type="Label" name="Storage">
<Text val="Storage"/>
<Style val="InventoryLabels"/>
<Anchor side="Top" relative="$parent" pos="Min" offset="120"/>
<Anchor side="Left" relative="$parent" pos="Min" offset="10"/>
<RenderPriority val="555"/>
</Frame>
<!-- Background Image - Set Size & Position -->
<Frame type="Image" name="BackgroundImage">
<Anchor side="Top" relative="$parent" pos="Min" offset="-50"/>
<Anchor side="Bottom" relative="$parent" pos="Min" offset="200"/>
<Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
<Anchor side="Right" relative="$parent" pos="Min" offset="400"/>
</Frame>
<!-- Close Button - Set Position -->
<!-- NOTE! Somehow, the close button is broken... Oh well... -->
<Frame type="Button" name="Close">
<Visible val="false"/>
</Frame>
<!-- Inventory Label - Set Position -->
<Frame type="Label" name="Name">
<Anchor side="Top" relative="$parent" pos="Min" offset="-45"/>
<Anchor side="Left" relative="$parent" pos="Mid" offset="-65"/>
</Frame>
<!-- Inventory Button (Top Left button, same as open-inventory button) - Hide -->
<Frame type="CommandButton" name="Button">
<Visible val="false"/>
</Frame>
<!-- Inventory Item Slots - Set Positions & Size -->
<!-- Offensive -->
<Frame type="CommandButton" name="Slot00">
<Anchor side="Top" relative="$parent" pos="Min" offset="-3"/>
<Anchor side="Left" relative="$parent" pos="Mid" offset="-190"/>
</Frame>
<!-- Defensive -->
<Frame type="CommandButton" name="Slot08">
<Anchor side="Top" relative="$parent" pos="Min" offset="70"/>
<Anchor side="Left" relative="$parent" pos="Mid" offset="-190"/>
</Frame>
<!-- Storage -->
<Frame type="CommandButton" name="Slot16">
<Anchor side="Top" relative="$parent" pos="Min" offset="143"/>
<Anchor side="Left" relative="$parent" pos="Mid" offset="-190"/>
</Frame>
</Frame>
</Frame>
</Desc>