From 1acd63ee9034e8f6ffe7ff63a8b0de1d44bfea28 Mon Sep 17 00:00:00 2001 From: Alex Tsernoh Date: Thu, 10 Aug 2017 15:20:15 +0300 Subject: [PATCH 1/3] Add base for clickable yields at top bar --- Assets/UI/toppanel.lua | 7 +++++++ Assets/UI/toppanel.xml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/UI/toppanel.lua b/Assets/UI/toppanel.lua index 8cacff9..50cf9bc 100644 --- a/Assets/UI/toppanel.lua +++ b/Assets/UI/toppanel.lua @@ -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 ); diff --git a/Assets/UI/toppanel.xml b/Assets/UI/toppanel.xml index 1d03ef8..c42ba34 100644 --- a/Assets/UI/toppanel.xml +++ b/Assets/UI/toppanel.xml @@ -45,7 +45,7 @@