Geoscape_ResInfoButtonVisible

Tracking Issue: #365

Tags: ui, events

Allows overriding whether the resistance info button should be visible. Default: After the first month if any faction met and not in flight.

Geoscape_ResInfoButtonVisible event

Param Value
EventID Geoscape_ResInfoButtonVisible
EventData XComLWTuple
EventSource UIStrategyMap_HUD
NewGameState none

Tuple contents

Index Name Type Direction
0 ShouldShow bool inout
1 InFlight bool in

Listener template

static function EventListenerReturn OnGeoscape_ResInfoButtonVisible(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
    local UIStrategyMap_HUD HUDScreen;
    local XComLWTuple Tuple;
    local bool ShouldShow;
    local bool InFlight;

    HUDScreen = UIStrategyMap_HUD(EventSource);
    Tuple = XComLWTuple(EventData);

    ShouldShow = Tuple.Data[0].b;
    InFlight = Tuple.Data[1].b;

    // Your code here

    Tuple.Data[0].b = ShouldShow;

    return ELR_NoInterrupt;
}

Source code references