SC2Mapster Forums

Development > UI Development

Moving InfoPaneGroup

  • 2 posts
    #1 Jan 03, 2013 at 06:32 UTC - 0 likes

    Hey fellow UI crafters,

    I've been working on an extremely complicated SC2Layout interface for somebody, and I have run into a problem with the InfoPaneGroup, located at GameUI/UIContainer/ConsoleUIContainer/InfoPanel/InfoPaneGroup.

    I need to move this frame offscreen but haven't been able to with a wide variety of attempts.

    I tried a solution in this thread, that says this works:

    <Frame type='InfoPanel' name='GameUI/UIContainer/ConsoleUIContainer/InfoPanel' file='GameUI'>
      <Frame type='InfoPaneGroup' name='InfoPaneGroup'>
        <Anchor side="Top" pos="Max" offset="500" relative="$parent/$parent"/>
        <Anchor side="Bottom" pos="Max" offset="500" relative="$parent/$parent"/>
      </Frame>
    </Frame>
    

    But it didn't work.

    Thanks for your assistance. :)

    Last edited Jan 04, 2013 by MasterWrath

    Trigger, layout, interface specialist for Aeon of Storms.

    #2 Jan 04, 2013 at 04:02 UTC - 0 likes

    @MasterWrath: Go

    I have solved this in a roundabout way.

    Because the InfoPaneGroup is anchored to the Top Left of InfoPanel, anchoring the Top of the InfoPanel off of the screen will move the InfoPaneGroup off of the screen as well. This is the code that does that:

    <Frame type="InfoPanel" name="InfoPanel" template="InfoPanel/InfoPanelTemplate">
    	<Anchor side="Top" relative="$parent" pos="Min" offset="-500"/>
    	<Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/>
    	<Anchor side="Left" relative="$parent" pos="Min" offset="0"/>
    	<Anchor side="Right" relative="$parent" pos="Max" offset="0"/>
    	<Height val="0"/>
    </Frame>
    

    However, because you changed the Top Anchor of the InfoPanel, anything that was anchored to the Top-Min of the InfoPanel must be anchored now to the Top-Max instead, offset by the original height of the InfoPanel (which was 199).

    So, if you have a child of the InfoPanel that was anchored in this way, and you want it to stay where it was, you must alter it like this:

    <Anchor side="Top" relative="$parent" pos="Min" offset="30"/>
    

    Changes to:

    <Anchor side="Top" relative="$parent" pos="Max" offset="-169"/>
    

    The offset of -169 was derived from the original offset, 30, minus the original height of the info panel, 199. 30-199 = -169.

    Last edited Jan 04, 2013 by MasterWrath
  • 2 posts

You must login to post a comment. Don't have an account? Register to get one!