remove ui

master
Daniel Kolesa 2020-04-23 17:12:16 +02:00
parent 01f2c8e9b0
commit f835b6e046
11 changed files with 20 additions and 4183 deletions

View File

@ -11,7 +11,7 @@ name "unnamed"
///////////////////////////////////////////////////////////////////////////////
miniconfilter 0x300 // display chat and team chat in mini-console
confilter (&~ 0xFFF $miniconfilter) // don't display other player frags or mini-console stuff in console
fullconsole = 0
///////////////////////////////////////////////////////////////////////////////
// Universal Mouse Scrollwheel //

View File

@ -1,536 +0,0 @@
// standard menu definitions
// don't modify, add personal menus to autoexec.cfg instead
exec "config/ui/lib.cfg" // UI library
exec "config/ui/style.cfg" // Styles
exec "config/ui/edithud.cfg" // Edit HUD
exec "config/ui/fkey.cfg" // F# Key Menus
exec "config/ui/serverbrowser.cfg" // Server Browser
exec "config/ui/stats.cfg" // Player Stats
exec "config/ui/options.cfg" // Options Menu
reui = [
exec "config/ui.cfg"
]
togglemainmenu = [|| hidetopui [toggleui main]]
bind ESCAPE [togglemainmenu]
///////////////////////////////////////////////////////////////////////////////
// Main //
///////////////////////////////////////////////////////////////////////////////
UImenu "main" [
uieschide (! $mainmenu)
uihlist 0 [
uivlist 0 [
UIbutton "hold2" [uitext "Server Browser" 0.65] 0.2 0.04 [hideui "main" ; showui "server_browser"]
UIbutton "hold2" [uitext "Map Browser" 0.65] 0.2 0.04 [hideui "main" ; showui "map_browser"]
uifill 0.2 0.02 [UIbar 1]
UIbutton "hold2" [uitext "Player Setup" 0.65] 0.2 0.04 [hideui "main" ; showui "player_setup"]
UIbutton "hold2" [uitext "Options" 0.65] 0.2 0.04 [hideui "main" ; showui "options"]
if $mainmenu [
UIbutton "hold2" [uitext "Credits" 0.65] 0.2 0.04 [hideui "main" ; showui "credits"]
]
uifill 0.2 0.02 [UIbar 1]
UIbutton "hold2" [uitext "Quit" 0.65] 0.2 0.04 [quit]
]
]
]
///////////////////////////////////////////////////////////////////////////////
// Player Setup //
///////////////////////////////////////////////////////////////////////////////
UI_pmodel = 0
UI_pteam = 0
UI_pweapon = 1
UImenu "player_setup" [
uihlist 0.01 [
uivlist 0 [
uiplayerpreview $UI_pmodel (case $UI_pteam 0 $playercolor 1 $playercolorazul 2 $playercolorrojo) $UI_pteam $UI_pweapon 0.4 0.5 [
style_generic_default
uiclamp* 1 1 1 1
]
uihlist 0 [
uiclamp 1 1
UIbutton "" [
UIradio [= $UI_pweapon 0] 0.016
uitext "Railgun" 0.6
] 0 0.032 [UI_pweapon = 0] -1
UIbutton "" [
UIradio [= $UI_pweapon 1] 0.016
uitext "Pulse Rifle" 0.6
] 0 0.032 [UI_pweapon = 1] -1
uiclamp* 1 1
]
]
uivlist 0.01 [
uialign -2 -1
uivlist 0.0037 [
uitext "Name" 0.7
uifield name 15 [] 0.7 [uioutline (uifocus? $c_focus $c_line); uiclamp- 1 1 1 1]
]
looplist3 v t l [
"playercolor" 0 9
"playercolorazul" 1 4
"playercolorrojo" 2 4
] [
uivlist 0.0037 [
case $t 1 [
uitext "^f8Azul" 0.7
] 2 [
uitext "^f3Rojo" 0.7
] () [uitext "Solo" 0.7]
uigrid (? (< $t 1) 3 2) 0.005 0.005 [
local color
uihover [UI_pteam = $t]
loop i $l [
color = (getplayercolor $i $t)
uicolor $color 0.0458 0.0458 [
uioutline (? (= $$v $i) $c_fill $color)
uiclamp- 1 1 1 1
uipress [$v $i]
]
]
]
]
]
]
]
] [] [] [] "Player Setup"
///////////////////////////////////////////////////////////////////////////////
// Credits //
///////////////////////////////////////////////////////////////////////////////
UI_creditlist = [
UItitle [
uispace 0.015 0 [
uialign -1 -2
uihlist 0.01 [
uiimage "media/interface/cube.png" 0.03 0.03
uitext [@@@@arg1] 0.7
]
]
] 0 0.032
uispace 0.03 0 [
uifill 0 0 [
uiclamp 1 1
uimodhgradient 0xC0C0C0 0xFFFFFF
uiclamp- 1 1 1 1
uispace 0.02 0.01 [
uialign -1 -2
uivlist 0 [
looplist i $arg2 [
uiwraptext (strreplace (strreplace $i "^"" "^fs^f8^"" "^"^fr") ": " "^f4: ") 0.69 0.6
]
uialign* -1 -2
]
]
]
]
uifill 0 0.02
]
UImenu "credits" [
uihlist 0.01 [
uiscroll 0.8 0.8 [
uifill 0.77
uivlist 0.0008 [
uiclamp 1 1
uialign -2 -1
// Alphabetized by alias
UI_creditlist "Project" [
[Lee "eihrul" Salzman : Code Gatekeeper]
[Shane "Nieb" Nieb : Media Gatekeeper]
]
UI_creditlist "Code" [
[Lee "eihrul" Salzman]
[Benjamin Segovia]
[Kevin "Hirato Kirata" Meyer]
]
UI_creditlist "Art" [
[Shane "Nieb" Nieb : Playermodel, Mapmodels, Textures]
]
UI_creditlist "Sound" [
[Dylan "Dacker" Ackerly]
[Shane "Nieb" Nieb]
[Sławomir "Q009" Błauciak]
[Jannic "Uphys" Böhme]
]
UI_creditlist "Cartography" [
[Dylan "Dacker" Ackerly : complex]
[Shane "Nieb" Nieb : complex, test_ctf]
[Sławomir "Q009" Błauciak : steelribs]
[Jack "Pritchard" Viney : alphacorp]
[Kurt Kessler : waterworks]
[James 'Skur' Rucks : reflection]
[Yannick 'Snowy' Weber : reflection]
]
UI_creditlist "Miscellaneous" [
[Kevin "Hirato Kirata" Meyer : CubeScript Documentation]
[Shane "Nieb" Nieb : UI Design, Tesseract Website]
[Daniel "q66" Kolesa : Build-system Improvements]
["RaZgRiZ" : UI Documentation, UI Design]
]
UI_creditlist "Cube Engine 2" [
[Wouter "Aardappel" van Oortmerssen]
[Lee "eihrul" Salzman]
[Mike "Gilt" Dysart]
[Robert "baby-rabbit" Pointon]
[Quinton "Quin" Reeves]
[John "geartrooper" Siar]
[and others...]
"http://sauerbraten.org/"
]
uiclamp* 1 1
]
]
UIvscroll 0.02 0.8 2.0
]
] [] [] [] "Tesseract Contributors"
///////////////////////////////////////////////////////////////////////////////
// Master //
///////////////////////////////////////////////////////////////////////////////
menu_master = []
UImenu "master" [
uifill 0 0 [
uivlist 0 [
uihlist 0.01 [
if (ismaster $getclientnum) [
UIbutton "" [uitext "Relinquish Master" 0.65] 0.24 0.06 [setmaster 0]
] [
if (issomeoneelsemaster) [
UIbutton "" [uitext "^f4Claim Master" 0.65] 0.24 0.06 []
] [
UIbutton "" [uitext "Claim Master" 0.65] 0.24 0.06 [setmaster 1]
]
]
if (ismaster $getclientnum) [
uigrid 2 0 0 [
looplist2 n i [
"^f0open ^f4(0)" 0 "^f0veto ^f4(1)" 1
"^f2locked ^f4(2)" 2 "^f3private ^f4(3)" 3
] [
UIbutton "" [
UIradio [= $getmastermode $i] 0.016
uitext $n 0.6
] 0.16 0.03 [mastermode $i] -1
]
]
uivlist 0 [
UIbutton "" [uitext "Clearbans" 0.65] 0.16 0.03 [clearbans]
UIbutton "" [uitext "Bots" 0.65] 0.16 0.03 [hideui "main" ; showui "bots"]
]
] [
uifill 0.49
]
]
uifill 0 0.02 [UIbar 1 ; uiclamp 1 1 1 1]
if (ismaster $getclientnum) [
if (> $getmode 2) [UI_clientlistteam] [UI_clientlistsolo]
] [
if (> $getmode 2) [uifill 1.43 0.312] [uifill 0 0.624]
]
]
]
] [] [] [] "Master"
UI_clientlistsolo = [
uihlist 0 [
uiscroll 0.71 0.624 [
uifill 0.71 0.624 [
uitable 0 0 [
UI_mlc = 0
looplist cn (listclients 1 0) [
uitablerow [
uifill 0.078 0.026 [
uicolortext (concatword $cn " : ") (scoreboardstatus $cn) 0.57
uialign- 1
]
uifill 0.362 0.026 [
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
uialign- -1
]
if (= $cn $getclientnum)[
uifill 0.077 0.026
] [
UIbutton "hold2" [
UItriangle 0xCCCCCC 0.01 0.01 270
uitext "Kick" 0.57
] 0.077 0.026 [kick @cn] -1
]
UIbutton "hold2" [
UIradio [= (isspectator $cn) 1] 0.016
uitext "Spec" 0.57
] 0.087 0.026 [spectator @(= (isspectator $cn) 0) @cn] -1
UIbutton "hold2" [
UIradio [= (ismaster $cn) 1] 0.016
uitext (concatword (? (isadmin $cn) "Admin" (? (isauth $cn) "Auth" "Master"))) 0.57
] 0.105 0.026 [setmaster (? (ismaster $cn) 0 1) @cn] -1
] [
UI_mlc = (! $UI_mlc)
uicolor (? $UI_mlc 0x99323232 0x99262626) 0 0 [
uiclamp 1 1 1 1
pushif highlight (scoreboardhighlight $cn) [
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
]
]
]
]
]
uialign* -1 -1
]
]
uifill 0.01
UIvscroll 0.02 0.624 1.56
]
]
UI_clientlistteam = [
uihlist 0 [
uiscroll 1.4 0.312 [
uifill 1.4 0.312 [
uihlist 0 [
uialign 0 -1
uitable 0 0 [
uifill 0.695
UI_mlc = 0
looplist cn (listclients 1 0) [
if (= (getclientteam $cn) 1) [
uitablerow [
uifill 0.078 0.026 [
uicolortext (concatword $cn " : ") (scoreboardstatus $cn) 0.57
uialign- 1
]
uifill 0.26 0.026 [
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
uialign- -1
]
if (= $cn $getclientnum)[
uifill 0.077 0.026
] [
UIbutton "hold2" [
UItriangle 0xCCCCCC 0.01 0.01 270
uitext "Kick" 0.57
] 0.077 0.026 [kick @cn] -1
]
UIbutton "hold2" [
UItriangle 0xCCCCCC 0.01 0.01 270
uitext "Team" 0.57
] 0.0875 0.026 [setteam @cn @(? (=s (getclientteam $cn) "1") "2" "1")] -1
UIbutton "hold2" [
UIradio [= (isspectator $cn) 1] 0.016
uitext "Spec" 0.57
] 0.087 0.026 [spectator @(= (isspectator $cn) 0) @cn] -1
UIbutton "hold2" [
UIradio [= (ismaster $cn) 1] 0.016
uitext (concatword (? (isadmin $cn) "Admin" (? (isauth $cn) "Auth" "Master"))) 0.57
] 0.105 0.026 [setmaster (? (ismaster $cn) 0 1) @cn] -1
] [
UI_mlc = (! $UI_mlc)
uicolor (? $UI_mlc 0x99333b40 0x99262b33) 0 0 [
uiclamp 1 1 1 1
pushif highlight (scoreboardhighlight $cn) [
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
]
]
]
]
]
]
uifill 0.01
uitable 0 0 [
uifill 0.695
UI_mlc = 0
looplist cn (listclients 1 0) [
if (= (getclientteam $cn) 2) [
uitablerow [
uifill 0.078 0.026 [
uicolortext (concatword $cn " : ") (scoreboardstatus $cn) 0.57
uialign- 1
]
uifill 0.26 0.026 [
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
uialign- -1
]
if (= $cn $getclientnum)[
uifill 0.077 0.026
] [
UIbutton "hold2" [
UItriangle 0 0.01 0.01 270
uitext "Kick" 0.57
] 0.077 0.026 [kick @cn] -1
]
UIbutton "hold2" [
UItriangle 0 0.01 0.01 270
uitext "Team" 0.57
] 0.0875 0.026 [setteam @cn @(? (=s (getclientteam $cn) "1") "2" "1")] -1
UIbutton "hold2" [
UIradio [= (isspectator $cn) 1] 0.016
uitext "Spec" 0.57
] 0.087 0.026 [spectator @(= (isspectator $cn) 0) @cn] -1
UIbutton "hold2" [
UIradio [= (ismaster $cn) 1] 0.016
uitext (concatword (? (isadmin $cn) "Admin" (? (isauth $cn) "Auth" "Master"))) 0.57
] 0.105 0.026 [setmaster (? (ismaster $cn) 0 1) @cn] -1
] [
UI_mlc = (! $UI_mlc)
uicolor (? $UI_mlc 0x99403333 0x99332626) 0 0 [
uiclamp 1 1 1 1
pushif highlight (scoreboardhighlight $cn) [
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
]
]
]
]
]
]
uialign* 0 -1
]
]
]
uifill 0.01
UIvscroll 0.02 0.312 1.56
]
]
///////////////////////////////////////////////////////////////////////////////
// Bots //
///////////////////////////////////////////////////////////////////////////////
UI_botskill = 87
UI_botaddnum = 9
UImenu "bots" [
uifill 0.65 0.27 [
uivlist 0.01 [
uitext (concatword "Bots: " (numbots)) 0.6
uifill 0 0.01
uihlist 0.01 [
uialign 1 ; uitext "Skill Level" 0.6 ; UIhslider UI_botskill 1 100 1 0.5 0.032 [uitext $UI_botskill 0.6]
]
uihlist 0.01 [
uialign 1 ; uitext "#" 0.6 ; UIhslider UI_botaddnum 2 32 1 0.5 0.032 [uitext $UI_botaddnum 0.6]
]
uifill 0 0.015
uihlist 0.05 [
uivlist 0.01 [
UIbutton "" [uitext "Add Bot" 0.65 ; UI_keyref 1 0.027 0.027 "Ins" "" 0.4] 0.2 0.04 [addbot $UI_botskill]
UIbutton "" [uitext (concatword "Add " $UI_botaddnum " Bots") 0.65] 0.2 0.04 [loop a (UI_botaddnum) [addbot $UI_botskill]]
]
uivlist 0.01 [
UIbutton "" [uitext "Delete Bot" 0.65 ; UI_keyref 1 0.027 0.027 "Del" "" 0.4] 0.2 0.04 [delbot]
UIbutton "" [uitext "Clear Bots" 0.65] 0.2 0.04 [clearbots]
]
]
]
]
] [] [] [] "Bots"
///////////////////////////////////////////////////////////////////////////////
// Display Changes //
///////////////////////////////////////////////////////////////////////////////
UImenu "changes" [
uivlist 0.02 [
uiclamp 1 1
UItitle [uitext "Apply changes for:" 0.6] 0 0.03
uiclamp- 1 1
uivlist 0.01 [
loop i $pendingchanges [
uitext (concatword "^f8" (pendingchanges $i)) 0.6
]
]
uihlist 0 [
UIbutton "hold2" [uitext "Yes" 0.6] 0.18 0.032 [applychanges]
UIbutton "hold2" [uitext "No" 0.6] 0.18 0.032 [hideui "changes"]
]
]
] [if (= $pendingchanges 0) [hideui "changes"]]
///////////////////////////////////////////////////////////////////////////////
// Notepad //
///////////////////////////////////////////////////////////////////////////////
UI_notepadfile = "untitled.txt"
UI_cmc_from = ""
UI_cmc_to = ""
UImenu "notepad" [
uivlist 0.01 [
uihlist 0.01 [
uialign -1 -2
uifield UI_notepadfile -35 [] 0.6 [
uioutline (uifocus? 0xFF0000 $c_line)
uiclamp- 1 1 1 1
]
UIbutton "hold2" [uitext "Load" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textload $UI_notepadfile]
UIbutton "hold2" [uitext "Save" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textsave $UI_notepadfile]
UIbutton "hold2" [uitext "Exec" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textexec]
uispace 0.01 0 [UIbar 0 1]
UIbutton "hold2" [uitext "Copy" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textcopy]
UIbutton "hold2" [uitext "Paste" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textpaste]
UIbutton "hold2" [uitext "Select All" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textselectall]
uispace 0.01 0 [UIbar 0 1]
UIbutton "hold2" [uitext "Clear All" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textclear]
]
uitexteditor $UI_notepadfile -80 20 1 "" 0 [
uioutline (uifocus? 0xFF0000 $c_line)
uiclamp- 1 1 1 1
]
textinit $UI_notepadfile $UI_notepadfile
]
] [] [] [] "Notepad"
notepad = [
if $numargs [UI_notepadfile = $arg1]
showui "notepad"
]
mapnotepad = [
UI_notepadfile = (concatword "media/map/" (? $numargs $arg1 $mapname) ".cfg")
showui "notepad"
]
copymapcfg = [
if $numargs [
UI_cmc_from = $arg1
UI_cmc_to = (? (= $numargs 2) $arg2 $mapname)
if (findfile (concatword "media/map/" $UI_cmc_from ".cfg")) [
if (findfile (concatword "media/map/" $UI_cmc_to ".cfg")) [showui "cmc_confirm"] [
textfocus "#copymapcfg"
textload (concatword "media/map/" $UI_cmc_from ".cfg")
textsave (concatword "media/map/" $UI_cmc_to ".cfg")
]
] [
echo (concatword "^f7Map config "^f8^" $UI_cmc_from "^f7^" does not exist!")
UI_cmc_from = "" ; UI_cmc_to = ""
]
]
]
UImenu "cmc_confirm" [
uivlist 0.02 [
uiclamp 1 1
UItitle [uitext "Copy map config:" 0.6] 0 0.03
uiclamp- 1 1
uivlist 0.01 [
uitext (concatword "^f2" $UI_cmc_from) 0.6
UItriangle 0 0.01 0.01 180
uitext (concatword "^f2" $UI_cmc_to) 0.6
]
uihlist 0 [
UIbutton "hold2" [uitext "Proceed" 0.6] 0.18 0.032 [
textfocus "#copymapcfg"
textload (concatword "media/map/" $UI_cmc_from ".cfg")
textsave (concatword "media/map/" $UI_cmc_to ".cfg")
hideui "cmc_confirm"
]
UIbutton "hold2" [uitext "Cancel" 0.6] 0.18 0.032 [hideui "cmc_confirm"]
]
]
] [
if (|| [=s $UI_cmc_from ""] [=s $UI_cmc_to ""]) [hideui "cmc_confirm"]
] [UI_cmc_from = "" ; UI_cmc_to = ""]

View File

@ -35,7 +35,6 @@ client_src = [
'../engine/shader.cc',
'../engine/stain.cc',
'../engine/texture.cc',
'../engine/ui.cc',
'../engine/water.cc',
'../engine/world.cc',
'../engine/worldio.cc',

View File

@ -50,18 +50,6 @@ void conoutf(int type, const char *fmt, ...)
va_end(args);
}
ICOMMAND(fullconsole, "iN$", (int *val, int *numargs, ident *id),
{
if(*numargs > 0) UI::holdui("fullconsole", *val!=0);
else
{
int vis = UI::uivisible("fullconsole") ? 1 : 0;
if(*numargs < 0) intret(vis);
else printvar(id, vis);
}
});
ICOMMAND(toggleconsole, "", (), UI::toggleui("fullconsole"));
float rendercommand(float x, float y, float w)
{
if(commandmillis < 0) return 0;
@ -105,7 +93,7 @@ void setconskip(int &skip, int filter, int n)
}
}
ICOMMAND(conskip, "i", (int *n), setconskip(conskip, UI::uivisible("fullconsole") ? fullconfilter : confilter, *n));
ICOMMAND(conskip, "i", (int *n), setconskip(conskip, /*UI::uivisible("fullconsole")*/ false ? fullconfilter : confilter, *n));
ICOMMAND(miniconskip, "i", (int *n), setconskip(miniconskip, miniconfilter, *n));
ICOMMAND(clearconsole, "", (), { while(conlines.length()) delete[] conlines.pop().line; });
@ -599,7 +587,7 @@ bool consolekey(int code, bool isdown)
void processtextinput(const char *str, int len)
{
if(!UI::textinput(str, len))
/*if(!UI::textinput(str, len))*/
consoleinput(str, len);
}
@ -613,7 +601,8 @@ void processkey(int code, bool isdown, int modstate)
keym *haskey = keyms.access(code);
if(haskey && haskey->pressed) execbind(*haskey, isdown); // allow pressed keys to release
else if(modstate&KMOD_GUI) return;
else if(!UI::keypress(code, isdown)) // UI key intercept
//else if(!UI::keypress(code, isdown)) // UI key intercept
else
{
if(!consolekey(code, isdown))
{

View File

@ -703,24 +703,6 @@ extern bool limitsky();
extern bool renderexplicitsky(bool outline = false);
extern void cleanupsky();
// ui
namespace UI
{
bool hascursor();
void getcursorpos(float &x, float &y);
void resetcursor();
bool movecursor(int dx, int dy);
bool keypress(int code, bool isdown);
bool textinput(const char *str, int len);
float abovehud();
void setup();
void update();
void render();
void cleanup();
}
// menus
extern int mainmenu;

View File

@ -15,7 +15,7 @@ void cleanup()
if(screen) SDL_SetWindowGrab(screen, SDL_FALSE);
cleargamma();
freeocta(worldroot);
UI::cleanup();
//UI::cleanup();
extern void clear_command(); clear_command();
extern void clear_console(); clear_console();
extern void clear_models(); clear_models();
@ -800,7 +800,7 @@ void checkinput()
{
int dx = event.motion.xrel, dy = event.motion.yrel;
checkmousemotion(dx, dy);
if(!UI::movecursor(dx, dy)) mousemove(dx, dy);
/*if(!UI::movecursor(dx, dy))*/ mousemove(dx, dy);
mousemoved = true;
}
else if(shouldgrab) inputgrab(grabinput = true);
@ -1106,7 +1106,7 @@ int main(int argc, char **argv)
if(!execfile("config/font.cfg", false)) fatal("cannot find font definitions");
if(!setfont("default")) fatal("no default font specified");
UI::setup();
//UI::setup();
inbetweenframes = true;
renderbackground("initializing...");
@ -1123,7 +1123,6 @@ int main(int argc, char **argv)
execfile("config/keymap.cfg");
execfile("config/stdedit.cfg");
execfile(game::gameconfig());
execfile("config/ui.cfg");
execfile("config/heightmap.cfg");
execfile("config/blendbrush.cfg");
if(game::savedservers()) execfile(game::savedservers(), false);
@ -1190,7 +1189,7 @@ int main(int argc, char **argv)
updatetime();
checkinput();
UI::update();
//UI::update();
menuprocess();
tryedit();

View File

@ -2,7 +2,7 @@
void notifywelcome()
{
UI::hideui("servers");
//UI::hideui("servers");
}
struct change
@ -23,7 +23,7 @@ void addchange(const char *desc, int type)
if(!applydialog) return;
loopv(needsapply) if(!strcmp(needsapply[i].desc, desc)) return;
needsapply.add(change(type, desc));
if(!hidechanges) UI::showui("changes");
//if(!hidechanges) UI::showui("changes");
}
void clearchanges(int type)
@ -37,7 +37,7 @@ void clearchanges(int type)
if(!c.type) needsapply.remove(i);
}
}
if(needsapply.empty()) UI::hideui("changes");
//if(needsapply.empty()) UI::hideui("changes");
}
void applychanges()
@ -61,7 +61,7 @@ void menuprocess()
lastmainmenu = mainmenu;
execident("mainmenutoggled");
}
if(mainmenu && !isconnected(true) && !UI::hascursor()) UI::showui("main");
//if(mainmenu && !isconnected(true) && !UI::hascursor()) UI::showui("main");
}
VAR(mainmenu, 1, 1, 0);
@ -72,7 +72,7 @@ void clearmainmenu()
if(mainmenu && isconnected())
{
mainmenu = 0;
UI::hideui(NULL);
//UI::hideui(NULL);
}
}

