Vector4 (Civ5 API)

From Civilization Modding Wiki
Revision as of 16:36, 19 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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("FLuaVector.lua")


Usage

Vector4 Vector4(float i, float j = nil, float k = nil, float l = nil)


Returned Value

No description available.

Parameters

i: No description available.
j: No description available.
k: No description available.
l: No description available.


Source code samples

Redundant occurences have been removed.

Bombardment.lua

UI/InGame/Bombardment.lua
0004
local redColor = Vector4( 0.7, 0, 0, 1 );
0005
local highlightColor = Vector4( 0.7, 0.7, 0, 1 ); -- depending on the theme these may not actually be used (for example SplineBorder do not)


CityView.lua

UI/InGame/CityView/CityView.lua
1824
Events.SerialEventHexHighlight( ToHexFromGrid( Vector2( plot:GetX(), plot:GetY() ) ), false, Vector4( 0.0, 1.0, 0.0, 1 ) );
1861
Events.SerialEventHexHighlight( ToHexFromGrid( Vector2( aPurchasablePlots[i]:GetX(), aPurchasablePlots[i]:GetY() ) ), true, Vector4( 1.0, 0.0, 1.0, 1 ) );


DebugMode.lua

UI/InGame/DebugMode.lua
0037
Events.SerialEventHexHighlight( Vector2( g_iHexX, g_iHexY ), false, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
0420
Events.SerialEventHexHighlight( Vector2( g_iHexX, g_iHexY ), true, Vector4( 0.5, 0.5, 0.5, 1.0 ) );


DiploList.lua

UI/InGame/DiploList.lua
0428
local color = Vector4(primaryColor.x, primaryColor.y, primaryColor.z, 1);


FLuaVector.lua

Gameplay/Lua/FLuaVector.lua
0009
function Color( r, g, b, a )   return Vector4( r, g, b, a ); end


FoRScenarioLoadScreen.lua (G&K)

DLC/Expansion/Scenarios/FallOfRomeScenario/FoRScenarioLoadScreen.lua
0164
local primaryColorVector = Vector4( primaryColor.Red, primaryColor.Green, primaryColor.Blue, primaryColor.Alpha );
0168
local secondaryColorVector = Vector4( secondaryColor.Red, secondaryColor.Green, secondaryColor.Blue, secondaryColor.Alpha );


IconSupport.lua

UI/IconSupport.lua
0187
local primaryColorVector   = Vector4( primaryColor.Red, primaryColor.Green, primaryColor.Blue, primaryColor.Alpha );
0189
local secondaryColorVector   = Vector4( secondaryColor.Red, secondaryColor.Green, secondaryColor.Blue, secondaryColor.Alpha );


InGame.lua

UI/InGame/InGame.lua
0032
local workerSuggestHighlightColor = Vector4( 0.0, 0.5, 1.0, 0.65 );
0404
local giftUnitColor = Vector4( 1.0, 1.0, 0.0, 0.65 );
0423
Events.SerialEventHexHighlight( hexID, true, Vector4( 1.0, 1.0, 0.0, 1 ), genericUnitHexBorder );
0430
local embarkColor = Vector4( 1.0, 1.0, 0.0, 0.65 );
0473
local upgradeColor = Vector4( 0.0, 1.0, 0.5, 0.65 );


InGame.lua (G&K)

DLC/Expansion/UI/InGame/InGame.lua
0658
local vGiftTileImprovementColor = Vector4( 1.0, 0.0, 1.0, 1.0 );


UnitFlagManager.lua

UI/InGame/UnitFlagManager.lua
0404
self.m_Instance.HealthBar:SetFGColor( Vector4( 0, 1, 0, 1 ) );
0407
self.m_Instance.HealthBar:SetFGColor( Vector4( 1, 1, 0, 1 ) );
0409
self.m_Instance.HealthBar:SetFGColor( Vector4( 1, 0, 0, 1 ) );
1042
local worldPos = Vector4( GridToWorld( pPlot:GetX(), pPlot:GetY() ) );


UnitMemberOverlay.lua

UI/InGame/UnitMemberOverlay.lua
0129
o:SetTargetColor( Vector4(0.5, 0.5, 0.5, 1.0) );
0367
member:SetTargetColor( Vector4(0.5, 0.5, 0.5, 1.0) );
0595
g_TargetColors[0] = Vector4(1.0, 0.0, 0.0, 1.0);
0596
g_TargetColors[1] = Vector4(1.0, 1.0, 0.0, 1.0);
0597
g_TargetColors[2] = Vector4(0.5, 1.0, 0.0, 1.0);
0598
g_TargetColors[3] = Vector4(0.0, 1.0, 1.0, 1.0);
0599
g_TargetColors[4] = Vector4(0.5, 0.5, 1.0, 1.0);
0600
g_TargetColors[5] = Vector4(1.0, 0.5, 0.0, 1.0);
0601
g_TargetColors[6] = Vector4(0.0, 1.0, 0.0, 1.0);
0602
g_TargetColors[7] = Vector4(0.0, 0.0, 1.0, 1.0);
0603
g_TargetColors[8] = Vector4(0.5, 0.0, 1.0, 1.0);
0604
g_TargetColors[9] = Vector4(0.5, 0.0, 0.5, 1.0);
0605
g_TargetColors[10] = Vector4(0.5, 0.25, 0.0, 1.0);
0606
g_TargetColors[11] = Vector4(0.0, 0.25, 0.0, 1.0);
0607
g_TargetColors[12] = Vector4(0.5, 0.0, 0.0, 1.0);
0608
g_TargetColors[13] = Vector4(0.25, 0.5, 0.5, 1.0);
0609
g_TargetColors[14] = Vector4(0.0, 0.0, 0.5, 1.0);
0610
g_TargetColors[15] = Vector4(0.5, 0.0, 0.25, 1.0);


WorldView.lua

UI/InGame/WorldView/WorldView.lua
0006
local turn1Color = Vector4( 0, 1, 0, 0.25 );
0007
local turn2Color = Vector4( 1, 1, 0, 0.25 );
0008
local turn3PlusColor = Vector4( 0.25, 0, 1, 0.25 );
0009
local maxRangeColor = Vector4( 1, 1, 1, 0.25 );



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.