COLOR_INPUTBOX_N '1 1 1'
COLOR_INPUTBOX_F '1 1 1'
MARGIN_INPUTBOX_CHARS 1
+
+// item: clear button
+// uses "clearbutton" images
OFFSET_CLEARBUTTON -0.3
+COLOR_CLEARBUTTON_N '1 1 1'
+COLOR_CLEARBUTTON_C '1 1 1'
+COLOR_CLEARBUTTON_F '1 1 1'
// item: key grabber
COLOR_KEYGRABBER_TITLES '1 1 1'
COLOR_INPUTBOX_N '1 1 1'
COLOR_INPUTBOX_F '1 1 1'
MARGIN_INPUTBOX_CHARS 1
+
+// item: clear button
+// uses "clearbutton" images
OFFSET_CLEARBUTTON -0.5
+COLOR_CLEARBUTTON_N '1 1 1'
+COLOR_CLEARBUTTON_C '1 1 1'
+COLOR_CLEARBUTTON_F '1 1 1'
// item: key grabber
COLOR_KEYGRABBER_TITLES '1 1 1'
COLOR_INPUTBOX_N '1 1 1'
COLOR_INPUTBOX_F '1 1 1'
MARGIN_INPUTBOX_CHARS 1
+
+// item: clear button
+// uses "clearbutton" images
OFFSET_CLEARBUTTON 0
+COLOR_CLEARBUTTON_N '1 1 1'
+COLOR_CLEARBUTTON_C '1 1 1'
+COLOR_CLEARBUTTON_F '1 1 1'
// item: key grabber
COLOR_KEYGRABBER_TITLES '1 1 1'
ATTRIB(InputBox, cb_width, float, 0)
ATTRIB(InputBox, cb_pressed, float, 0)
ATTRIB(InputBox, cb_focused, float, 0)
+ ATTRIB(InputBox, cb_color, vector, '1 1 1')
+ ATTRIB(InputBox, cb_colorF, vector, '1 1 1')
+ ATTRIB(InputBox, cb_colorC, vector, '1 1 1')
ENDCLASS(InputBox)
void InputBox_Clear_Click(entity btn, entity me);
#endif
if (me.text != "")
{
if(me.focused && me.cb_pressed)
- draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_c"), eX * me.cb_width + eY, '1 1 1', 1);
+ draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_c"), eX * me.cb_width + eY, me.cb_colorC, 1);
else if(me.focused && me.cb_focused)
- draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_f"), eX * me.cb_width + eY, '1 1 1', 1);
+ draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_f"), eX * me.cb_width + eY, me.cb_colorF, 1);
else
- draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_n"), eX * me.cb_width + eY, '1 1 1', 1);
+ draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_n"), eX * me.cb_width + eY, me.cb_color, 1);
}
// skipping SUPER(InputBox).draw(me);
SKINSTRING(GFX_INPUTBOX, "inputbox");
SKINVECTOR(COLOR_INPUTBOX_N, '1 1 1');
SKINVECTOR(COLOR_INPUTBOX_F, '1 1 1');
+ SKINFLOAT(MARGIN_INPUTBOX_CHARS, 1);
+
+ // item: clear button
SKINSTRING(GFX_CLEARBUTTON, "clearbutton");
SKINFLOAT(OFFSET_CLEARBUTTON, 0);
- SKINFLOAT(MARGIN_INPUTBOX_CHARS, 1);
+ SKINVECTOR(COLOR_CLEARBUTTON_N, '1 1 1');
+ SKINVECTOR(COLOR_CLEARBUTTON_F, '1 1 1');
+ SKINVECTOR(COLOR_CLEARBUTTON_C, '1 1 1');
// item: key grabber
SKINVECTOR(COLOR_KEYGRABBER_TITLES, '1 1 1');
me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
e.color = SKINCOLOR_CVARLIST_CONTROLS;
e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
+ e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
+ e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
+ e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
e.onChange = CvarList_Filter_Change;
e.onChangeEntity = cvarlist;
cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
cvarlist.cvarValueBox = e;
e.color = SKINCOLOR_CVARLIST_CONTROLS;
e.colorF = SKINCOLOR_CVARLIST_CONTROLS;
+ e.cb_color = SKINCOLOR_CVARLIST_CONTROLS;
+ e.cb_colorC = SKINCOLOR_CVARLIST_CONTROLS;
+ e.cb_colorF = SKINCOLOR_CVARLIST_CONTROLS;
e.onChange = CvarList_Value_Change;
e.onChangeEntity = cvarlist;
e.onEnter = CvarList_End_Editing;
// Clear button attributes
ATTRIB(XonoticInputBox, cb_offset, float, SKINOFFSET_CLEARBUTTON) // bound to range -1, 0
ATTRIB(XonoticInputBox, cb_src, string, SKINGFX_CLEARBUTTON)
+ ATTRIB(XonoticInputBox, cb_color, vector, SKINCOLOR_CLEARBUTTON_N)
+ ATTRIB(XonoticInputBox, cb_colorF, vector, SKINCOLOR_CLEARBUTTON_F)
+ ATTRIB(XonoticInputBox, cb_colorC, vector, SKINCOLOR_CLEARBUTTON_C)
ATTRIB(XonoticInputBox, cvarName, string, string_null)
METHOD(XonoticInputBox, loadCvars, void(entity))