# Anchor Timer Window

Grammar — Anchor window|Timer Window to the anchor of the screen, offset by (xOffset, yOffset)
FlagsNative | Action

The timer window will be automatically positioned relative to the screen using the given anchor and offset.

# Arguments

  • int<preset::TimerWindow> — Window
  • int<preset::Anchor> — Anchor
  • int — X Offset
  • int — Y Offset

Returns — void

native void TimerWindowSetAnchor(
	int inWindow,
	int inAnchor,
	int inOffsetX,
	int inOffsetY,
);

Category: Timer / Timer Windows

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:2613

    TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageProgressFrame, c_triggerImageTypeNineSlice);
    TimerWindowSetFixedHeight(TimerWindowLastCreated(), 59);
    TimerWindowSetAnchor(TimerWindowLastCreated(), c_anchorTop, 0, -12);
    if ((lp_positiveNegativeOptions == libSwaC_ge_CampaignTimerPositiveNegativeOptions_Positive)) {
        if ((PlayerRace(1) == "Terr")) {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:5263

    // Automatic Variable Declarations
    // Implementation
    TimerWindowSetAnchor(lp_timerWindow, c_anchorTopRight, 0, 50);
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:3713

void libNCUI_gf_RepositionTimerWindow (int lp_timerWindow) {
    // Implementation
    TimerWindowSetAnchor(lp_timerWindow, c_anchorTopRight, 0, 50);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:5131

    // Automatic Variable Declarations
    // Implementation
    TimerWindowSetAnchor(lp_timerWindow, c_anchorTopRight, 0, 50);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8751

    while (true) {
        if ((libCOUI_gv_cU_BB_Panel != c_invalidDialogControlId) && ((DialogControlIsVisible(libCOUI_gv_cU_BB_Panel, 1) == true) || (DialogControlIsVisible(libCOUI_gv_cU_BB_Panel, 2) == true))) {
            TimerWindowSetAnchor(libCOUI_gv_cU_TimerWindow, c_anchorTopRight, 0, 175);
        }
        else {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:8754

        }
        else {
            TimerWindowSetAnchor(libCOUI_gv_cU_TimerWindow, c_anchorTopRight, 0, 50);
        }
        if ((libCOMI_gf_GameIsOver() == true)) {

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:1607

    TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageProgressFrame, c_triggerImageTypeNineSlice);
    TimerWindowSetFixedHeight(TimerWindowLastCreated(), 59);
    TimerWindowSetAnchor(TimerWindowLastCreated(), c_anchorTop, 0, -12);
    if ((lp_positiveNegativeOptions == libA3DDD02B_ge_CampaignTimerPositiveNegativeOptions_Positive)) {
        if ((PlayerRace(1) == "Terr")) {