View File

@ -360,7 +360,7 @@ void rendereditcursor()
od = dimension(orient),
odc = dimcoord(orient);
bool hidecursor = UI::hascursor() || blendpaintmode, hovering = false;
bool hidecursor = /*UI::hascursor() ||*/ blendpaintmode, hovering = false;
hmapsel = false;
if(moving)

View File

@ -2632,7 +2632,7 @@ void writecrosshairs(stream *f)
void drawcrosshair(int w, int h)
{
bool windowhit = UI::hascursor();
bool windowhit = /*UI::hascursor()*/ false;
if(!windowhit && (hidehud || mainmenu)) return; //(hidehud || player->state==CS_SPECTATOR || player->state==CS_DEAD)) return;
vec color(1, 1, 1);
@ -2644,7 +2644,7 @@ void drawcrosshair(int w, int h)
if(!cursor) cursor = textureload("media/interface/cursor.png", 3, true);
crosshair = cursor;
chsize = cursorsize*w/900.0f;
UI::getcursorpos(cx, cy);
//UI::getcursorpos(cx, cy);
}
else
{
@ -2774,11 +2774,11 @@ void gl_drawhud()
rendertexturepanel(w, h);
}
abovehud = min(abovehud, conh*UI::abovehud());
//abovehud = min(abovehud, conh*UI::abovehud());
pushhudscale(conscale);
abovehud -= rendercommand(FONTH/2, abovehud - FONTH/2, conw-FONTH);
if(!hidehud && !UI::uivisible("fullconsole")) renderconsole(conw, conh, abovehud - FONTH/2);
if(!hidehud /*&& !UI::uivisible("fullconsole")*/) renderconsole(conw, conh, abovehud - FONTH/2);
pophudmatrix();
drawcrosshair(w, h);
@ -2818,7 +2818,7 @@ void gl_drawframe()
viewh = hudh;
if(mainmenu) gl_drawmainmenu();
else gl_drawview();
UI::render();
//UI::render();
gl_drawhud();
}

File diff suppressed because it is too large Load Diff

View File

@ -445,17 +445,6 @@ extern void preloadmodel(const char *name);
extern void flushpreloadedmodels(bool msg = true);
extern bool matchanim(const char *name, const char *pattern);
// UI
namespace UI
{
bool showui(const char *name);
bool hideui(const char *name);
bool toggleui(const char *name);
void holdui(const char *name, bool on);
bool uivisible(const char *name);
}
// ragdoll
extern void moveragdoll(dynent *d);