EQInterface Forums

EQInterface Forums (http://www.eqinterface.com/forums/index.php)
-   XML Tutorials & Info. (http://www.eqinterface.com/forums/forumdisplay.php?f=48)
-   -   Managing Blocks over Elements (http://www.eqinterface.com/forums/showthread.php?t=9674)

jobeken 08-11-2003 02:19 PM

Managing Blocks over Elements
 
A Element: Any single component of a UI, a gauge, label, animation / etc.

A Block: A collection of components that can be moved as a group.

In the ACUI Inventory I noticed an odd section, multiple screen items, holding differening elements. The idea is simple.

I define a group of elements, like all the player stats, and space them properly / etc. Then I create a screen item just for them.

Then do this for other sections, like bank slots, inventory equipment, and the like.

Then add those screenitems to the window definition. When you change the screen item coordinates, the entire block of elements moves together.

Examples:
PHP Code:
 <Screen item="TW_My_Gauge">
        <
RelativePosition>true</RelativePosition>
        <
Location>
            <
X>15</X>
            <
Y>0</Y>
        </
Location>
        <
Size>
            <
CX>25</CX>
            <
CY>25</CY>
        </
Size>
        <
Text></Text>
        <
Style_VScroll>false</Style_VScroll>
        <
Style_HScroll>false</Style_HScroll>
        <
Style_Transparent>true</Style_Transparent>
        <
DrawTemplate>WDT_Def</DrawTemplate>
        <
Style_Titlebar>false</Style_Titlebar>
        <
Style_Closebox>false</Style_Closebox>
        <
Style_Minimizebox>false</Style_Minimizebox>
        <
Style_Border>false</Style_Border>
        <
Style_Sizable>false</Style_Sizable>
        <
Pieces>TW_GlobeGauge_10</Pieces>
        <
Pieces>TW_GlobeGauge_9</Pieces>
        <
Pieces>TW_GlobeGauge_8</Pieces>
        <
Pieces>TW_GlobeGauge_7</Pieces>
        <
Pieces>TW_GlobeGauge_8</Pieces>
        <
Pieces>TW_GlobeGauge_5</Pieces>
        <
Pieces>TW_GlobeGauge_4</Pieces>
        <
Pieces>TW_GlobeGauge_3</Pieces>
        <
Pieces>TW_GlobeGauge_2</Pieces>
        <
Pieces>TW_GlobeGauge_1</Pieces>
        <
Pieces>TW_GlobeGauge_0</Pieces>
    </
Screen


So when I change the Location of this screenitem, all the peices within it move with it, and keep the spacing/etc.

PHP Code:
 <Screen item "TargetWindow">
        <
ScreenID/>
        <
RelativePosition>false</RelativePosition>
        <
Location>
            <
X>516</X>
            <
Y>242</Y>
        </
Location>
        <
Size>
            <
CX>180</CX>
            <
CY>25</CY>
        </
Size>
        <
Text>Target</Text>
        <
Style_VScroll>false</Style_VScroll>
        <
Style_HScroll>false</Style_HScroll>
        <
Style_Transparent>true</Style_Transparent>
        <
TooltipReference>Your Current Target</TooltipReference>
        <
DrawTemplate>WDT_RoundedNoTitle</DrawTemplate>
        <
Style_Titlebar>false</Style_Titlebar>
        <
Style_Closebox>false</Style_Closebox>
        <
Style_Minimizebox>false</Style_Minimizebox>
        <
Style_Border>true</Style_Border>
        <
Style_Sizable>false</Style_Sizable>
        <
Pieces>TW_My_Gauge</Pieces>
    </
Screen


Then add that screenitem to the window section as a peice. It will pack into place just like an element, except now it is an entire collection of elements.

This method makes it easier to rearrange elements later on. If you decide to make changes.


All times are GMT -5. The time now is 09:03 AM.

vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.