X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fmenu.qh;h=2df331950848c1dcdab9c53b63d9ebd553a3cb9a;hb=24f758c7d26747e7181317cc9c8cb77f5348c421;hp=bae23e4f783c381595cb31082ba9f74fdba572c6;hpb=ba0988ca930f50286f8cf3b6c114ebc6584964af;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/menu.qh b/qcsrc/menu/menu.qh index bae23e4f7..2df331950 100644 --- a/qcsrc/menu/menu.qh +++ b/qcsrc/menu/menu.qh @@ -1,54 +1,23 @@ -#ifndef MENU_H -#define MENU_H +#pragma once -#if defined(CSQC) -#elif defined(MENUQC) - #include "../common/util-pre.qh" - #include "sys-pre.qh" - #include "../dpdefs/menudefs.qc" - #include "../dpdefs/keycodes.qc" - #include "sys-post.qh" - #include "config.qh" - #include "../warpzonelib/mathlib.qh" - #include "../common/util.qh" - #include "../common/test.qh" - #include "oo/base.qh" - #include "../common/playerstats.qh" - #include "../common/teams.qh" - #include "../common/constants.qh" - #include "../common/mapinfo.qh" - #include "../common/campaign_common.qh" - #include "../common/weapons/weapons.qh" - #include "../common/counting.qh" - #include "../common/command/markup.qh" - #include "../common/command/rpn.qh" - #include "../common/command/generic.qh" - #include "../common/command/shared_defs.qh" - #include "../common/urllib.qh" - #include "../common/monsters/monsters.qh" - #include "command/menu_cmd.qh" -#elif defined(SVQC) -#endif +#include "draw.qh" +#include "skin.qh" -#define localcmd cmd +#include "xonotic/util.qh" -#define NULL (null_entity) -#define world NULL +#include +#include -// constants +const int GAME_ISSERVER = BIT(0); +const int GAME_CONNECTED = BIT(1); +const int GAME_DEVELOPER = BIT(2); -const float GAME_ISSERVER = 1; -const float GAME_CONNECTED = 2; -const float GAME_DEVELOPER = 4; +bool Menu_Active; +int gamestatus; -// prototypes - -float Menu_Active; -float gamestatus; - -const float S_SHIFT = 1; -const float S_CTRL = 2; -const float S_ALT = 4; +const int S_SHIFT = 1; +const int S_CTRL = 2; +const int S_ALT = 4; float frametime; float time; @@ -61,13 +30,30 @@ void m_goto(string name); .string name; entity keyGrabber; -.void(entity me, float key, float ascii) keyGrabbed; +.void(entity this, float key, float ascii) keyGrabbed; -float conwidth, conheight; // "virtual" conwidth/height values for other stuff to assume for scaling +// "virtual" conwidth/height values for other stuff to assume for scaling +float conwidth, conheight; -float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded. -void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame. -void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else. +/** you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded. */ +float preMenuInit(); +/** this is run before the menu is drawn. You may put some stuff there that has to be done every frame. */ +void preMenuDraw(); +/** this is run just after the menu is drawn (or not). Useful to draw something over everything else. */ +void postMenuDraw(); void m_sync(); -#endif \ No newline at end of file + +void draw_reset_cropped(); + +const string MENU_SOUND_CLEAR = "sound/menu/clear.wav"; +const string MENU_SOUND_CLOSE = "sound/menu/close.wav"; +const string MENU_SOUND_EXECUTE = "sound/menu/execute.wav"; +const string MENU_SOUND_FOCUS = "sound/menu/focus.wav"; +const string MENU_SOUND_OPEN = "sound/menu/open.wav"; +const string MENU_SOUND_SELECT = "sound/menu/select.wav"; +const string MENU_SOUND_SLIDE = "sound/menu/slide.wav"; +const string MENU_SOUND_WINNER = "sound/menu/winner.wav"; + +void m_play_focus_sound(); +void m_play_click_sound(string soundfile);