X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fradiobutton.qc;h=536ea4f154f1b07d4c9b17afe67f18a2ff176f4d;hb=0d4410adb034af1a9989862211e49e442fa9b9dd;hp=ceeae22ea060f06fd39b071852cfa2cd4263ff5c;hpb=59b6575d5306d671853a67e37aa795f45315562b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/radiobutton.qc b/qcsrc/menu/xonotic/radiobutton.qc index ceeae22ea..536ea4f15 100644 --- a/qcsrc/menu/xonotic/radiobutton.qc +++ b/qcsrc/menu/xonotic/radiobutton.qc @@ -1,32 +1,5 @@ -#ifndef RADIOBUTTON_H -#define RADIOBUTTON_H -#include "../item/radiobutton.qc" -CLASS(XonoticRadioButton, RadioButton) - METHOD(XonoticRadioButton, configureXonoticRadioButton, void(entity, float, string, string, string, string)); - METHOD(XonoticRadioButton, draw, void(entity)); - METHOD(XonoticRadioButton, setChecked, void(entity, float)); - ATTRIB(XonoticRadioButton, fontSize, float, SKINFONTSIZE_NORMAL) - ATTRIB(XonoticRadioButton, image, string, SKINGFX_RADIOBUTTON) - ATTRIB(XonoticRadioButton, color, vector, SKINCOLOR_RADIOBUTTON_N) - ATTRIB(XonoticRadioButton, colorC, vector, SKINCOLOR_RADIOBUTTON_C) - ATTRIB(XonoticRadioButton, colorF, vector, SKINCOLOR_RADIOBUTTON_F) - ATTRIB(XonoticRadioButton, colorD, vector, SKINCOLOR_RADIOBUTTON_D) +#include "radiobutton.qh" - ATTRIB(XonoticRadioButton, cvarName, string, string_null) - ATTRIB(XonoticRadioButton, cvarValue, string, string_null) - ATTRIB(XonoticRadioButton, cvarOffValue, string, string_null) - ATTRIB(XonoticRadioButton, cvarValueIsAnotherCvar, float, 0) - METHOD(XonoticRadioButton, loadCvars, void(entity)); - METHOD(XonoticRadioButton, saveCvars, void(entity)); - - ATTRIB(XonoticRadioButton, alpha, float, SKINALPHA_TEXT) - ATTRIB(XonoticRadioButton, disabledAlpha, float, SKINALPHA_DISABLED) -ENDCLASS(XonoticRadioButton) -entity makeXonoticRadioButton_T(float, string, string, string, string theTooltip); -entity makeXonoticRadioButton(float, string, string, string); -#endif - -#ifdef IMPLEMENTATION entity makeXonoticRadioButton_T(float theGroup, string theCvar, string theValue, string theText, string theTooltip) { entity me; @@ -70,7 +43,7 @@ void XonoticRadioButton_loadCvars(entity me) { if(me.cvarName) { - me.checked = !!cvar(me.cvarName); + me.checked = boolean(cvar(me.cvarName)); } else { @@ -126,4 +99,3 @@ void XonoticRadioButton_saveCvars(entity me) } } } -#endif