From a95fa8f79211e1411968eb6ee4d5f1a13dc530a8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 17 Feb 2011 00:01:53 +0100 Subject: [PATCH] Move cb_offset and cb_src initialization to the right place --- qcsrc/menu/item/inputbox.c | 2 -- qcsrc/menu/xonotic/inputbox.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/menu/item/inputbox.c b/qcsrc/menu/item/inputbox.c index 67ac8e9957..dcf7f2cc58 100644 --- a/qcsrc/menu/item/inputbox.c +++ b/qcsrc/menu/item/inputbox.c @@ -32,10 +32,8 @@ CLASS(InputBox) EXTENDS(Label) ATTRIB(InputBox, enableClearButton, float, 1) ATTRIB(InputBox, clearButton, entity, NULL) ATTRIB(InputBox, cb_size, vector, '0 0 0') - ATTRIB(InputBox, cb_offset, float, SKINOFFSET_CLEARBUTTON) // bound to range -1, 0 ATTRIB(InputBox, cb_pressed, float, 0) ATTRIB(InputBox, cb_focused, float, 0) - ATTRIB(InputBox, cb_src, string, SKINGFX_CLEARBUTTON) ENDCLASS(InputBox) void InputBox_Clear_Click(entity btn, entity me); #endif diff --git a/qcsrc/menu/xonotic/inputbox.c b/qcsrc/menu/xonotic/inputbox.c index 2a9c094b8e..9e42f3bf6f 100644 --- a/qcsrc/menu/xonotic/inputbox.c +++ b/qcsrc/menu/xonotic/inputbox.c @@ -16,6 +16,10 @@ CLASS(XonoticInputBox) EXTENDS(InputBox) ATTRIB(XonoticInputBox, alpha, float, SKINALPHA_TEXT) + // Clear button attributes + ATTRIB(XonoticInputBox, cb_offset, float, SKINOFFSET_CLEARBUTTON) // bound to range -1, 0 + ATTRIB(XonoticInputBox, cb_src, string, SKINGFX_CLEARBUTTON) + ATTRIB(XonoticInputBox, cvarName, string, string_null) METHOD(XonoticInputBox, loadCvars, void(entity)) METHOD(XonoticInputBox, saveCvars, void(entity)) -- 2.39.2