UIElement.RegisterCheckHandler (Civ5 API)

From Civilization Modding Wiki
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of ControlBase.

This is an instance method, invoke it with a colon.


Usage

void UIElement:RegisterCheckHandler((void func(bool bIsChecked)) OnPolicyInfo)


Parameters

OnPolicyInfo: No description available.


Source code samples

Too many occurences. Only 50 out of 69 are listed.

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0228
gameOption.GameOptionRoot:RegisterCheckHandler( function(bCheck)
0229
PreGame.SetGameOption(option.Type, bCheck);
0230
end);
0232
gameOption.GameOptionRoot:RegisterCheckHandler( function(bCheck)
0233
PreGame.SetMapOption(option.ID, bCheck);
0234
end);
1062
victoryCondition.GameOptionRoot:RegisterCheckHandler( function(bCheck)
1063
PreGame.SetVictory(row.ID, bCheck);
1064
end);


CityView.lua

UI/InGame/CityView/CityView.lua
2258
Controls.HideQueueButton:RegisterCheckHandler( OnHideQueue );


InstalledPanel.lua

UI/FrontEnd/Modding/InstalledPanel.lua
0863
Controls.ShowDLCMods:RegisterCheckHandler( function(bCheck)
0864
if(bCheck) then
0865
Modding.SetSystemProperty("ShowDLCMods", "1");
0866
else
0867
Modding.SetSystemProperty("ShowDLCMods", "0");
0868
end
0869
end);


LoadMenu.lua

UI/FrontEnd/LoadMenu.lua
0082
Controls.AutoCheck:RegisterCheckHandler( function(checked)
0083
g_ShowAutoSaves = checked;
0084
if(g_ShowAutoSaves) then
0085
g_ShowCloudSaves = false;
0086
end
0088
UpdateControlStates();
0089
SetupFileButtonList();
0090
end);
0093
Controls.CloudCheck:RegisterCheckHandler( function(checked)
0094
g_ShowCloudSaves = checked;
0096
if(g_ShowCloudSaves) then
0097
Controls.SortByPullDown:SetHide(true);
0098
g_ShowAutoSaves = false;
0099
else
0100
Controls.SortByPullDown:SetHide(false);
0101
end
0103
UpdateControlStates();
0104
SetupFileButtonList();
0105
end);


MiniMapPanel.lua

UI/InGame/WorldView/MiniMapPanel.lua
0296
Controls.ShowFeatures:RegisterCheckHandler( OnShowFeaturesChecked );
0306
Controls.ShowFogOfWar:RegisterCheckHandler( OnShowFOWChecked );
0321
Controls.ShowGrid:RegisterCheckHandler( OnShowGridChecked );
0358
Controls.ShowYield:RegisterCheckHandler( OnYieldChecked );
0372
Controls.ShowResources:RegisterCheckHandler( OnResourcesChecked );
0413
Controls.HideRecommendation:RegisterCheckHandler( OnRecommendationChecked );


MPGameOptions.lua

UI/FrontEnd/Multiplayer/GameSetup/MPGameOptions.lua
0885
victoryCondition.GameOptionRoot:RegisterCheckHandler( function(bCheck)
0886
PreGame.SetVictory(row.ID, bCheck);
0887
SendGameOptionChanged();
0888
end);
0959
gameOption.GameOptionRoot:RegisterCheckHandler( function(bCheck)
0960
PreGame.SetGameOption(option.Type, bCheck);
0961
SendGameOptionChanged();
0962
end);
0964
gameOption.GameOptionRoot:RegisterCheckHandler( function(bCheck)
0965
PreGame.SetMapOption(option.ID, bCheck);
0966
SendGameOptionChanged();
0967
end);
0995
dlcEntries.GameOptionRoot:RegisterCheckHandler( function(bCheck)
0996
PreGame.SetDLCAllowed(row.PackageID, bCheck);
0997
SendGameOptionChanged();
0998
end
0999
);


