# Set Style For Timer Window
Grammar — Set window|Timer Window style to style (use elapsed|Elapsed/Remaining time)
Flags —Native
|Action
Sets or changes the style of the specified timer window.
# Arguments
int
<preset::TimerWindow> — Windowint
<preset::TimerWindowStyle> — Stylebool
<preset::ElapsedRemainingOption> — Elapsed
Returns — void
native void TimerWindowSetStyle(
int inWindow,
int inStyle,
bool inShowElapsed,
);
# 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
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:803
TimerWindowCreate(TimerLastStarted(), StringExternal("Param/Value/1973AF56"), true, false);
gv_mainTimerWindow = TimerWindowLastCreated();
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetFormat(gv_mainTimerWindow, StringToText("<mintotal/>:<sec2/>"));
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(100.00, 0.00, 0.00), 0.0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:1055
TimerStart(gv_mainTimer, gv_dAY_DURATION, false, c_timeGame);
TimerWindowSetTitle(gv_mainTimerWindow, TextReplaceWord(StringExternal("Param/Value/6B0A5E41"), StringExternal("Param/Value/C3A5EF7D"), IntToText(gv_day), c_stringReplaceAll, c_stringCase));
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(0.00, 100.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thanson02.sc2map/MapScript.galaxy:1074
TimerStart(gv_mainTimer, gv_nIGHT_DURATION, false, c_timeGame);
TimerWindowSetTitle(gv_mainTimerWindow, TextReplaceWord(StringExternal("Param/Value/749F57BE"), StringExternal("Param/Value/7E7BF9AB"), IntToText(gv_night), c_stringReplaceAll, c_stringCase));
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(100.00, 0.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:2452
TriggerExecute(gt_KerriganRecalculateTimer, true, true);
TimerWindowCreate(gv_kerrigansETATIMER, StringExternal("Param/Value/6A412D92"), true, false);
TimerWindowSetStyle(TimerWindowLastCreated(), c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetFormat(TimerWindowLastCreated(), StringToText("<mintotal/>:<sec2/>"));
TimerWindowSetColor(TimerWindowLastCreated(), c_timerWindowColorTime, Color(0.00, 100.00, 0.00), 0.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson02.sc2map — MapScript.galaxy:803
TimerWindowCreate(TimerLastStarted(), StringExternal("Param/Value/1973AF56"), true, false);
gv_mainTimerWindow = TimerWindowLastCreated();
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetFormat(gv_mainTimerWindow, StringToText("<mintotal/>:<sec2/>"));
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(100.00, 0.00, 0.00), 0.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson02.sc2map — MapScript.galaxy:1055
TimerStart(gv_mainTimer, gv_dAY_DURATION, false, c_timeGame);
TimerWindowSetTitle(gv_mainTimerWindow, TextReplaceWord(StringExternal("Param/Value/6B0A5E41"), StringExternal("Param/Value/C3A5EF7D"), IntToText(gv_day), c_stringReplaceAll, c_stringCase));
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(0.00, 100.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson02.sc2map — MapScript.galaxy:1074
TimerStart(gv_mainTimer, gv_nIGHT_DURATION, false, c_timeGame);
TimerWindowSetTitle(gv_mainTimerWindow, TextReplaceWord(StringExternal("Param/Value/749F57BE"), StringExternal("Param/Value/7E7BF9AB"), IntToText(gv_night), c_stringReplaceAll, c_stringCase));
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(100.00, 0.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2map — MapScript.galaxy:2452
TriggerExecute(gt_KerriganRecalculateTimer, true, true);
TimerWindowCreate(gv_kerrigansETATIMER, StringExternal("Param/Value/6A412D92"), true, false);
TimerWindowSetStyle(TimerWindowLastCreated(), c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetFormat(TimerWindowLastCreated(), StringToText("<mintotal/>:<sec2/>"));
TimerWindowSetColor(TimerWindowLastCreated(), c_timerWindowColorTime, Color(0.00, 100.00, 0.00), 0.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:2421
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/EA90CCC8"));
TimerStart(gv_mainTimer, gv_gasOn_DURATION, false, c_timeAI);
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(0.00, 100.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map/MapScript.galaxy:2450
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/275F6D3F"));
TimerStart(gv_mainTimer, gv_gasOff_DURATION, false, c_timeAI);
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(100.00, 0.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:2421
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/EA90CCC8"));
TimerStart(gv_mainTimer, gv_gasOn_DURATION, false, c_timeAI);
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(0.00, 100.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid01.sc2map — MapScript.galaxy:2450
UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/275F6D3F"));
TimerStart(gv_mainTimer, gv_gasOff_DURATION, false, c_timeAI);
TimerWindowSetStyle(gv_mainTimerWindow, c_timerWindowStyleHorizontalTitleTime, false);
TimerWindowSetColor(gv_mainTimerWindow, c_timerWindowColorTitle, Color(100.00, 0.00, 0.00), 0.0);
TimerWindowShow(gv_mainTimerWindow, PlayerGroupAll(), true);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:5232
TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageBorder, c_triggerImageTypeNineSlice);
TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageProgressFrame, c_triggerImageTypeNineSlice);
TimerWindowSetStyle(TimerWindowLastCreated(), c_timerWindowStyleVerticalTitleTime, false);
TimerWindowSetFixedHeight(TimerWindowLastCreated(), 80);
libVCUI_gf_RepositionTimerWindow(TimerWindowLastCreated());
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:3683
TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageBorder, c_triggerImageTypeNineSlice);
TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageProgressFrame, c_triggerImageTypeNineSlice);
TimerWindowSetStyle(TimerWindowLastCreated(), c_timerWindowStyleVerticalTitleTime, false);
TimerWindowSetFixedHeight(TimerWindowLastCreated(), 80);
libNCUI_gf_RepositionTimerWindow(TimerWindowLastCreated());
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:5109
TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageBorder, c_triggerImageTypeNineSlice);
TimerWindowSetImageType(TimerWindowLastCreated(), c_timerWindowImageProgressFrame, c_triggerImageTypeNineSlice);
TimerWindowSetStyle(TimerWindowLastCreated(), c_timerWindowStyleVerticalTitleTime, false);
TimerWindowSetFixedHeight(TimerWindowLastCreated(), 80);
libCOUI_gf_RepositionTimerWindow(TimerWindowLastCreated());