UIElement.SetShowHideHandler (Civ5 API)
This page is a part of the Lua and UI Reference (Civ5).
This method is declared by Context. This is an instance method, invoke it with a colon. |
Usage
void UIElement:SetShowHideHandler((void func(bool isHide, int bInitState)) ShowHide)
Parameters
ShowHide: No description available.
Source code samples
Too many occurences. Only 50 out of 139 are listed.
ActionInfoPanel.lua
UI/InGame/WorldView/ActionInfoPanel.lua
0460
|
ContextPtr:SetShowHideHandler( ShowHide ); |
AdvancedSetup.lua
UI/FrontEnd/GameSetup/AdvancedSetup.lua
1287
|
ContextPtr:SetShowHideHandler( ShowHideHandler ); |
DiploGlobalRelationships.lua
UI/InGame/Popups/DiploGlobalRelationships.lua
0012
|
ContextPtr:SetShowHideHandler(ShowHideHandler); |
EULA.lua
UI/FrontEnd/Modding/EULA.lua
0037
|
ContextPtr:SetShowHideHandler(function(isHide) |
0038
|
--UNCOMMENT THIS BLOCK IF YOU WISH TO ONLY |
0039
|
--SHOW THE EULA ONCE PER APPLICATION RUN |
0040
|
--if not isHide and g_HasAcceptedEULA then |
0041
|
-- NavigateForward(); |
0042
|
--end |
0044
|
--if(not isHide and g_QueueEulaToHide) then |
0045
|
-- NavigateBack(); |
0046
|
--end |
0047
|
end); |
InstalledPanel.lua
UI/FrontEnd/Modding/InstalledPanel.lua
0874
|
ContextPtr:SetShowHideHandler(function(bHiding) |
0875
|
if(not bHiding) then |
0876
|
RefreshMods(); |
0877
|
else |
0878
|
SetListingsState("results"); |
0879
|
end |
0880
|
end); |
Lobby.lua
UI/FrontEnd/Multiplayer/Lobby.lua
0533
|
ContextPtr:SetShowHideHandler( ShowHideHandler ) |
0538
|
function AdjustScreenSize() |
ModsMenu.lua
UI/FrontEnd/Modding/ModsMenu.lua
0038
|
ContextPtr:SetShowHideHandler(function(isHiding) |
0039
|
if(not isHiding) then |
0040
|
local supportsSinglePlayer = Modding.AllEnabledModsContainPropertyValue("SupportsSinglePlayer", 1); |
0041
|
local supportsMultiplayer = Modding.AllEnabledModsContainPropertyValue("SupportsMultiplayer", 1); |
0043
|
Controls.SinglePlayerButton:SetDisabled(not supportsSinglePlayer); |
0044
|
Controls.MultiPlayerButton:SetDisabled(not supportsMultiplayer); |
0046
|
--if(supportsSinglePlayer and not supportsMultiplayer) then |
0047
|
--OnSinglePlayerClick(); |
0048
|
--elseif(supportsMultiplayer and not supportsSinglePlayer) then |
0049
|
--OnMultiPlayerClick(); |
0050
|
--end |
0052
|
g_InstanceManager:ResetInstances(); |
0054
|
local mods = Modding.GetEnabledModsByActivationOrder(); |
0056
|
if(#mods == 0) then |
0057
|
Controls.ModsInUseLabel:SetHide(true); |
0058
|
else |
0059
|
Controls.ModsInUseLabel:SetHide(false); |
0060
|
for i,v in ipairs(mods) do |
0061
|
local displayName = Modding.GetModProperty(v.ModID, v.Version, "Name"); |
0062
|
local displayNameVersion = string.format("[ICON_BULLET] %s (v. %i)", displayName, v.Version); |
0063
|
local listing = g_InstanceManager:GetInstance(); |
0064
|
listing.Label:SetText(displayNameVersion); |
0065
|
listing.Label:SetToolTipString(displayNameVersion); |
0066
|
end |
0067
|
end |
0068
|
end |
0069
|
end); |
ModsSinglePlayer.lua
UI/FrontEnd/Modding/ModsSinglePlayer.lua
0046
|
ContextPtr:SetShowHideHandler(function(isHiding) |
0047
|
if(not isHiding) then |
0049
|
local bHasCustomGames = false; |
0050
|
for row in Modding.GetActivatedModEntryPoints("Custom") do |
0051
|
bHasCustomGames = true; |
0052
|
break; |
0053
|
end |
0055
|
Controls.PlayMapButton:SetHide(Modding.AnyEnabledModsContainPropertyValue("HideSetupGame", 1)); |
0056
|
Controls.CustomGameButton:SetHide(not bHasCustomGames); |
0057
|
end |
0058
|
end); |
ScenariosMenu.lua
UI/FrontEnd/ScenariosMenu.lua
0067
|
ContextPtr:SetShowHideHandler(function(isHide) |
0068
|
if( not isHide ) then |
0069
|
Modding.DeactivateMods(); |
0070
|
SetupFileButtonList(); |
0071
|
end |
0072
|
end); |
TradeLogic.lua
UI/InGame/WorldView/TradeLogic.lua
0502
|
ContextPtr:SetShowHideHandler( OnShowHide ); |
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.