Skip to content

Commit

Permalink
MENU: Enable drawing in CSQC, Pause Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
MotoLegacy committed Oct 17, 2024
1 parent 12c092f commit 611b8aa
Show file tree
Hide file tree
Showing 14 changed files with 274 additions and 2,537 deletions.
15 changes: 13 additions & 2 deletions progs/csqc.src
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@

#pragma includedir "../source/client/"
#pragma includedir "../source/shared/"
#pragma includedir "../source/menu/"

#includelist
defs/fte.qc
defs/menu_defs.qc
shared_defs.qc
draw.qc

sui_sys.qc
m_menu.qc
menu_paus.qc // Pause Menu
menu_opts.qc // Options Menu
menu_vide.qc // Video Menu
menu_audi.qc // Audio Menu
menu_ctrl.qc // Control Menu
menu_gpad.qc // Gamepad Menu

sound_enhanced.qc
weapon_stats.qc
defs/custom.qc
draw.qc
menu.qc
achievements.qc
hud.qc
chat.qc
Expand Down
2 changes: 1 addition & 1 deletion progs/menu.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#includelist
defs/fte.qc
defs/custom.qc
defs/menu_defs.qc
../client/draw.qc
sui_sys.qc
m_menu.qc
Expand Down
109 changes: 0 additions & 109 deletions source/client/defs/custom.qc
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,8 @@

#pragma warning disable Q302

vector cursor_pos; /* Current mouse cursor position, updated in csqc_inputevent */
float g_width, g_height; /* Globals for screen width and height */

float walk;

//Menu stuff
float in_menu; //what menu are we in
float time_in_menu;

// Loading screen definitions
float in_loadscreen;
float loadscreen_timetrigger;
string loadscreen_mapname;
string loadscreen_maptitle;
string loadscreen_tip;

float weapon;

float tracercounter;
Expand All @@ -53,24 +39,6 @@ float tracercounter;
entity cl_viewent;
entity cl_viewent2;

const float MENU_NONE = 0;
const float MENU_MAIN = 1;
const float MENU_SINGLE = 2;
const float MENU_MULTI = 4;
const float MENU_SETTINGS = 8;
const float MENU_ABOUT = 16;
const float MENU_JOIN = 32;
const float MENU_PAUSE = 64;
const float MENU_IGS = 128;
const float MENU_RES = 256;
const float MENU_GSETTINGS = 512;
const float MENU_CSETTINGS = 1024;
const float MENU_CUSTOMS = 2048;
const float MENU_ACHIEVEMENTS = 4096;
const float MENU_CONSETTINGS = 8192;
const float MENU_AUDSETTINGS = 16384;
const float MENU_CREATE = 32768;

float matchmake_enabled;
float double_tap_version;

Expand Down Expand Up @@ -159,10 +127,6 @@ float screenflash_starttime;
.float points;
.float kills;

float menu_initialized;

float customs_interact;

vector camang; // used for punches

//world text
Expand All @@ -174,30 +138,8 @@ string person;
//custom hud
string huddir;

//this just cleans up settings a bit..
#define S_ENABLED "Enabled"
#define S_DISABLED "Disabled"
float wasigs;

//controls
#define MAX_BINDS 14

float editBind[MAX_BINDS];
string buttonBind[MAX_BINDS];
string tempBind[MAX_BINDS];

// resolution
float aspectratio;
float fullscreenval;
float active_swidth;
float active_sheight;

int platform_is_web;

#define OPTION_EXE_ONLY 0
#define OPTION_WEB_ONLY 1
#define OPTION_WEB_AND_EXE 2

// Stopwatch server time counter
float stopwatch_sec;
int stopwatch_min;
Expand All @@ -217,7 +159,6 @@ float GPButtonHeldBeginTime[24]; // Tracks time button down event is called, to
float last_input_deviceid; // The Device ID of the input hardware that last called CSQC_InputEvent, to target it directly.

string build_datetime;
#define VERSION_STRING "v1.0"

vector gun_kick;

Expand All @@ -244,53 +185,3 @@ string zombie_skins[] =
"models/ai/zal(.mdl",
"models/ai/zar(.mdl"
};

//
// Screen sizes, self-explanatory.
//
var struct screenres_s
{
float width;
float height;
};

screenres_s screen_resolution_5x4[] =
{
{1280, 1024}
};

screenres_s screen_resolution_4x3[] =
{
{640, 480},
{800, 600},
{1024, 768}
};

screenres_s screen_resolution_16x9[] =
{
{640, 360},
{1280, 720},
{1360, 768},
{1366, 768},
{1536, 864},
{1600, 900},
{1920, 1080},
{2048, 1152},
{2560, 1440},
{3840, 2160}
};

screenres_s screen_resolution_16x10[] =
{
{1280, 800},
{1440, 900},
{1680, 1050},
{1920, 1200},
{2560, 1600}
};

screenres_s screen_resolution_21x9[] =
{
{2560, 1080},
{3840, 1440}
};
17 changes: 9 additions & 8 deletions source/client/hud.qc
Original file line number Diff line number Diff line change
Expand Up @@ -1676,16 +1676,17 @@ void(float width, float height) HUD_Achievements = {

string(float index) GetButtonString =
{
// place holder
if (index == 100)
return "LMOUSE";
else if (index == 101)
return "RMOUSE";
// // place holder
// if (index == 100)
// return "LMOUSE";
// else if (index == 101)
// return "RMOUSE";

tokenize(findkeysforcommandex(buttonBind[index]));
string temps = strtoupper(argv(0));
// tokenize(findkeysforcommandex(buttonBind[index]));
// string temps = strtoupper(argv(0));

return temps;
// return temps;
return "LMOUSE";
}

void(float width, float height) HUD_Waypoint =
Expand Down
Loading

0 comments on commit 611b8aa

Please sign in to comment.