-#include "../../common/weapons/all.qh"
+#include "dialog_multiplayer_create_mutators.qh"
+#include <common/weapons/all.qh>
-#ifndef DIALOG_MULTIPLAYER_CREATE_MUTATORS_H
-#define DIALOG_MULTIPLAYER_CREATE_MUTATORS_H
-#include "dialog.qc"
-CLASS(XonoticMutatorsDialog, XonoticDialog)
- METHOD(XonoticMutatorsDialog, toString, string(entity));
- METHOD(XonoticMutatorsDialog, fill, void(entity));
- METHOD(XonoticMutatorsDialog, showNotify, void(entity));
- METHOD(XonoticMutatorsDialog, close, void(entity));
- ATTRIB(XonoticMutatorsDialog, title, string, _("Mutators"))
- ATTRIB(XonoticMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
- ATTRIB(XonoticMutatorsDialog, intendedWidth, float, 0.9)
- ATTRIB(XonoticMutatorsDialog, rows, float, 20)
- ATTRIB(XonoticMutatorsDialog, columns, float, 6)
- ATTRIB(XonoticMutatorsDialog, refilterEntity, entity, NULL)
-ENDCLASS(XonoticMutatorsDialog)
-#endif
+#include "weaponarenacheckbox.qh"
+#include "checkbox.qh"
+#include "slider.qh"
+#include "textlabel.qh"
+#include "checkbox_slider_invalid.qh"
+#include "radiobutton.qh"
+#include "button.qh"
-#ifdef IMPLEMENTATION
void XonoticMutatorsDialog_showNotify(entity me)
{
+ SUPER(XonoticMutatorsDialog).showNotify(me);
loadAllCvars(me);
}
string WeaponArenaString()
{
string s;
- float n, i, j;
- entity e;
+ float n, i;
s = cvar_string("g_weaponarena");
if(s == "0")
return "";
s = "";
for(i = 0; i < n; ++i)
{
- for(j = WEP_FIRST; j <= WEP_LAST; ++j)
- {
- e = get_weaponinfo(j);
- if(argv(i) == e.netname)
- s = strcat(s, " & ", e.message);
- }
+ FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ if(argv(i) == it.netname)
+ s = strcat(s, " & ", it.m_name);
+ ));
}
s = sprintf(_("%s Arena"), substring(s, 3, strlen(s) - 3));
e.cvarOffValue = "0";
for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
{
- w = get_weaponinfo(i);
+ w = Weapons_from(i);
if(w.spawnflags & WEP_FLAG_HIDDEN)
continue;
if((j & 1) == 0)
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.message)));
+ me.TD(me, 1, 1.8, e = makeXonoticWeaponarenaCheckBox(strzone(w.netname), strzone(w.m_name)));
setDependentWeird(e, checkCompatibility_weaponarena_weapon);
++j;
}
e.onClickEntity = me;
}
+.void(entity) refilter;
+
void XonoticMutatorsDialog_close(entity me)
{
if(me.refilterEntity)
me.refilterEntity.refilter(me.refilterEntity);
SUPER(XonoticMutatorsDialog).close(me);
}
-#endif