OverrideAbilityIconColor
Tracking Issue: #400
Tags: events
DEPRECATED - The OverrideAbilityIconColor event allows mods to override icon color
for objective abilities or abilities that have AbilityIconColor property
set in their templates.
This event has been deprecated and should no longer be used. It is kept for backwards compatibility. Use OverrideAbilityIconColorImproved instead.
OverrideAbilityIconColor event
| Param | Value |
|---|---|
| EventID | OverrideAbilityIconColor |
| EventData | XComLWTuple |
| EventSource | XComGameState_Ability |
| NewGameState | none |
Tuple contents
| Index | Name | Type | Direction |
|---|---|---|---|
| 0 | IsObjective | bool | in |
| 1 | BackgroundColor | string | inout |
Listener template
static function EventListenerReturn OnOverrideAbilityIconColor(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_Ability AbilityState;
local XComLWTuple Tuple;
local bool IsObjective;
local string BackgroundColor;
AbilityState = XComGameState_Ability(EventSource);
Tuple = XComLWTuple(EventData);
IsObjective = Tuple.Data[0].b;
BackgroundColor = Tuple.Data[1].s;
// Your code here
Tuple.Data[1].s = BackgroundColor;
return ELR_NoInterrupt;
}