METHOD(ListBox, focusLeave, void(entity))
ATTRIB(ListBox, focusable, float, 1)
ATTRIB(ListBox, allowFocusSound, float, 1)
- ATTRIB(ListBox, selectedItem, float, 0)
+ ATTRIB(ListBox, selectedItem, int, 0)
ATTRIB(ListBox, size, vector, '0 0 0')
ATTRIB(ListBox, origin, vector, '0 0 0')
ATTRIB(ListBox, scrollPos, float, 0) // measured in window heights, fixed when needed
METHOD(TextSlider, configureTextSliderValues, void(entity, string))
ATTRIBARRAY(TextSlider, valueStrings, string, 256)
ATTRIBARRAY(TextSlider, valueIdentifiers, string, 256)
- ATTRIB(TextSlider, nValues, float, 0)
+ ATTRIB(TextSlider, nValues, int, 0)
ENDCLASS(TextSlider)
#endif
{
KeyBinder_Bind_Change(NULL, me);
}
-void XonoticKeyBinder_setSelected(entity me, float i)
+void XonoticKeyBinder_setSelected(entity me, int i)
{
// handling of "unselectable" items
i = floor(0.5 + bound(0, i, me.nItems - 1));
}
float XonoticKeyBinder_keyDown(entity me, int key, bool ascii, float shift)
{
- float r;
- r = 1;
+ bool r = true;
switch(key)
{
case K_ENTER:
void ServerList_Update_favoriteButton(entity btn, entity me);
// fields for category entities
-const float MAX_CATEGORIES = 9;
-const float CATEGORY_FIRST = 1;
+const int MAX_CATEGORIES = 9;
+const int CATEGORY_FIRST = 1;
entity categories[MAX_CATEGORIES];
-float category_ent_count;
+int category_ent_count;
.string cat_name;
.string cat_string;
.string cat_enoverride_string;
.float cat_dioverride;
// fields for drawing categories
-float category_name[MAX_CATEGORIES];
-float category_item[MAX_CATEGORIES];
-float category_draw_count;
+int category_name[MAX_CATEGORIES];
+int category_item[MAX_CATEGORIES];
+int category_draw_count;
#define SLIST_CATEGORIES \
SLIST_CATEGORY(CAT_FAVORITED, "", "", ZCTX(_("SLCAT^Favorites"))) \
}
float XonoticWeaponsList_mouseDrag(entity me, vector pos)
{
- float f, i;
- i = me.selectedItem;
- f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
+ int i = me.selectedItem;
+ float f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
if(me.pressed != 1) // don't change priority if the person is just scrolling
{