washy
Chieftain
- Joined
- Feb 9, 2015
- Messages
- 61
I managed to import a new top-panel with 12 spaces for resources, but you can expand ir even more.
Keep in mind that 0 is Always, Money and 1 is always Orders
from 2 to 8 now you can add 2 resources that you can buy and sell
and from 9 to 11 other resources
For building a new bundle, put it into asssets/ui/includes/top-bar.xml
I included the top-bar file for modification, if u change it you have to build a new bundle
And also the Assets.rar that you can unzip in your mod folder for two extra resource slots
Keep in mind that 0 is Always, Money and 1 is always Orders
from 2 to 8 now you can add 2 resources that you can buy and sell
Code:
<loop start="2" end="8" placeholder="@">
<UIContextControl STYLE="HGroup,TopBarResource" ToggleEvent="OnHover" ChildAlignment="TextAnchor.MiddleLeft" ITEM_TYPE="ItemType.QUANTITY_YIELD" ITEM_DATA="{{YieldAmount@-Data}}" TOOLTIP_OFFSET="0,-80" IsActive="{{YieldAmount@-IsActive}}">
<template TEMPLATE="CityRate" BackgroundImage="{{SelectedPanel-ArrowShape}}" BackgroundColor="{{SelectedPanel-Yield@-Color}}" ITEM_TYPE="ItemType.HELP_LINK" ITEM_DATA="{{SelectedPanel-Yield@-Data}}"
State="{{ActiveSelection}}" StateAttributes="[CITY_ForceInvisible:false][CHARACTER_ForceInvisible:false][Default_ForceInvisible:true]" IsVisible="{{SelectedPanel-Yield@-Rate-IsActive}}" Text.Label="{{SelectedPanel-Yield@-Rate}}" ForceInactive="{{TabOverlay-IsAnyTabOpen}}"/>
<template TEMPLATE="QuantityRatePriceContainer"
RaycastTarget="false"
TOOLTIP_LOCATION="TooltipLocation.Parent"
InlineIcon.BackgroundImage="{{YieldAmount@-Icon}}"
Quantity.Label="{{YieldAmount@-Label}}"
Rate.Label="{{YieldAmount@-Rate}}"
Price.Label="{{YieldAmount@-BuyPrice}}"/>
<!-- Buy/Sell panel appears on hover -->
<VGroup ASSIGN_TO_PARENT="UIContextControl:Content" IgnoreLayout="true" Spacing="-2" Anchor="UIAnchor.BottomLeft" BackgroundColor="#222222" Pivot="UIPivot.TopLeft" Width="120" Height="80" TOOLTIP_LOCATION="TooltipLocation.BottomLeft">
<template TEMPLATE="BuySellButton" Text.Label="TEXT_TOP_BAR_BUY" Price.Label="{{YieldAmount@-BuyPrice}}" Position="0,0" ITEM_TYPE="ItemType.BUY_YIELD" ITEM_DATA="{{YieldAmount@-Data}}" IsInteractable="{{YieldAmount@-CanBuy}}" AUDIO_CLICK_PREFIX="AUDIO_UI_CLICK_BUY_" AUDIO_CLICK="{{YieldAmount@-Data}}" />
<template TEMPLATE="BuySellButton" Text.Label="TEXT_TOP_BAR_SELL" Price.Label="{{YieldAmount@-SellPrice}}" Position="0,-42" ITEM_TYPE="ItemType.SELL_YIELD" ITEM_DATA="{{YieldAmount@-Data}}" IsInteractable="{{YieldAmount@-CanSell}}" AUDIO_CLICK_PREFIX="AUDIO_UI_CLICK_SELL_" AUDIO_CLICK="{{YieldAmount@-Data}}" />
</VGroup>
</UIContextControl>
</loop>
Code:
<loop start="8" end="11" placeholder="@">
<template TEMPLATE="QuantityRateContainer"
ITEM_DATA="{{YieldAmount@-Data}}"
InlineIcon.BackgroundImage="{{YieldAmount@-Icon}}"
Quantity.Label="{{YieldAmount@-Label}}"
Rate.IsActive="{{YieldAmount@-HasRate}}"
Rate.Label="{{YieldAmount@-Rate}}"
ChildAlignment="TextAnchor.MiddleLeft">
<template TEMPLATE="CityRate" BackgroundImage="{{SelectedPanel-ArrowShape}}" BackgroundColor="{{SelectedPanel-Yield@-Color}}" ITEM_TYPE="ItemType.HELP_LINK" ITEM_DATA="{{SelectedPanel-Yield@-Data}}"
State="{{ActiveSelection}}" StateAttributes="[CITY_ForceInvisible:false][CHARACTER_ForceInvisible:false][Default_ForceInvisible:true]" IsVisible="{{SelectedPanel-Yield@-Rate-IsActive}}" Text.Label="{{SelectedPanel-Yield@-Rate}}" ForceInactive="{{TabOverlay-IsAnyTabOpen}}"/>
</template>
</loop>
For building a new bundle, put it into asssets/ui/includes/top-bar.xml
I included the top-bar file for modification, if u change it you have to build a new bundle
And also the Assets.rar that you can unzip in your mod folder for two extra resource slots