UIElement.SetInputHandler (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:SetInputHandler((void func(MouseEventType uiMsg, KeyType wParam, unknown lParam)) InputHandler)
Parameters
InputHandler: No description available.
Source code samples
Redundant occurences have been removed.
AdvancedSetup.lua
UI/FrontEnd/GameSetup/AdvancedSetup.lua
1275
|
ContextPtr:SetInputHandler( InputHandler ); |
CustomMod.lua
UI/FrontEnd/Modding/CustomMod.lua
0049
|
ContextPtr:SetInputHandler( function(uiMsg, wParam, lParam) |
0050
|
if uiMsg == KeyEvents.KeyDown then |
0051
|
if wParam == Keys.VK_ESCAPE then |
0052
|
OnBack(); |
0053
|
end |
0054
|
end |
0055
|
return true; |
0056
|
end); |
EULA.lua
UI/FrontEnd/Modding/EULA.lua
0026
|
ContextPtr:SetInputHandler(function(uiMsg, wParam, lParam) |
0028
|
if uiMsg == KeyEvents.KeyDown then |
0029
|
if wParam == Keys.VK_ESCAPE then |
0030
|
NavigateBack(); |
0031
|
end |
0032
|
end |
0034
|
return true; |
0035
|
end); |
FoRScenarioLoadScreen.lua (G&K)
DLC/Expansion/Scenarios/FallOfRomeScenario/FoRScenarioLoadScreen.lua
0034
|
ContextPtr:SetInputHandler( function(uiMsg, wParam, lParam) |
0035
|
if uiMsg == KeyEvents.KeyDown then |
0036
|
if wParam == Keys.VK_ESCAPE or wParam == Keys.VK_RETURN then |
0037
|
OnBack(); |
0038
|
end |
0039
|
end |
0040
|
return true; |
0041
|
end); |
ModsBrowser.lua
UI/FrontEnd/Modding/ModsBrowser.lua
0033
|
ContextPtr:SetInputHandler(InputHandler); |
ModsMenu.lua
UI/FrontEnd/Modding/ModsMenu.lua
0073
|
ContextPtr:SetInputHandler( function(uiMsg, wParam, lParam) |
0075
|
if uiMsg == KeyEvents.KeyDown then |
0076
|
if wParam == Keys.VK_ESCAPE then |
0077
|
NavigateBack(); |
0078
|
end |
0079
|
end |
0081
|
return true; |
0082
|
end); |
PlotHelpManager.lua
UI/InGame/PlotHelpManager.lua
0030
|
ContextPtr:SetInputHandler( ProcessInput ); |
VictoryStatus.lua (G&K)
DLC/Expansion/Scenarios/SteampunkScenario/VictoryStatus.lua
0222
|
ContextPtr:SetInputHandler(function(uiMsg, wParam, lParam) |
0223
|
if(uiMsg == KeyEvents.KeyDown) then |
0224
|
if (wParam == Keys.VK_ESCAPE or wParam == Keys.VK_RETURN) then |
0225
|
OnClose(); |
0226
|
return true; |
0227
|
end |
0228
|
end |
0229
|
end); |
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.