Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add base for clickable yields at top bar
  • Loading branch information
Alex Tsernoh committed Aug 10, 2017
commit 1acd63ee9034e8f6ffe7ff63a8b0de1d44bfea28
7 changes: 7 additions & 0 deletions Assets/UI/toppanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,13 @@ function Initialize()
Controls.MenuButton:RegisterCallback( Mouse.eLClick, OnMenu );
Controls.MenuButton:RegisterCallback( Mouse.eMouseEnter, function() UI.PlaySound("Main_Menu_Mouse_Over"); end);

-- Open victorycondition for yield (P_Sanja)
Controls.ScienceBacking:RegisterCallback( Mouse.eLClick, function() LuaEvents.PartialScreenHooks_OpenWorldRankings(); end );
Controls.CultureBacking:RegisterCallback( Mouse.eLClick, function() LuaEvents.PartialScreenHooks_OpenWorldRankings(); end );
Controls.FaithBacking:RegisterCallback( Mouse.eLClick, function() LuaEvents.PartialScreenHooks_OpenWorldRankings(); end );
Controls.TourismBacking:RegisterCallback( Mouse.eLClick, function() LuaEvents.PartialScreenHooks_OpenWorldRankings(); end );
Controls.GoldBacking:RegisterCallback( Mouse.eLClick, function() LuaEvents.PartialScreenHooks_OpenWorldRankings(); end );

-- Game Events
Events.AnarchyBegins.Add( OnRefreshYields );
Events.AnarchyEnds.Add( OnRefreshYields );
Expand Down
4 changes: 2 additions & 2 deletions Assets/UI/toppanel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
<Label ID="FaithPerTurn" Offset="2,-2" Style="FontNormal14" ColorSet="ResFaithLabelCS" FontStyle="Stroke" String="0" />
</Stack>
</GridButton>
<Grid ID="GoldBacking" Size="40,24" Style="YieldBacking" Color="185,176,70,150" AutoSize="H">
<GridButton ID="GoldBacking" Size="40,24" Style="YieldBacking" Color="185,176,70,150" AutoSize="H">
<Stack ID="GoldStack" Anchor="L,C" Offset="0,2" StackGrowth="Right" >
<Label Anchor="L,B" Offset="0,4" String="[ICON_GoldLarge]"/>
<Label ID="GoldBalance" Anchor="C,T" Style="FontNormal18" ColorSet="ResGoldLabelCS" String="?" />
<Label ID="GoldPerTurn" Offset="2,-2" Style="FontNormal14" ColorSet="ResGoldLabelCS" FontStyle="Stroke" String="0" />
</Stack>
</Grid>

<Grid ID="TourismBacking" Size="40,24" Style="YieldBacking" Color="181,116,102,150" AutoSize="H" ToolTip="LOC_TOP_PANEL_TOURISM">
<GridButton ID="TourismBacking" Size="40,24" Style="YieldBacking" Color="181,116,102,150" AutoSize="H" ToolTip="LOC_TOP_PANEL_TOURISM">
<Stack ID="TourismStack" Anchor="L,C" Offset="0,2" StackGrowth="Right" >
<Label Anchor="L,B" Offset="0,4" String="[ICON_TourismLarge]"/>
<Label ID="TourismBalance" Anchor="C,T" Style="FontNormal18" ColorSet="ResTourismLabelCS" String="?" />
Expand Down