OptionsMenu.lua

UI/Options/OptionsMenu.lua
0777
Controls.AutoWorkersDontReplaceCB:RegisterCheckHandler( OnAutoWorkersDontReplaceCheckbox );
0784
Controls.AutoWorkersDontRemoveFeaturesCB:RegisterCheckHandler( OnAutoWorkersDontRemoveFeaturesCheckbox );
0791
Controls.NoRewardPopupsCheckbox:RegisterCheckHandler( OnNoRewardPopupsCheckbox );
0798
Controls.NoTileRecommendationsCheckbox:RegisterCheckHandler( OnNoTileRecommendationsCheckbox );
0805
Controls.CivilianYieldsCheckbox:RegisterCheckHandler( OnCivilianYieldsCheckbox );
0812
Controls.NoBasicHelpCheckbox:RegisterCheckHandler( OnNoBasicHelpCheckbox );
0835
Controls.ZoomCheck:RegisterCheckHandler( OnZoomCheck );
0850
Controls.SinglePlayerAutoEndTurnCheckBox:RegisterCheckHandler(OnSinglePlayerAutoEndTurnCheck);
0857
Controls.MultiplayerAutoEndTurnCheckbox:RegisterCheckHandler(OnMultiplayerAutoEndTurnCheck);
0871
Controls.SPQuickCombatCheckBox:RegisterCheckHandler(OnSinglePlayerQuickCombatCheck);
0885
Controls.SPQuickMovementCheckBox:RegisterCheckHandler(OnSinglePlayerQuickMovementCheck);
0899
Controls.MPQuickCombatCheckbox:RegisterCheckHandler(OnMultiplayerQuickCombatCheck);
0913
Controls.MPQuickMovementCheckbox:RegisterCheckHandler(OnMultiplayerQuickMovementCheck);
0930
Controls.AutoUIAssetsCheck:RegisterCheckHandler( OnAutoUI );
0938
Controls.SmallUIAssetsCheck:RegisterCheckHandler( OnSmallUI );
0978
Controls.AutoUnitCycleCheck:RegisterCheckHandler( OnAutoUnitCycleCheck );
0986
Controls.ScoreListCheck:RegisterCheckHandler( OnScoreListCheck );
0993
Controls.SkipIntroVideoCheck:RegisterCheckHandler( OnSkipIntroVideo );
1016
Controls.HDStratCheck:RegisterCheckHandler( OnHDStrategicView );
1027
Controls.FullscreenCheck:RegisterCheckHandler( OnFullscreen );
1035
Controls.VSyncCheck:RegisterCheckHandler( OnVSync );


ReplayViewer.lua

UI/InGame/Popups/ReplayViewer.lua
0731
graphLegendInstance.ShowHide:RegisterCheckHandler( function(bCheck)
0732
local segments = panel.SegmentsByPlayer[i];
0733
if(segments) then
0734
for i,v in ipairs(segments) do
0735
   v.LineSegment:SetHide(not bCheck);
0736
   end
0737
   end
0738
   end);


SaveMenu.lua

UI/InGame/Menus/SaveMenu.lua
0151
Controls.CloudCheck:RegisterCheckHandler(function(checked)
0152
Controls.NameBox:ClearString();
0153
SetSelected( nil );
0154
SetupFileButtonList();
0155
end);


SocialPolicyPopup.lua

UI/InGame/Popups/SocialPolicyPopup.lua
0555
Controls.PolicyInfo:RegisterCheckHandler( OnPolicyInfo );


StagingRoom.lua

UI/FrontEnd/Multiplayer/StagingRoom.lua
0197
Controls.LocalReadyCheck:RegisterCheckHandler( OnReadyCheck );
1272
instance.LockCheck:RegisterCheckHandler( OnLock );
1273
instance.EnableCheck:RegisterCheckHandler( OnEnable );



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.