UIStrategyPolicy_MiscEvents

Tracking Issue: #986

Tags: ui, events

UIStrategyPolicy is the screen that allows players to allocate resistance orders at end of "month". The Community Highlander adds the following events to that screen so mods have more options for modifying it without overriding it entirely.

See the tracking issue for background on why these events were added, and hence a potential use for them.

Note You'll need to look at the code for UIStrategyPolicy in order to understand when these events are fired, and hence which ones you'll need for your own customisations.

UIStrategyPolicy_PreRefreshAllDecks event

Param Value
EventID UIStrategyPolicy_PreRefreshAllDecks
EventData none
EventSource UIStrategyPolicy
NewGameState none

Listener template

static function EventListenerReturn OnUIStrategyPolicy_PreRefreshAllDecks(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyPolicy StrategyPolicy;

    StrategyPolicy = UIStrategyPolicy(EventSource);

    // Your code here

    return ELR_NoInterrupt;
}

UIStrategyPolicy_PostRealizeColumn event

Param Value
EventID UIStrategyPolicy_PostRealizeColumn
EventData UIList
EventSource UIStrategyPolicy
NewGameState none

Listener template

static function EventListenerReturn OnUIStrategyPolicy_PostRealizeColumn(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyPolicy StrategyPolicy;
    local UIList Column;

    StrategyPolicy = UIStrategyPolicy(EventSource);
    Column = UIList(EventData);

    // Your code here

    return ELR_NoInterrupt;
}

UIStrategyPolicy_PreSelect event

Param Value
EventID UIStrategyPolicy_PreSelect
EventData UIStrategyPolicy_Card
EventSource UIStrategyPolicy
NewGameState none

Listener template

static function EventListenerReturn OnUIStrategyPolicy_PreSelect(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyPolicy StrategyPolicy;
    local UIStrategyPolicy_Card TargetCard;

    StrategyPolicy = UIStrategyPolicy(EventSource);
    TargetCard = UIStrategyPolicy_Card(EventData);

    // Your code here

    return ELR_NoInterrupt;
}

UIStrategyPolicy_PreClearSelection event

Param Value
EventID UIStrategyPolicy_PreClearSelection
EventData none
EventSource UIStrategyPolicy
NewGameState none

Listener template

static function EventListenerReturn OnUIStrategyPolicy_PreClearSelection(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyPolicy StrategyPolicy;

    StrategyPolicy = UIStrategyPolicy(EventSource);

    // Your code here

    return ELR_NoInterrupt;
}

UIStrategyPolicy_DraggingStarted event

Param Value
EventID UIStrategyPolicy_DraggingStarted
EventData none
EventSource UIStrategyPolicy
NewGameState none

Listener template

static function EventListenerReturn OnUIStrategyPolicy_DraggingStarted(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyPolicy StrategyPolicy;

    StrategyPolicy = UIStrategyPolicy(EventSource);

    // Your code here

    return ELR_NoInterrupt;
}

UIStrategyPolicy_DraggingEnded event

Param Value
EventID UIStrategyPolicy_DraggingEnded
EventData none
EventSource UIStrategyPolicy
NewGameState none

Listener template

static function EventListenerReturn OnUIStrategyPolicy_DraggingEnded(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyPolicy StrategyPolicy;

    StrategyPolicy = UIStrategyPolicy(EventSource);

    // Your code here

    return ELR_NoInterrupt;
}

Source code references