X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcheckbox_slider_invalid.qc;h=9dae25a35bb214d138c9a8c4c57ad3f54c5de3c7;hp=e3043184a44f35cd2676375466fff57ec9c91014;hb=cd508c593bc52d211c1675e1e52ae741cc487ab3;hpb=244e5081c5c503c307e557c98ac864f6c9731475 diff --git a/qcsrc/menu/xonotic/checkbox_slider_invalid.qc b/qcsrc/menu/xonotic/checkbox_slider_invalid.qc index e3043184a..9dae25a35 100644 --- a/qcsrc/menu/xonotic/checkbox_slider_invalid.qc +++ b/qcsrc/menu/xonotic/checkbox_slider_invalid.qc @@ -1,8 +1,10 @@ -#ifdef INTERFACE -CLASS(XonoticSliderCheckBox) EXTENDS(CheckBox) - METHOD(XonoticSliderCheckBox, configureXonoticSliderCheckBox, void(entity, float, float, entity, string)) - METHOD(XonoticSliderCheckBox, setChecked, void(entity, float)) - METHOD(XonoticSliderCheckBox, draw, void(entity)) +#ifndef CHECKBOX_SLIDER_INVALID_H +#define CHECKBOX_SLIDER_INVALID_H +#include "../item/checkbox.qc" +CLASS(XonoticSliderCheckBox, CheckBox) + METHOD(XonoticSliderCheckBox, configureXonoticSliderCheckBox, void(entity, float, float, entity, string)); + METHOD(XonoticSliderCheckBox, setChecked, void(entity, float)); + METHOD(XonoticSliderCheckBox, draw, void(entity)); ATTRIB(XonoticSliderCheckBox, fontSize, float, SKINFONTSIZE_NORMAL) ATTRIB(XonoticSliderCheckBox, image, string, SKINGFX_CHECKBOX) @@ -26,7 +28,7 @@ entity makeXonoticSliderCheckBox(float, float, entity, string); entity makeXonoticSliderCheckBox(float theOffValue, float isInverted, entity theControlledSlider, string theText) { entity me; - me = spawnXonoticSliderCheckBox(); + me = NEW(XonoticSliderCheckBox); me.configureXonoticSliderCheckBox(me, theOffValue, isInverted, theControlledSlider, theText); return me; } @@ -41,8 +43,8 @@ void XonoticSliderCheckBox_configureXonoticSliderCheckBox(entity me, float theOf me.savedValue = theControlledSlider.valueMin; me.controlledSlider = theControlledSlider; me.configureCheckBox(me, theText, me.fontSize, me.image); - me.tooltip = theControlledSlider.tooltip; me.cvarName = theControlledSlider.cvarName; // in case we want to display the cvar in the tooltip + me.tooltip = theControlledSlider.tooltip; } void XonoticSliderCheckBox_draw(entity me) {