Here a little tutorial to add a minimizer command in the console. (Can be use too in ui script)
cgame/cg_consolecmds.c
Index: cg_consolecmds.c
===================================================================
--- cg_consolecmds.c (Revision 379)
+++ cg_consolecmds.c (Arbeitskopie)
@@ -1185,6 +1185,17 @@
trap_Cvar_Set("cg_spawnTimer_set", va("%d", msec/1000));
}
+#ifdef _WIN32
+//sCenna.|cHaos
+static void CG_Minimize(void) {
+ HWND wnd;
+
+ if (wnd = GetForegroundWindow()) {
+ ShowWindow(wnd, SW_MINIMIZE);
+ }
+}
+#endif
+
typedef struct {
char *cmd;
void (*function)(void);
@@ -1309,7 +1320,9 @@
//quad: spawntimer
{ "timerSet", CG_TimerSet_f },
{ "resetTimer", CG_ResetTimer_f },
-
+ #ifdef _WIN32
+ { "minimize", CG_Minimize }, //sCenna.|cHaos
+ #endif
};
And here a little example to use these for ui script:
BUTTONPIC( 600, 1, 12, 12, “ui/assets/mini”, 0.8 0.8 0.8 0.8 , 1 1 1 1, close ingame_overbar; close ingame_main; exec “minimize” )
How i sayed above, that only works under Windoof, i dont know how in Unix or Mac… (I dont use Unix, only for servers, but who have a idea, post it :D)
Have Fun 
Edit: Maybe i take a look to minimize in a tray…