# Set Timer For Timer Window
Grammar — Set timer for window|Timer Window to timer
Flags —Native
|Action
Sets the timer for the specified timer window.
# Arguments
int
<preset::TimerWindow> — Windowtimer
— Timer
Returns — void
native void TimerWindowSetTimer(
int inWindow,
timer inTimer,
);
# Related
Category: Timer / Timer Windows
- Create Timer Window —
int
<preset::TimerWindow> — TimerWindowCreate - Last Created Timer Window —
int
<preset::TimerWindow> — TimerWindowLastCreated - Show/Hide Timer Window —
void
— TimerWindowShow - Timer Window Is Visible —
bool
— TimerWindowVisible - Destroy Timer Window —
void
— TimerWindowDestroy - Anchor Timer Window —
void
— TimerWindowSetAnchor - Move Timer Window —
void
— TimerWindowSetPosition - Reset Timer Window Position —
void
— TimerWindowResetPosition - Set Title For Timer Window —
void
— TimerWindowSetTitle - Set Timer For Timer Window —
void
— TimerWindowSetTimer - Set Time Format For Timer Window —
void
— TimerWindowSetFormat - Set Style For Timer Window —
void
— TimerWindowSetStyle - Set Gap Width For Timer Window —
void
— TimerWindowSetGapWidth - Set Height For Timer Window —
void
— TimerWindowSetFixedHeight - Set Timer Window Color —
void
— TimerWindowSetColor - Show/Hide Timer Window Border —
void
— TimerWindowShowBorder - Show/Hide Timer Window Progress Bar —
void
— TimerWindowShowProgressBar - Set Timer Window Progress Color —
void
— TimerWindowSetProgressColor - Set Timer Window Image Type —
void
— TimerWindowSetImageType - Elapsed Time Of Timer —
fixed
— TimerGetElapsed - Remaining Time Of Timer —
fixed
— TimerGetRemaining
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:5125
// Implementation
libCOUI_gv_cU_TimerWindowTimer = lp_timer;
TimerWindowSetTimer(lp_window, lp_timer);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:8791
}
TimerWindowSetTimer(TimerWindowLastCreated(), TimerLastStarted());
if ((TimerGetRemaining(libCOUI_gv_cU_TimerWindowTimer) <= libCOUI_gv_cU_TimerWindowDangerThreshold) && (libCOUI_gv_cU_TimerWindowInDanger == false)) {
libCOUI_gv_cU_TimerWindowInDanger = true;