IconHookup (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 global function. Use: include("IconSupport.lua")


Usage

bool IconHookup(int offset, float iconSize, string atlas, Image imageControl, unknown debugPrint = nil)


Returned Value

No description available.

Parameters

offset: No description available.
iconSize: No description available.
atlas: No description available.
imageControl: No description available.
debugPrint: No description available.


Source code samples

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

AdvancedSetup.lua

UI/FrontEnd/GameSetup/AdvancedSetup.lua
0315
IconHookup( 22, 64, "LEADER_ATLAS", controlTable.Portrait );


ChangePassword.lua

UI/InGame/ChangePassword.lua
0116
IconHookup( civ.PortraitIndex, 128, civ.IconAtlas, Controls.Icon );


ChooseFaithGreatPerson.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChooseFaithGreatPerson.lua
0033
IconHookup( info.PortraitIndex, 64, info.IconAtlas, controlTable.Icon64 );


ChooseReligionPopup.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ChooseReligionPopup.lua
0466
IconHookup(portraitIndex, 80, iconAtlas, Controls.ReligionIcon);


CityBannerManager.lua

UI/InGame/CityBannerManager.lua
0360
if IconHookup( thisUnitInfo.PortraitIndex, 45, thisUnitInfo.IconAtlas, controls.CityBannerProductionImage ) then
0367
if IconHookup( thisBuildingInfo.PortraitIndex, 45, thisBuildingInfo.IconAtlas, controls.CityBannerProductionImage ) then
0418
IconHookup( civInfo.PortraitIndex, 32, civInfo.AlphaIconAtlas, controls.StatusIcon );


CityBannerManager.lua (G&K)

DLC/Expansion/UI/InGame/CityBannerManager.lua
0203
IconHookup( religion.PortraitIndex, 32, religion.IconAtlas, controls.ReligiousIcon );


CityList.lua

UI/InGame/CityList.lua
0403
if IconHookup( thisProjectInfo.PortraitIndex, g_iPortraitSize, thisProjectInfo.IconAtlas, instance.ProdImage ) then


CityStateStatusHelper.lua (G&K)

DLC/Expansion/UI/CityStateStatusHelper.lua
0134
IconHookup(kBarIconNeutralIndex, size, kBarIconAtlas, barMarkerCtrl);


CityView.lua

UI/InGame/CityView/CityView.lua
0325
if IconHookup( building.PortraitIndex, 64, building.IconAtlas, controlTable.BuildingImage ) then
0588
IconHookup( thisBuildingInfo.PortraitIndex, 45, thisBuildingInfo.IconAtlas, Controls[controlImage] );
0607
IconHookup( thisProcessInfo.PortraitIndex, 45, thisProcessInfo.IconAtlas, Controls[controlImage] );
0885
if IconHookup( thisProcessInfo.PortraitIndex, g_iPortraitSize, thisProcessInfo.IconAtlas, Controls.ProductionPortrait ) then
1760
IconHookup(   0, 45, "CITIZEN_ATLAS", controlTable.PlotButtonImage);
1772
IconHookup(   12, 45, "CITIZEN_ATLAS", controlTable.PlotButtonImage);


CivilopediaScreen.lua

UI/Civilopedia/CivilopediaScreen.lua
1375
if IconHookup( portraitIndex, portraitSize, portraitAtlas, Controls.Portrait ) then
1618
if IconHookup( 44, portraitSize, "UNIT_ATLAS_2", Controls.Portrait ) then
2937
if not IconHookup( thisBuildingInfo.PortraitIndex, buttonSize, thisBuildingInfo.IconAtlas, thisBuildingInstance.RequiredBuildingImage ) then
3264
if IconHookup( thisPolicy.PortraitIndex, portraitSize, thisPolicy.IconAtlas, Controls.Portrait ) then
3467
if IconHookup( thisCiv.PortraitIndex, portraitSize, thisCiv.IconAtlas, Controls.Portrait ) then
3575
if not IconHookup( thisImprovement.PortraitIndex, buttonSize, thisImprovement.IconAtlas, thisImprovementInstance.UniqueImprovementImage ) then
3867
if IconHookup( thisTerrain.PortraitIndex, portraitSize, thisTerrain.IconAtlas, Controls.Portrait ) then


DiploList.lua

UI/InGame/DiploList.lua
0278
IconHookup( otherLeaderInfo.PortraitIndex, 64, otherLeaderInfo.IconAtlas, controlTable.LeaderPortrait );


EnemyUnitPanel.lua

UI/InGame/WorldView/EnemyUnitPanel.lua
0079
IconHookup( 0, g_iPortraitSize, "ENEMY_CITY_ATLAS", Controls.UnitPortrait );


FoRScenarioLoadScreen.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/FoRScenarioLoadScreen.lua
0259
IconHookup( civ.PortraitIndex, 64, civ.IconAtlas, Controls.IconShadow );


GameMenu.lua

UI/InGame/Menus/GameMenu.lua
0271
IconHookup( 4, 64, "WORLDTYPE_ATLAS", Controls.TypeIcon);
0278
IconHookup( info.PortraitIndex, 64, info.IconAtlas, Controls.SizeIcon );
0281
IconHookup( 6, 64, "WORLDSIZE_ATLAS", Controls.SizeIcon );
0288
IconHookup( info.PortraitIndex, 64, info.IconAtlas, Controls.DifficultyIcon );


GameSetupScreen.lua

UI/FrontEnd/GameSetup/GameSetupScreen.lua
0274
IconHookup( mapScript.IconIndex or 0, 128, mapScript.IconAtlas, Controls.TypeIcon );
0387
IconHookup(3, 128, "WORLDTYPE_ATLAS", Controls.TypeIcon);
0493
IconHookup( 22, 128, "LEADER_ATLAS", Controls.Portrait );


HallOfFame.lua

UI/InGame/Popups/HallOfFame.lua
0049
IconHookup( leader.PortraitIndex, 64, leader.IconAtlas, controlTable.LeaderPortrait );
0063
IconHookup( info.PortraitIndex, 32, info.IconAtlas, controlTable.Difficulty );


IconSupport.lua

UI/IconSupport.lua
0245
IconHookup( 23, iconSize, "CIV_COLOR_ATLAS", iconControl );


LoadMenu.lua

UI/FrontEnd/LoadMenu.lua
0356
IconHookup(4, 64, "WORLDTYPE_ATLAS", Controls.MapType);


MongolScenarioLoadScreen.lua - DLC_01 DLC

DLC/DLC_01/Scenarios/Mongol Scenario/MongolScenarioLoadScreen.lua
0115
IconHookup( civ.PortraitIndex, 80, civ.IconAtlas, Controls.IconShadow );


NotificationPanel.lua

UI/InGame/WorldView/NotificationPanel.lua
0196
IconHookup( portraitIndex, 80, GameInfo.Buildings[iGameValue].IconAtlas, instance.WonderConstructedAlphaAnim );
0227
IconHookup( portraitIndex, 80, thisResourceInfo.IconAtlas, instance.ResourceImage );


ProductionPopup.lua

UI/InGame/Popups/ProductionPopup.lua
0571
if IconHookup( thisProjectInfo.PortraitIndex, 128, thisProjectInfo.IconAtlas, Controls.ProductionPortrait ) then


ReligionOverview.lua (G&K)

DLC/Expansion/UI/InGame/Popups/ReligionOverview.lua
0541
IconHookup(v.FounderIconIndex, 45, v.FounderIconAtlas, entry.FounderIcon);
0629
IconHookup(v.ReligionIconIndex, 48, v.ReligionIconAtlas, beliefEntry.BeliefReligionIcon);


SocialPolicyPopup.lua

UI/InGame/Popups/SocialPolicyPopup.lua
0472
IconHookup( policyInfo.PortraitIndex, 64, policyInfo.IconAtlas, thisPolicyIcon.PolicyImage );


TechButtonInclude.lua

UI/InGame/TechTree/TechButtonInclude.lua
0161
IconHookup( row.PortraitIndex, textureSize, row.IconAtlas, thisButton );


TechPopup.lua

UI/InGame/TechPopup.lua
0231
if IconHookup( tech.PortraitIndex, 64, tech.IconAtlas, thisTechButtonInstance.TechPortrait ) then


UnitPanel.lua

UI/InGame/WorldView/UnitPanel.lua
0122
IconHookup(iconIndex, actionIconSize, iconAtlas, icon);
0584
IconHookup( civPortraitIndex, 128, civInfo.IconAtlas, Controls.BackgroundCivSymbol );


VictoryProgress.lua

UI/InGame/Popups/VictoryProgress.lua
0841
IconHookup( leader.PortraitIndex, iconSize, leader.IconAtlas, controlTable );


VictoryStatus.lua (G&K)

DLC/Expansion/Scenarios/SteampunkScenario/VictoryStatus.lua
0127
IconHookup( tLeader.PortraitIndex, 64, tLeader.IconAtlas, gtTokenUI[s].Portrait );



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.