void XonoticSingleplayerDialog_fill(entity me) { entity e, btnPrev, btnNext, lblTitle; me.TR(me); me.TDempty(me, (me.columns - 3) / 2); me.TD(me, 2, 3, e = makeXonoticBigButton(_("Instant action! (random map with bots)"), '0 0 0')); e.onClick = InstantAction_LoadMap; e.onClickEntity = NULL; me.TR(me); me.TR(me); me.TR(me); me.TD(me, 1, 1, btnPrev = makeXonoticButton("<<", '0 0 0')); me.TD(me, 1, me.columns - 2, lblTitle = makeXonoticTextLabel(0.5, _("???"))); me.TD(me, 1, 1, btnNext = makeXonoticButton(">>", '0 0 0')); me.TR(me); me.TD(me, me.rows - 5, me.columns, me.campaignBox = makeXonoticCampaignList()); btnPrev.onClick = MultiCampaign_Prev; btnPrev.onClickEntity = me.campaignBox; btnNext.onClick = MultiCampaign_Next; btnNext.onClickEntity = me.campaignBox; me.campaignBox.buttonNext = btnNext; me.campaignBox.buttonPrev = btnPrev; me.campaignBox.labelTitle = lblTitle; me.campaignBox.campaignGo(me.campaignBox, 0); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Singleplayer!"), '0 0 0')); e.onClick = CampaignList_LoadMap; e.onClickEntity = me.campaignBox; }
void XonoticMiscSettingsTab_fill(entity me) { entity e; entity sk; me.TR(me); me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Menu skins:")); me.TR(me); me.TD(me, me.rows - 2, 3, sk = makeXonoticSkinList()); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, 3, e = makeXonoticButton("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 = makeXonoticCheckBox(0, "showtime", "Show current time")); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showdate", "Show current date")); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", "Show frames per second")); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showspeed", "Speedometer")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "0", "qu/s (hidden)")); setDependent(e, "cl_showspeed", 1, 1); me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "1", "qu/s")); setDependent(e, "cl_showspeed", 1, 1); me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "2", "m/s")); setDependent(e, "cl_showspeed", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "3", "km/h")); setDependent(e, "cl_showspeed", 1, 1); me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "4", "mph")); setDependent(e, "cl_showspeed", 1, 1); me.TD(me, 1, 2.8/3, e = makeXonoticRadioButton(1, "cl_showspeed_unit", "5", "knots")); setDependent(e, "cl_showspeed", 1, 1); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_showacceleration", "Show accelerometer")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8/2, e = makeXonoticTextLabel(0, "Accelerometer scale:")); setDependent(e, "cl_showacceleration", 1, 1); me.TD(me, 1, 2.8/2, e = makeXonoticSlider(1, 10, 0.5, "cl_showacceleration_scale")); setDependent(e, "cl_showacceleration", 1, 1); me.TR(me); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", "Minimize input latency")); me.TR(me); me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.cvarsDialog; }
void XonoticInputSettingsTab_fill(entity me) { entity e; entity kb; me.TR(me); me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Key bindings:"))); me.TR(me); me.TD(me, me.rows - 4, 3.3, kb = makeXonoticKeyBinder()); me.gotoRC(me, me.rows - 3, 0); me.TR(me); me.TD(me, 1, 1.1, e = makeXonoticButton(_("Change key..."), '0 0 0')); e.onClick = KeyBinder_Bind_Change; e.onClickEntity = kb; kb.keyGrabButton = e; me.TD(me, 1, 1.1, e = makeXonoticButton(_("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.1, e = makeXonoticButton(_("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 = makeXonoticTextLabel(0, _("Sensitivity:"))); me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity")); me.TR(me); if(cvar("menu_mouse_absolute") == 0) // TODO remove this entirely later { me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("UI mouse speed:"))); me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 4.0, 0.1, "menu_mouse_speed")); } me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", _("Mouse filter"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert mouse"))); me.TR(me); if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input"))); else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input"))); me.TR(me); if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Turn off OS mouse acceleration"))); else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Turn off OS mouse acceleration"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("\"enter console\" also closes"))); me.TR(me); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Holding jump key keeps jumping"))); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_movement_track_canjump", COMMANDBUTTON_APPLY)); }
void XonoticInputSettingsTab_fill(entity me) { entity e; entity kb; me.TR(me); me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Key bindings:"))); me.TR(me); me.TD(me, me.rows - 2, 3.3, kb = makeXonoticKeyBinder()); me.gotoRC(me, me.rows - 1, 0); me.TR(me); me.TD(me, 1, 1.1, e = makeXonoticButton(_("Change key..."), '0 0 0')); e.onClick = KeyBinder_Bind_Change; e.onClickEntity = kb; kb.keyGrabButton = e; me.TD(me, 1, 1.1, e = makeXonoticButton(_("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.1, e = makeXonoticButton(_("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 = makeXonoticTextLabel(0, _("Sensitivity:"))); me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("UI mouse speed:"))); me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 4.0, 0.1, "menu_mouse_speed")); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", _("Mouse filter"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert mouse"))); me.TR(me); if(cvar_type("joy_enable") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joy_enable", _("Use joystick input"))); else if(cvar_type("joystick") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "joystick", _("Use joystick input"))); me.TR(me); if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Turn off OS mouse acceleration"))); else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Turn off OS mouse acceleration"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("\"enter console\" also closes"))); }
void XonoticWaypointDialog_fill(entity me) { entity e; me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Show base waypoints"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Waypoint scale:"))); me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 1.5, 0.05, "g_waypointsprite_scale")); setDependent(e, "cl_hidewaypoints", 0, 0); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Waypoint alpha:"))); me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "g_waypointsprite_alpha")); setDependent(e, "cl_hidewaypoints", 0, 0); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Show names:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_shownames")); e.addValue(e, _("Never"), "0"); e.addValue(e, _("Teammates"), "1"); e.addValue(e, _("All players"), "2"); e.configureXonoticTextSliderValues(e); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void XonoticCvarsDialog_fill(entity me) { entity e, cvarlist, btn; cvarlist = makeXonoticCvarList(); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:"))); me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0')); me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null)); e.onChange = CvarList_Filter_Change; e.onChangeEntity = cvarlist; btn.onClick = InputBox_Clear_Click; btn.onClickEntity = e; cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff me.TR(me); me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist); me.gotoRC(me, me.rows - 7, 0); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Setting:"))); me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null)); cvarlist.cvarNameBox = e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Type:"))); me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null)); cvarlist.cvarTypeBox = e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Value:"))); me.TD(me, 1, me.columns - 2, e = makeXonoticInputBox(0, string_null)); cvarlist.cvarValueBox = e; e.onChange = CvarList_Value_Change; e.onChangeEntity = cvarlist; e.onEnter = CvarList_End_Editing; e.onEnterEntity = cvarlist; me.TD(me, 1, 1, e = makeXonoticButton(string_null, SKINCOLOR_CVARLIST_REVERTBUTTON)); cvarlist.cvarDefaultBox = e; e.onClick = CvarList_Revert_Click; e.onClickEntity = cvarlist; e.allowCut = 1; e.marginLeft = e.marginRight = 0.5; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Description:"))); me.TD(me, 1, me.columns - 1, e = makeXonoticTextLabel(0, string_null)); cvarlist.cvarDescriptionBox = e; e.allowWrap = 1; me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void XonoticCreditsDialog_fill(entity me) { entity e; me.TR(me); me.TD(me, me.rows - 1, me.columns, me.creditsList = makeXonoticCreditsList()); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void XonoticQuitDialog_fill(entity me) { entity e; me.TR(me); me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Are you sure you want to quit?"))); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "quit", 0)); me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void XonoticMapInfoDialog_fill(entity me) { entity e; float w, wgt; me.TR(me); me.TDempty(me, 0.2); me.TD(me, me.rows - 2, 3, e = makeXonoticImage(string_null, 4.0/3.0)); me.previewImage = e; me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); w = me.columns - me.currentColumn; me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Title:")); me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, "")); e.colorL = SKINCOLOR_MAPLIST_TITLE; e.allowCut = 1; me.titleLabel = e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Author:")); me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, "")); e.colorL = SKINCOLOR_MAPLIST_AUTHOR; e.allowCut = 1; me.authorLabel = e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Features:")); me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.featuresLabel = e; me.TR(me); me.TD(me, 1, w, e = makeXonoticTextLabel(0, "Game types:")); me.TR(me); wgt = (w-0.2)/5; me.TDempty(me, 0.2); me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "DM")); me.typeDeathmatchLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "TDM")); me.typeTDMLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "LMS")); me.typeLMSLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Arena")); me.typeArenaLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Rune")); me.typeRuneLabel = e; me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Domination")); me.typeDominationLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Key Hunt")); me.typeKeyHuntLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTF")); me.typeCTFLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CA")); me.typeCALabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Assault")); me.typeAssaultLabel = e; me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Onslaught")); me.typeOnslaughtLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Race")); me.typeRaceLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "CTS")); me.typeCTSLabel = e; me.TD(me, 1, wgt, e = makeXonoticTextLabel(0, "Nexball")); me.typeNexballLabel = e; me.gotoRC(me, me.rows - 2, 0); me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, "")); e.allowCut = 1; me.descriptionLabel = e; me.gotoRC(me, me.rows - 1, 0); me.TDempty(me, 0.5); me.TD(me, 1, me.columns - 5.5, e = makeXonoticButton("Close", '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton("Play", '0 0 0')); me.startButton.onClick = MapList_LoadMap; me.startButton.onClickEntity = NULL; // filled later }
void XonoticServerInfoDialog_fill(entity me) { entity e; me.TR(me); me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, "")); e.colorL = SKINCOLOR_SERVERINFO_NAME; e.allowCut = 1; me.nameLabel = e; me.TR(me); me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, "")); e.colorL = SKINCOLOR_SERVERINFO_IP; e.allowCut = 1; me.cnameLabel = e; me.TR(me); me.TD(me, 1, 5.5, e = makeXonoticTextLabel(0, _("Players:"))); me.TR(me); me.TD(me, me.rows - 4, 6, e = makeXonoticPlayerList()); me.rawPlayerList = e; me.gotoRC(me, 1, 6.25); me.setFirstColumn(me, me.currentColumn); me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Type:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.typeLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Map:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.mapLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Gameplay:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.pureLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Players:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.numPlayersLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Bots:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.numBotsLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Mod:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.modLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Version:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.versionLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Ping:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.pingLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("CA:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.keyLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Key:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.idLabel = e; me.TR(me); me.TD(me, 1, 1.75, e = makeXonoticTextLabel(0, _("Encryption:"))); me.TD(me, 1, 4.0, e = makeXonoticTextLabel(0, "")); e.allowCut = 1; me.encryptLabel = e; me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns - 6, e = makeXonoticButton(_("Close"), '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; me.TD(me, 1, me.columns - 6, e = makeXonoticButton(_("Join!"), '0 0 0')); e.onClick = Join_Click; e.onClickEntity = me; }
void XonoticAdvancedDialog_fill(entity me) { entity e; me.TR(me); me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Game settings:"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", _("Allow spectating"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Spawn shield:"))); me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime")); me.TR(me); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Game speed:"))); me.TD(me, 1, 1.6, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo")); me.TR(me); me.TR(me); me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Teamplay settings:"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire scale:"))); me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire")); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_friendlyfire_virtual", _("Virtual friendly fire (effect only)"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire penalty:"))); me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage")); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_mirrordamage_virtual", _("Virtual penalty (effect only)"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Teams:"))); me.TD(me, 1, 1.6, e = makeXonoticTextSlider("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.configureXonoticTextSliderValues(e); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Map voting:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable")); e.addValue(e, _("No voting"), "0"); e.addValue(e, _("2 choices"), "2"); e.addValue(e, _("3 choices"), "3"); e.addValue(e, _("4 choices"), "4"); e.addValue(e, _("5 choices"), "5"); e.addValue(e, _("6 choices"), "6"); e.addValue(e, _("7 choices"), "7"); e.addValue(e, _("8 choices"), "8"); e.addValue(e, _("9 choices"), "9"); e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", _("Simple majority wins vcall"))); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0')); e.onClick = Dialog_Close; e.onClickEntity = me; }
void XonoticServerCreateTab_fill(entity me) { entity e, e0; me.TR(me); me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Game type:"))); me.TR(me); me.TD(me, 8, 3, e = makeXonoticGametypeList()); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); me.TR(me); //me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Match settings:"))); // pointless, overcrowds the dialog imo me.TR(me); me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 1, "timelimit_override"); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, _("Time limit:"))); me.TD(me, 1, 2, me.sliderTimelimit); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, _("Use map specified default"))); me.TR(me); me.sliderFraglimit = makeXonoticSlider(1.0, 2000.0, 5, "fraglimit_override"); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, _("Point limit:"))); me.checkboxFraglimit = e; me.TD(me, 1, 2, me.sliderFraglimit); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, _("Use map specified default"))); me.checkboxFraglimitMapinfo = e; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player slots:"))); me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Number of bots:"))); me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bot skill:"))); setDependent(e, "bot_number", 0, -1); me.TD(me, 1, 2, e = makeXonoticTextSlider("skill")); e.addValue(e, _("Botlike"), "0"); e.addValue(e, _("Beginner"), "1"); e.addValue(e, _("You will win"), "2"); e.addValue(e, _("You can win"), "3"); e.addValue(e, _("You might win"), "4"); e.addValue(e, _("Advanced"), "5"); e.addValue(e, _("Expert"), "6"); e.addValue(e, _("Pro"), "7"); e.addValue(e, _("Assassin"), "8"); e.addValue(e, _("Unhuman"), "9"); e.addValue(e, _("Godlike"), "10"); e.configureXonoticTextSliderValues(e); setDependent(e, "bot_number", 0, -1); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticButton(_("Mutators..."), '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.mutatorsDialog; main.mutatorsDialog.refilterEntity = me.mapListBox; me.TD(me, 1, 2, e0 = makeXonoticTextLabel(0, string_null)); e0.textEntity = main.mutatorsDialog; e0.allowCut = 1; me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.advancedDialog; main.advancedDialog.refilterEntity = me.mapListBox; me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.mapListBox = makeXonoticMapList(); me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Map list:"))); makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback); me.TR(me); me.TD(me, me.rows - 4, 3, me.mapListBox); me.gotoRC(me, me.rows - 3, 3.5); me.TDempty(me, 0.25); me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select all"), '0 0 0')); e.onClick = MapList_All; e.onClickEntity = me.mapListBox; me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select none"), '0 0 0')); e.onClick = MapList_None; e.onClickEntity = me.mapListBox; me.TDempty(me, 0.25); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Multiplayer!"), '0 0 0')); e.onClick = MapList_LoadMap; e.onClickEntity = me.mapListBox; me.mapListBox.startButton = e; me.gameTypeChangeNotify(me); }
void XonoticPlayerSettingsTab_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 = makeXonoticTextLabel(0, "Name:")); me.playerNameLabelAlpha = me.playerNameLabel.alpha; me.TD(me, 1, 2.5, label = makeXonoticTextLabel(0, string_null)); label.allowCut = 1; label.allowColors = 1; label.alpha = 1; me.TR(me); me.TD(me, 1, 3.0, box = makeXonoticInputBox(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 = makeXonoticColorpicker(box)); me.TD(me, 5, 2, e = makeXonoticCharmap(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 = makeXonoticPlayerModelSelector(); me.TD(me, 1, 0.6, e = makeXonoticTextLabel(1, "Model:")); me.TD(me, 1, 0.3, e = makeXonoticButton("<<", '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 = makeXonoticButton(">>", '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 = makeXonoticColorButton(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 = makeXonoticColorButton(2, 1, i), '0 1 0'); } me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Field of view:")); me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 1, "fov")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Damage kick:")); me.TD(me, 1, 2, e = makeXonoticSlider(0, 0.5, 0.05, "v_kicktime")); me.TR(me); sl = makeXonoticSlider(0.45, 0.75, 0.01, "cl_bobcycle"); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, sl, "View bobbing:")); makeMulti(sl, "cl_bob2cycle"); me.TD(me, 1, 2, sl); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Zoom factor:")); me.TD(me, 1, 2, e = makeXonoticSlider(2, 16, 0.5, "cl_zoomfactor")); me.TR(me); sl = makeXonoticSlider(1, 8, 0.5, "cl_zoomspeed"); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(-1, 1, sl, "Zoom speed:")); me.TD(me, 1, 2, sl); me.TR(me); me.TD(me, 1, 1.5, e = makeXonoticButton("Weapon settings...", '0 0 0')); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.weaponsDialog; me.TD(me, 1, 1.5, e0 = makeXonoticTextLabel(0, string_null)); e0.textEntity = main.weaponsDialog; e0.allowCut = 1; me.TR(me); me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, "Crosshair:")); me.TD(me, 1, 1.00, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon")); me.TD(me, 1, 1.25, e = makeXonoticCheckBox(1, "crosshair_color_override", "& Per weapon colors")); setDependent(e, "crosshair_per_weapon", 1, 1); me.TR(me); me.TDempty(me, 0.5); for(i = 1; i <= 10; ++i) { me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0'); setDependent(e, "crosshair_per_weapon", 0, 0); } me.TR(me); me.TDempty(me, 0.5); for(i = 11; i <= 20; ++i) { me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(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 = makeXonoticTextLabel(0, "Crosshair size:")); me.TD(me, 1, 1.8, e = makeXonoticSlider(0.10, 1.5, 0.05, "crosshair_size")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair alpha:")); me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:")); me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red")); setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair green:")); me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green")); setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair blue:")); me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue")); setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot")); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Size:")); me.TD(me, 1, 0.9, e = makeXonoticSlider(0.2, 2, 0.1, "crosshair_dot_size")); setDependent(e, "crosshair_dot", 1, 1); me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, "Alpha:")); me.TD(me, 1, 0.9, e = makeXonoticSlider(0.10, 1, 0.1, "crosshair_dot_alpha")); setDependent(e, "crosshair_dot", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:")); me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0", "None")); me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1", "TrueAim")); me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies")); me.TR(me); me.TDempty(me, 0.4); me.TD(me, 1, 2.2, e = makeXonoticButton("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 = makeXonoticButton("Enter HUD editor", '0 0 0')); e.onClick = HUDSetup_Join_Click; e.onClickEntity = me; me.TDempty(me, 0.5); me.TR(me); #ifdef ALLOW_FORCEMODELS me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force models:")); me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, string_null, string_null, "None")); me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodelsfromxonotic", string_null, "Custom")); me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodels", string_null, "All")); #endif me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", "Disable gore effects")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Gibs:")); me.TD(me, 1, 2, e = makeXonoticTextSlider("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.configureXonoticTextSliderValues(e); setDependent(e, "cl_gentle", 0, 0); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, makeXonoticCommandButton("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_forceplayermodelsfromxonotic;sendcvar cl_forceplayermodels;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY)); }