void fillNexuizWeaponsDialog(entity me) { entity e; me.TR(me); me.TD(me, 1, 4, makeNexuizTextLabel(0, "Weapon priority list:")); me.TR(me); me.TD(me, 9, 4, e = me.weaponsList = makeNexuizWeaponsList()); me.gotoRC(me, 10, 0); me.TDempty(me, 1); me.TD(me, 1, 1, e = makeNexuizButton("Up", '0 0 0')); e.onClick = WeaponsList_MoveUp_Click; e.onClickEntity = me.weaponsList; me.TD(me, 1, 1, e = makeNexuizButton("Down", '0 0 0')); e.onClick = WeaponsList_MoveDown_Click; e.onClickEntity = me.weaponsList; me.gotoRC(me, 11, 0); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "r_drawviewmodel", "Draw 1st person weapon model")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_gunalign", "4", "Left align")); setDependent(e, "r_drawviewmodel", 1, 1); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_gunalign", "3", "Right align")); setDependent(e, "r_drawviewmodel", 1, 1); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "v_flipped", "Flip view horizontally")); me.TR(me); me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void NexuizServerListTab_fill(entity me) { entity e, slist, btn; slist = makeNexuizServerList(); me.TR(me); me.TD(me, 1, 0.4, e = makeNexuizTextLabel(0, "Filter:")); me.TD(me, 1, 0.6, btn = makeNexuizButton("Clear", '0 0 0')); btn.onClick = InputBox_Clear_Click; me.TD(me, 1, me.columns - 0.6 * 4 - 0.4, e = makeNexuizInputBox(0, string_null)); e.onChange = ServerList_Filter_Change; e.onChangeEntity = slist; btn.onClickEntity = e; slist.controlledTextbox = e; me.TD(me, 1, 0.6, e = makeNexuizCheckBox(0, "menu_slist_showempty", "Empty")); slist.filterShowEmpty = e.checked; e.onClickEntity = slist; e.onClick = ServerList_ShowEmpty_Click; me.TD(me, 1, 0.6, e = makeNexuizCheckBox(0, "menu_slist_showfull", "Full")); slist.filterShowFull = e.checked; e.onClickEntity = slist; e.onClick = ServerList_ShowFull_Click; me.TD(me, 1, 0.6, e = makeNexuizCheckBox(0, "net_slist_pause", "Pause")); me.TR(me); me.TD(me, 1, 1, slist.sortButton1 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton2 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton3 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton4 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton5 = makeNexuizButton(string_null, '0 0 0')); me.TR(me); me.TD(me, me.rows - 4, me.columns, slist); me.gotoRC(me, me.rows - 2, 0); me.TD(me, 1, 0.6, e = makeNexuizTextLabel(0, "Address:")); me.TD(me, 1, 2.9, e = makeNexuizInputBox(0, string_null)); e.onEnter = ServerList_Connect_Click; e.onEnterEntity = slist; slist.ipAddressBox = e; me.TD(me, 1, 1.5, e = makeNexuizButton("", '0 0 0')); e.onClick = ServerList_Favorite_Click; e.onClickEntity = slist; slist.favoriteButton = e; me.TD(me, 1, 1.5, e = makeNexuizButton("Info", '0 0 0')); e.onClick = ServerList_Info_Click; e.onClickEntity = slist; slist.infoButton = e; me.TR(me); me.TD(me, 1, me.columns, e = makeNexuizButton("Join!", '0 0 0')); e.onClick = ServerList_Connect_Click; e.onClickEntity = slist; slist.connectButton = e; }
void fillNexuizDemoBrowserTab(entity me) { entity e; entity btn; entity dlist; me.TR(me); me.TD(me, 1, me.columns, e = makeNexuizCheckBox(0, "cl_autodemo", "Record demos while playing")); me.TR(me); dlist = makeNexuizDemoList(); me.TR(me); me.TD(me, 1, 0.5, e = makeNexuizTextLabel(0, "Filter:")); me.TD(me, 1, 0.5, btn = makeNexuizButton("Clear", '0 0 0')); btn.onClick = InputBox_Clear_Click; me.TD(me, 1, me.columns - 1, e = makeNexuizInputBox(0, NULL)); e.onChange = DemoList_Filter_Change; e.onChangeEntity = dlist; btn.onClickEntity = e; dlist.controlledTextbox = e; me.TR(me); me.TD(me, me.rows - 4, me.columns, dlist); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns / 2, e = makeNexuizButton("Timedemo", '0 0 0')); e.onClick = TimeDemo_Click; e.onClickEntity = dlist; me.TD(me, 1, me.columns / 2, e = makeNexuizButton("Play", '0 0 0')); e.onClick = StartDemo_Click; e.onClickEntity = dlist; }
void fillNexuizMiscSettingsTab(entity me) { entity e; entity sk; me.TR(me); me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Menu skins:")); me.TR(me); me.TD(me, me.rows - 2, 3, sk = makeNexuizSkinList()); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, 3, e = makeNexuizButton("Apply immediately", '0 0 0')); e.onClick = SetSkin_Click; e.onClickEntity = sk; me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "showtime", "Show current time")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "showdate", "Show current date")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "showfps", "Show frames per second")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Speedmeter:")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "showspeed", "0", "Off")); setDependent(e, "showtopspeed", 0, 0); me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "showspeed", "1", "in/s")); me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "showspeed", "2", "m/s")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "showspeed", "3", "km/h")); me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "showspeed", "4", "mph")); me.TD(me, 1, 2.8/3, e = makeNexuizRadioButton(1, "showspeed", "5", "knots")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8, e = makeNexuizCheckBoxEx(-1, 0, "showtopspeed", "Also show top speed")); setDependent(e, "showspeed", 0.5, -0.5); me.TR(me); me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeNexuizButton("Advanced settings...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.cvarsDialog; me.TDempty(me, 0.5); }
void fillNexuizInputSettingsTab(entity me) { entity e; entity kb; me.TR(me); me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Key bindings:")); me.TR(me); me.TD(me, me.rows - 2, 3, kb = makeNexuizKeyBinder()); me.gotoRC(me, me.rows - 1, 0); me.TR(me); me.TD(me, 1, 1, e = makeNexuizButton("Change key...", '0 0 0')); e.onClick = KeyBinder_Bind_Change; e.onClickEntity = kb; kb.keyGrabButton = e; me.TD(me, 1, 1, e = makeNexuizButton("Edit...", '0 0 0')); e.onClick = KeyBinder_Bind_Edit; e.onClickEntity = kb; kb.userbindEditButton = e; kb.userbindEditDialog = main.userbindEditDialog; main.userbindEditDialog.keybindBox = kb; me.TD(me, 1, 1, e = makeNexuizButton("Clear", '0 0 0')); e.onClick = KeyBinder_Bind_Clear; e.onClickEntity = kb; me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Sensitivity:")); me.TD(me, 1, 2, e = makeNexuizSlider(1, 32, 0.2, "sensitivity")); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "UI mouse speed:")); me.TD(me, 1, 2, e = makeNexuizSlider(0.2, 4.0, 0.1, "menu_mouse_speed")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "m_filter", "Mouse filter")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(1.022, "m_pitch", "Invert mouse")); me.TR(me); if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "joy_enable", "Use joystick input")); else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "joystick", "Use joystick input")); me.TR(me); if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "vid_dgamouse", "Turn off OS mouse acceleration")); else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "apple_mouse_noaccel", "Turn off OS mouse acceleration")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "con_closeontoggleconsole", "\"enter console\" also closes")); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Show binds:")); me.TD(me, 1, 2, e = makeNexuizTextSlider("sbar_showbinds")); e.addValue(e, "Actions", "0"); e.addValue(e, "Bound keys", "1"); e.addValue(e, "Both", "2"); e.configureNexuizTextSliderValues(e); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(2, 0, "cl_showpressedkeys", "Show pressed keys")); }
void fillNexuizServerListTab(entity me) { entity e, slist, clearbtn; slist = makeNexuizServerList(); me.TR(me); me.TD(me, 1, 0.5, e = makeNexuizTextLabel(0, _("Filter:"))); me.TD(me, 1, 0.5, clearbtn = makeNexuizButton(_("Clear"), '0 0 0')); clearbtn.onClick = InputBox_Clear_Click; me.TD(me, 1, me.columns - 2.5, e = makeNexuizInputBox(0, string_null)); e.onChange = ServerList_Filter_Change; e.onChangeEntity = slist; clearbtn.onClickEntity = e; slist.controlledTextbox = e; me.TD(me, 1, 0.5, e = makeNexuizCheckBox(0, "menu_slist_showempty", _("Empty"))); slist.filterShowEmpty = e.checked; e.onClickEntity = slist; e.onClick = ServerList_ShowEmpty_Click; me.TD(me, 1, 0.5, e = makeNexuizCheckBox(0, "menu_slist_showfull", _("Full"))); slist.filterShowFull = e.checked; e.onClickEntity = slist; e.onClick = ServerList_ShowFull_Click; me.TD(me, 1, 0.5, e = makeNexuizCheckBox(0, "net_slist_pause", _("Pause"))); me.TR(me); me.TD(me, 1, 1, slist.sortButton1 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton2 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton3 = makeNexuizButton(string_null, '0 0 0')); me.TD(me, 1, 1, slist.sortButton4 = makeNexuizButton(string_null, '0 0 0')); me.TR(me); me.TD(me, me.rows - 3, me.columns, slist); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeNexuizButton(_("Join!"), '0 0 0')); e.onClick = ServerList_Connect_Click; e.onClickEntity = slist; slist.connectButton = e; }
void NexuizAdvancedDialog_fill(entity me) { entity e; me.TR(me); me.TD(me, 1, 1.2, makeNexuizTextLabel(0, "Game settings:")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizCheckBox(0, "sv_spectate", "Allow spectating")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Spawn shield:")); me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 15, 0.5, "g_spawnshieldtime")); me.TR(me); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Game speed:")); me.TD(me, 1, 1.7, e = makeNexuizSlider(0.5, 2.0, 0.1, "slowmo")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizCheckBoxEx(2, 0, "g_antilag", "AntiLag")); me.TR(me); me.TR(me); me.TD(me, 1, 1.2, makeNexuizTextLabel(0, "Teamplay settings:")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Friendly fire scale:")); me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 1.0, 0.05, "g_friendlyfire")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Friendly fire penalty:")); me.TD(me, 1, 1.7, e = makeNexuizSlider(0, 1.0, 0.05, "g_mirrordamage")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Teams:")); me.TD(me, 1, 1.7, e = makeNexuizTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override")); e.addValue(e, "Default", "0"); e.addValue(e, "2 teams", "2"); e.addValue(e, "3 teams", "3"); e.addValue(e, "4 teams", "4"); e.configureNexuizTextSliderValues(e); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void NexuizPlayerSettingsTab_fill(entity me) { entity e, pms, sl, label, e0, box; float i, r, m, n; me.TR(me); me.TD(me, 1, 0.5, me.playerNameLabel = makeNexuizTextLabel(0, "Name:")); me.playerNameLabelAlpha = me.playerNameLabel.alpha; me.TD(me, 1, 2.5, label = makeNexuizTextLabel(0, string_null)); label.allowCut = 1; label.allowColors = 1; label.alpha = 1; me.TR(me); me.TD(me, 1, 3.0, box = makeNexuizInputBox(1, "_cl_name")); box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = -63; // negativ means encoded length in bytes label.textEntity = box; me.TR(me); me.TD(me, 5, 1, e = makeNexuizColorpicker(box)); me.TD(me, 5, 2, e = makeNexuizCharmap(box)); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.gotoRC(me, 8, 0.0); pms = makeNexuizPlayerModelSelector(); me.TD(me, 1, 0.6, e = makeNexuizTextLabel(1, "Model:")); me.TD(me, 1, 0.3, e = makeNexuizButton("<<", '0 0 0')); e.onClick = PlayerModelSelector_Prev_Click; e.onClickEntity = pms; me.TD(me, me.rows - me.currentRow - 1, 1.8, pms); me.TD(me, 1, 0.3, e = makeNexuizButton(">>", '0 0 0')); e.onClick = PlayerModelSelector_Next_Click; e.onClickEntity = pms; me.TR(me); r = me.currentRow; m = me.rows - r - 2; n = 16 - !cvar("developer"); m = m / (n - 1); for(i = 0; i < n; ++i) { me.gotoRC(me, r + i * m, 0.1); me.TDNoMargin(me, m, 0.2, e = makeNexuizColorButton(1, 0, i), '0 1 0'); } for(i = 0; i < n; ++i) { me.gotoRC(me, r + i * m, 0.4); me.TDNoMargin(me, m, 0.2, e = makeNexuizColorButton(2, 1, i), '0 1 0'); } me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Field of view:")); me.TD(me, 1, 2, e = makeNexuizSlider(60, 130, 1, "fov")); me.TR(me); sl = makeNexuizSlider(0.45, 0.75, 0.01, "cl_bobcycle"); me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, sl, "View bobbing:")); makeMulti(sl, "cl_bob2cycle"); me.TD(me, 1, 2, sl); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Zoom factor:")); me.TD(me, 1, 2, e = makeNexuizSlider(2, 16, 0.5, "cl_zoomfactor")); me.TR(me); sl = makeNexuizSlider(1, 8, 0.5, "cl_zoomspeed"); me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(-1, 1, sl, "Zoom speed:")); me.TD(me, 1, 2, sl); me.TR(me); me.TD(me, 1, 1.5, e = makeNexuizButton("Weapon settings...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.weaponsDialog; me.TD(me, 1, 1.5, e0 = makeNexuizTextLabel(0, string_null)); e0.textEntity = main.weaponsDialog; e0.allowCut = 1; me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair:")); me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "crosshair_per_weapon", "Per weapon")); me.TR(me); me.TDempty(me, 0.2); for(i = 1; i <= 10; ++i) { me.TDNoMargin(me, 1, 2 / 10, e = makeNexuizCrosshairButton(3, i), '1 1 0'); setDependent(e, "crosshair_per_weapon", 0, 0); } // show a larger preview of the selected crosshair me.TDempty(me, 0.2); me.TDNoMargin(me, 2, 2 / 5, e = makeNexuizCrosshairButton(4, -1), '1 1 0'); // crosshair -1 makes this a preview setDependent(e, "crosshair_per_weapon", 0, 0); me.TR(me); me.TDempty(me, 0.2); for(i = 11; i <= 20; ++i) { me.TDNoMargin(me, 1, 2 / 10, e = makeNexuizCrosshairButton(3, i), '1 1 0'); setDependent(e, "crosshair_per_weapon", 0, 0); } me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair size:")); me.TD(me, 1, 1.8, e = makeNexuizSlider(0.10, 1.5, 0.05, "crosshair_size")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair alpha:")); me.TD(me, 1, 1.8, e = makeNexuizSlider(0, 1, 0.1, "crosshair_alpha")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair color:")); me.TD(me, 2, 1.8, e = makeNexuizColorpickerString("crosshair_color", "crosshair_color")); setDependent(e, "crosshair_color_per_weapon", 0, 0); me.TR(me); me.TDempty(me, 0.3); me.TD(me, 1, 0.7, e = makeNexuizCheckBox(0, "crosshair_color_per_weapon", "Per weapon")); me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "crosshair_dot", "Enable centered dot")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.5, e = makeNexuizTextLabel(0, "Size:")); me.TD(me, 1, 0.9, e = makeNexuizSlider(0.2, 2, 0.1, "crosshair_dot_size")); setDependent(e, "crosshair_dot", 1, 1); me.TD(me, 1, 0.5, e = makeNexuizTextLabel(0, "Alpha:")); me.TD(me, 1, 0.9, e = makeNexuizSlider(0.10, 1, 0.1, "crosshair_dot_alpha")); setDependent(e, "crosshair_dot", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Hit test:")); me.TD(me, 1, 2/3, e = makeNexuizRadioButton(5, "crosshair_hittest", "0", "None")); me.TD(me, 1, 2/3, e = makeNexuizRadioButton(5, "crosshair_hittest", "1", "TrueAim")); me.TD(me, 1, 2/3, e = makeNexuizRadioButton(5, "crosshair_hittest", "1.25", "Enemies")); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 2.2, e = makeNexuizButton("Waypoints setup...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.waypointDialog; me.TDempty(me, 0.5); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 2.2, e = makeNexuizButton("Enter HUD editor", '0 0 0')); e.onClick = HUDSetup_Join_Click; e.onClickEntity = me; me.TDempty(me, 0.5); me.TR(me); me.TR(me); #ifdef ALLOW_FORCEMODELS me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Force models:")); me.TD(me, 1, 2/3, e = makeNexuizRadioButton(6, string_null, string_null, "None")); me.TD(me, 1, 2/3, e = makeNexuizRadioButton(6, "cl_forceplayermodelsfromnexuiz", string_null, "Custom")); me.TD(me, 1, 2/3, e = makeNexuizRadioButton(6, "cl_forceplayermodels", string_null, "All")); #endif me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_gentle", "Disable gore effects")); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Gibs:")); me.TD(me, 1, 2, e = makeNexuizTextSlider("cl_nogibs")); e.addValue(e, "None", "1"); e.addValue(e, "Few", "0.75"); e.addValue(e, "Many", "0.5"); e.addValue(e, "Lots", "0"); e.configureNexuizTextSliderValues(e); setDependent(e, "cl_gentle", 0, 0); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Damage splash:")); me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.05, "hud_damage")); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";cl_cmd sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromnexuiz;sendcvar cl_forceplayermodels;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY)); }
void fillNexuizPlayerSettingsTab(entity me) { entity e, pms, sl, label, e0, box; float i, r, m, n; me.TR(me); me.TD(me, 1, 0.5, me.playerNameLabel = makeNexuizTextLabel(0, "Name:")); me.playerNameLabelAlpha = me.playerNameLabel.alpha; me.TD(me, 1, 2.5, label = makeNexuizTextLabel(0, string_null)); label.allowCut = 1; label.allowColors = 1; label.alpha = 1; me.TR(me); me.TD(me, 1, 3.0, box = makeNexuizInputBox(1, "_cl_name")); box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = 63; label.textEntity = box; me.TR(me); me.TD(me, 5, 1, e = makeNexuizColorpicker(box)); me.TD(me, 5, 2, e = makeNexuizCharmap(box)); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.gotoRC(me, 8, 0.0); pms = makeNexuizPlayerModelSelector(); me.TD(me, 1, 0.6, e = makeNexuizTextLabel(1, "Model:")); me.TD(me, 1, 0.3, e = makeNexuizButton("<<", '0 0 0')); e.onClick = PlayerModelSelector_Prev_Click; e.onClickEntity = pms; me.TD(me, me.rows - me.currentRow - 1, 1.8, pms); me.TD(me, 1, 0.3, e = makeNexuizButton(">>", '0 0 0')); e.onClick = PlayerModelSelector_Next_Click; e.onClickEntity = pms; me.TR(me); r = me.currentRow; m = me.rows - r - 2; n = 16 - !cvar("developer"); m = m / (n - 1); for(i = 0; i < n; ++i) { me.gotoRC(me, r + i * m, 0.1); me.TDNoMargin(me, m, 0.2, e = makeNexuizColorButton(1, 0, i), '0 1 0'); } for(i = 0; i < n; ++i) { me.gotoRC(me, r + i * m, 0.4); me.TDNoMargin(me, m, 0.2, e = makeNexuizColorButton(2, 1, i), '0 1 0'); } me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Field of View:")); me.TD(me, 1, 2, e = makeNexuizSlider(60, 130, 1, "fov")); me.TR(me); sl = makeNexuizSlider(0.45, 0.75, 0.01, "cl_bobcycle"); me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(0, 1, sl, "View bobbing:")); me.TD(me, 1, 2, sl); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Zoom Factor:")); me.TD(me, 1, 2, e = makeNexuizSlider(2, 16, 0.5, "cl_zoomfactor")); me.TR(me); sl = makeNexuizSlider(1, 8, 0.5, "cl_zoomspeed"); me.TD(me, 1, 1, e = makeNexuizSliderCheckBox(-1, 1, sl, "Zoom speed:")); me.TD(me, 1, 2, sl); me.TR(me); me.TR(me); me.TD(me, 1, 1.5, e = makeNexuizButton("Weapon settings...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.weaponsDialog; me.TD(me, 1, 1.5, e0 = makeNexuizTextLabel(0, string_null)); e0.textEntity = main.weaponsDialog; e0.allowCut = 1; me.TR(me); me.TR(me); me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "crosshair_per_weapon", "Per weapon crosshairs")); me.TD(me, 1, 1.3, e = makeNexuizCheckBox(1, "crosshair_color_override", "& crosshair colors")); setDependent(e, "crosshair_per_weapon", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair:")); for(i = 1; i <= 10; ++i) { me.TDNoMargin(me, 1, 2 / 10, e = makeNexuizCrosshairButton(3, i), '1 1 0'); setDependent(e, "crosshair_per_weapon", 0, 0); } me.TR(me); me.TDempty(me, 1); for(i = 11; i <= 20; ++i) { me.TDNoMargin(me, 1, 2 / 10, e = makeNexuizCrosshairButton(3, i), '1 1 0'); setDependent(e, "crosshair_per_weapon", 0, 0); } me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Size:")); me.TD(me, 1, 2, e = makeNexuizSlider(0.40, 2, 0.05, "crosshair_size")); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Alpha:")); me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_alpha")); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Red:")); me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_red")); setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Green:")); me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_green")); setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Crosshair Blue:")); me.TD(me, 1, 2, e = makeNexuizSlider(0, 1, 0.01, "crosshair_color_blue")); setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1); me.TR(me); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 2.2, e = makeNexuizButton("Radar, HUD & Waypoints...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.radarDialog; me.TDempty(me, 0.5); me.TR(me); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames", COMMANDBUTTON_APPLY)); }
void NexuizHUDVoteDialog_fill(entity me) { entity e; string panelname = "vote"; float i; me.TR(me); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "hud_panel_vote", "Enable panel")); me.TR(me); me.TD(me, 1, 1.4, e = makeNexuizTextLabel(0, "Background:")); me.TD(me, 1, 1.6, e = makeNexuizTextSlider(strzone(strcat("hud_panel_", panelname, "_bg")))); e.addValue(e, "Default", ""); e.addValue(e, "Disable", "0"); e.addValue(e, strzone(strcat("border_", panelname)), strzone(strcat("border_", panelname))); e.configureNexuizTextSliderValues(e); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Color:")); me.TD(me, 2, 2.4, e = makeNexuizColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color")); setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), ""); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Border size:")); me.TD(me, 1, 2.6, e = makeNexuizTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_border")))); e.addValue(e, "Default", ""); e.addValue(e, "Disable", "0"); for(i = 1; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i * 2, 0)), strzone(ftos(i * 2))); e.configureNexuizTextSliderValues(e); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Alpha:")); me.TD(me, 1, 2.6, e = makeNexuizTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_alpha")))); e.addValue(e, "Default", ""); for(i = 1; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10))); e.configureNexuizTextSliderValues(e); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Team Color:")); me.TD(me, 1, 2.6, e = makeNexuizTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_color_team")))); e.addValue(e, "Default", ""); e.addValue(e, "Disable", "0"); for(i = 1; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i/10, 1)), strzone(ftos(i/10))); e.configureNexuizTextSliderValues(e); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "hud_configure_teamcolorforced", "Test the team color in HUD configure mode")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeNexuizTextLabel(0, "Padding:")); me.TD(me, 1, 2.6, e = makeNexuizTextSlider(strzone(strcat("hud_panel_", panelname, "_bg_padding")))); e.addValue(e, "Default", ""); for(i = 0; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); e.configureNexuizTextSliderValues(e); me.TR(me); me.TD(me, 1, 1.4, e = makeNexuizTextLabel(0, "Alpha after voting:")); me.TD(me, 1, 2.6, e = makeNexuizSlider(0.1, 1, 0.1, "hud_panel_vote_alreadyvoted_alpha")); }
void fillNexuizRadarDialog(entity me) { entity e, sl; me.TR(me); me.TD(me, 1, 4, makeNexuizTextLabel(0, "Radar settings:")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Position:")); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0 0", "Top left")); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0.5 0", "Top middle")); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "1 0", "Top right")); me.TR(me); me.TDempty(me, 1); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "0 0.5", "Middle left")); me.TDempty(me, 1); me.TD(me, 1, 1, e = makeNexuizRadioButton(1, "cl_teamradar_position", "1 0.5", "Middle right")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Size:")); me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_teamradar_size")); e.addValue(e, "96x96", "96 96"); e.addValue(e, "128x96", "128 96"); e.addValue(e, "128x128", "128 128"); e.addValue(e, "192x144", "192 144"); e.addValue(e, "192x192", "192 192"); e.addValue(e, "256x192", "256 192"); e.addValue(e, "256x256", "256 256"); e.configureNexuizTextSliderValues(e); me.TR(me); me.TDempty(me, 0.2); sl = makeNexuizSlider(0.20, 1, 0.01, "cl_teamradar_background_alpha"); me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1, 1, sl, "Background:")); me.TD(me, 1, 3, sl); me.TR(me); me.TR(me); me.TD(me, 1, 4, makeNexuizTextLabel(0, "HUD settings:")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizCheckBoxEx(100, 110, "viewsize", "Background:")); me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_alpha_bg")); setDependent(e, "viewsize", 0, 100); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default red:")); me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_r")); setDependent(e, "viewsize", 0, 100); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default green:")); me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_g")); setDependent(e, "viewsize", 0, 100); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Default blue:")); me.TD(me, 1, 3, e = makeNexuizSlider(0, 1, 0.01, "sbar_color_bg_b")); setDependent(e, "viewsize", 0, 100); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Team color:")); me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "sbar_color_bg_team")); setDependent(e, "viewsize", 0, 100); me.TR(me); me.TR(me); me.TD(me, 1, 4, makeNexuizTextLabel(0, "Waypoint settings:")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 3.8, e = makeNexuizCheckBox(1, "cl_hidewaypoints", "Show base waypoints")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint scale:")); me.TD(me, 1, 3, e = makeNexuizSlider(0.5, 1.5, 0.01, "g_waypointsprite_scale")); setDependent(e, "cl_hidewaypoints", 0, 0); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Waypoint alpha:")); me.TD(me, 1, 3, e = makeNexuizSlider(0.1, 1, 0.01, "g_waypointsprite_alpha")); setDependent(e, "cl_hidewaypoints", 0, 0); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeNexuizTextLabel(0, "Show names:")); me.TD(me, 1, 3, e = makeNexuizTextSlider("cl_shownames")); e.addValue(e, "Never", "0"); e.addValue(e, "Teammates", "1"); e.addValue(e, "All players", "2"); e.configureNexuizTextSliderValues(e); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }