I know that for people who have experience working with the UI this is probably going to seem like a stupid question, but it's baffling me. I've looked over tutorials and stuff, but I'm still not sure what I've screwed up and how.
I've got a map where I'm using all four custom resources and want them displayed for the players: Minerals, Vespene, Terrazine and Custom (the last two have, of course, been renamed). I was able to accomplish this easily, but having all four of them visible has pushed Minerals so far to the left that it's hidden behind the "Help" button, and it's difficult to see how much you have.
I figured that I could just remove the "Help" button, since the glossary in it gets messed-up easily and right now it's totally out-of-whack. After some investigation I figured out that the MenuBar layout was the one I needed to modify, so I copy-pasted the text of that into a new layout file, which I named MenuBarOverride. The Help button was right at the very bottom and nothing else was dependent on it, so I figured I could remove it easily and just have my file override the normal one. The end result looked like this:
I went into the Default UI Settings file in the Data Editor, pointed the Custom Layout Files field to MenuBarOverride, and went to test the map to see if it worked. The Help button was still there, and the game gave me the following error message:
"UI: File[MenuBarOverride.SC2Layout] Line [2] Column [1]. Attempting to add a desc named [MenuBarOverride] to [] with the same name as an already existing child."
I have no idea what that means, or how to fix it. :(
At first I thought I didn't need all that extra stuff up top, about the button format, so I tried trimming it down to this:
2. MenuBar doesn't reapply its template after creation. Only dynamically created things seem to do that. The buttons are where the template was applied to... in your case in "GameUI/UIContainer/FullscreenUpperContainer/MenuBar"
3. Names need to include the whole path of the existing file. You need to specify the modified layout file, too: "GameUI".
I hope it became some more clear to you. It's not easy and I would advise you to relook at Helral's tutorial with aiur chef's overriding method (which can be or maybe must be applied in the UI editor).
2. MenuBar doesn't reapply its template after creation. Only dynamically created things seem to do that. The buttons are where the template was applied to... in your case in "GameUI/UIContainer/FullscreenUpperContainer/MenuBar"
So I do not, in fact, need everything above <Frame type="MenuBar" name="MenuBarTemplate">, as I guessed?
Quote:
3. Names need to include the whole path of the existing file. You need to specify the modified layout file, too: "GameUI".
I hope it became some more clear to you. It's not easy and I would advise you to relook at Helral's tutorial with aiur chef's overriding method (which can be or maybe must be applied in the UI editor).
Ahh, this looks like the critical part.
I think I've trimmed it down to what I need... how's this?
Also when applying changes using layout files, you only need to mention the changes that you want to apply in the file, you do not have to repeat the default values that it already has.
Please help me, I want to put the little Hero Icon that's usually in the bottom right corner to the top left corner.
I know I probably screwed up something but nothing happens... I made the code after I followed the tutorial, according to tutorial with this code the Hero icons should be in the middle of the screen. Please help :(
Where it says "Top" was "Bottom" and where it says "Left" there was "right" before. I changed it to this, hoping it would move the hero icon in the opposite direction but nothing happened...
I know that for people who have experience working with the UI this is probably going to seem like a stupid question, but it's baffling me. I've looked over tutorials and stuff, but I'm still not sure what I've screwed up and how.
I've got a map where I'm using all four custom resources and want them displayed for the players: Minerals, Vespene, Terrazine and Custom (the last two have, of course, been renamed). I was able to accomplish this easily, but having all four of them visible has pushed Minerals so far to the left that it's hidden behind the "Help" button, and it's difficult to see how much you have.
I figured that I could just remove the "Help" button, since the glossary in it gets messed-up easily and right now it's totally out-of-whack. After some investigation I figured out that the MenuBar layout was the one I needed to modify, so I copy-pasted the text of that into a new layout file, which I named MenuBarOverride. The Help button was right at the very bottom and nothing else was dependent on it, so I figured I could remove it easily and just have my file override the normal one. The end result looked like this:
I went into the Default UI Settings file in the Data Editor, pointed the Custom Layout Files field to MenuBarOverride, and went to test the map to see if it worked. The Help button was still there, and the game gave me the following error message:
"UI: File[MenuBarOverride.SC2Layout] Line [2] Column [1]. Attempting to add a desc named [MenuBarOverride] to [] with the same name as an already existing child."
I have no idea what that means, or how to fix it. :(
At first I thought I didn't need all that extra stuff up top, about the button format, so I tried trimming it down to this:
But it just gives me the same error message.
I'm certain that it's something simple and stupid, but I just don't get it. :(
1. You're doing it wrong.
2. MenuBar doesn't reapply its template after creation. Only dynamically created things seem to do that. The buttons are where the template was applied to... in your case in "GameUI/UIContainer/FullscreenUpperContainer/MenuBar"
3. Names need to include the whole path of the existing file. You need to specify the modified layout file, too: "GameUI".
Example for changing the size of the buttons.
I hope it became some more clear to you. It's not easy and I would advise you to relook at Helral's tutorial with aiur chef's overriding method (which can be or maybe must be applied in the UI editor).
I figured. :P
So I do not, in fact, need everything above <Frame type="MenuBar" name="MenuBarTemplate">, as I guessed?
Ahh, this looks like the critical part.
I think I've trimmed it down to what I need... how's this?
Removing the help button does not require you to adjust any layout files.
Just add the following trigger action to the game initialization trigger:
Also when applying changes using layout files, you only need to mention the changes that you want to apply in the file, you do not have to repeat the default values that it already has.
Please help me, I want to put the little Hero Icon that's usually in the bottom right corner to the top left corner.
I know I probably screwed up something but nothing happens... I made the code after I followed the tutorial, according to tutorial with this code the Hero icons should be in the middle of the screen. Please help :(
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Desc>
<Frame type="HeroPanel" name="HeroPanelTemplate">
<Frame type="HeroFrame" name="HeroFrame07" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent" pos="Max" offset="0"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame06" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame07" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame05" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame06" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame04" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame05" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame03" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame04" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame02" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame03" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame01" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame02" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
<Frame type="HeroFrame" name="HeroFrame00" template="HeroPanel/HeroFrameTemplate">
<Anchor side="Top" relative="$parent" pos="Max" offset="0"/>
<Anchor side="Left" relative="$parent/HeroFrame01" pos="Min" offset="#HeroButtonGap"/>
<CollapseLayout val="true"/>
</Frame>
</Frame>
</Desc>
Where it says "Top" was "Bottom" and where it says "Left" there was "right" before. I changed it to this, hoping it would move the hero icon in the opposite direction but nothing happened...
@Lightforgerr: Go
Please create a new thread instead of hijacking someone else his thread.
Also to answer your question, you need to refer to the frame. You can not override the existing UI frames anymore, see the 2nd post.