LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Interface Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=3)
-   -   Auto Center the main bar. (https://www.lotrointerface.com/forums/showthread.php?t=792)

wackafoo 08-26-2009 02:32 PM

Auto Center the main bar.
The game auto centers the main toolbar at the bottom of the screen.

I have skins that put the bar in all kinds of places and have to be centered with X and Y.

Cant we just edit or delete code to let it center again on its own?

Here is what I have in a skin right now.

<!-- Mainbar Positioning -->
<PanelFile ID="toolbar">
<Element ID="ToolbarField" X="198" Y="850" Width="1050" Height="200" OriginalX="267" OriginalY="965">
<Element ID="ToolbarFieldMain" X="0" Y="115" Width="1050" Height="90"></Element>
<Element ID="GamePlay_FervorPipDisplay" X="294" Y="89" Width="29" Height="109"></Element>
<Element ID="GamePlay_AimPipDisplay" X="294" Y="89" Width="29" Height="109"></Element>
<Element ID="GamePlay_RampagePipDisplay" X="294" Y="89" Width="29" Height="109"></Element>
<Element ID="LevelMeter" X="320" Y="181" Width="423" Height="30">
<Element ID="LevelMeterFill" X="7" Y="12" Width="421" Height="6">
<Element ID="LevelMeter_BonusMeter" X="0" Y="0" Width="421" Height="6"></Element>
<Element ID="ToolbarButton_LevelUpXP_TutorialHighlight" X="0" Y="10" Width="423" Height="10"></Element>
<Element ID="ToolbarButton_Experience_TutorialHighlight" X="0" Y="10" Width="423" Height="10"></Element>
<Element ID="LevelMeterText" X="3" Y="10" Width="423" Height="10"></Element>
<Element ID="AutoAttackIndicatorButton" X="343" Y="188" Width="1" Height="1"></Element>
<Element ID="ViolentModeIndicator" X="0" Y="0" Width="1" Height="1"></Element>
<Element ID="ToolbarButton_AutoAttack_TutorialHighlight" X="244" Y="115" Width="1" Height="1"></Element>
<Element ID="Gameplay_AtunementUI" X="237" Y="116" Width="88" Height="60"></Element>
<Element ID="ToolbarButton_Crafting" X="343" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolbarButton_Journal" X="399" Y="188" Width="12" Height="12">
<Element ID="ToolbarButton_Traits_TutorialHighlight" X="0" Y="0" Width="25" Height="25"></Element>
<Element ID="ToolbarButton_Journal_TutorialHighlight" X="0" Y="0" Width="25" Height="25"></Element>
<Element ID="ToolbarButton_GainedFirstTitle_TutorialHighlig ht" X="0" Y="0" Width="25" Height="25"></Element>
<Element ID="ToolbarButton_LevelUp_TutorialHighlight" X="0" Y="0" Width="25" Height="25"></Element>
<Element ID="ToolbarButton_Social" X="357" Y="188" Width="12" Height="12">
<Element ID="ToolbarButton_Social_TutorialHighlight" X="0" Y="0" Width="25" Height="25"></Element>
<Element ID="ToolBarButton_MainMenu" X="329" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolbarButton_Accomplishment" X="371" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolBarButton_Quest" X="385" Y="188" Width="12" Height="12">
<Element ID="ToolbarButton_Quests_TutorialHighlight" X="0" Y="0" Width="25" Height="25"></Element>
<Element ID="ToolbarButton_Quest_TutorialHighlight" X="0" Y="0" Width="30" Height="30"></Element>
<Element ID="ToolbarButton_Inventory" X="728" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolBarButton_Inventory2" X="714" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolBarButton_Inventory3" X="700" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolBarButton_Inventory4" X="686" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolBarButton_Inventory5" X="672" Y="188" Width="12" Height="12"></Element>
<Element ID="Toolbar_Quickslot" X="323" Y="152" Width="420" Height="35"></Element>
<Element ID="ToolbarButton_Traits" X="413" Y="188" Width="12" Height="12"></Element>
<Element ID="ToolbarButton_ItemAdvancement_buttonFrame" X="294" Y="169" Width="29" Height="29"></Element>
<Element ID="ToolbarButton_ItemAdvancement" X="296" Y="171" Width="25" Height="25"></Element>

The Scyphozoa 08-27-2009 06:28 PM

If you don't include any ElementID lines related to the mainbar, then it will go back to its default position (Mapping, for skins, doesn't count, they will not affect the position), however if any sub-elements of the mainbar are moved, you do have to include the actual mainbar line and its coordinates. If you're not doing anything too funky, pretty much the centering coordinates are:

X=(Screen width - bar width)/2

Y=Screen height - bar height (not too sure about Y)

daimon 08-27-2009 06:56 PM

Height (Y) value can be overflowing number. The UI won't let the bar flow over the screen even if you use higher value than your resolution is. That's why I use value 2000 so it should stay bottom no matter what resolution you use.

Yito_graft 08-29-2009 02:06 PM

if it overflows, can you do the opposite? make both x and y really high sticking it to the right side of the screen? I want the bar uncentered. Either left or right, right preferred.

The Scyphozoa 08-29-2009 03:57 PM

Well, left would be 0, and right would be screen width - bar width. I don't know if it's overflowing, you could try.

All times are GMT -5. The time now is 01:09 PM.

vBulletin® - Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.