#include "item/container.qh"
#include "item/borderimage.qh"
- METHOD(Item, destroy, void(Item this))
+ METHOD(MenuItem, destroy, void(MenuItem this))
{
// free memory associated with this
}
- METHOD(Item, relinquishFocus, void(Item this))
+ METHOD(MenuItem, relinquishFocus, void(MenuItem this))
{
entity par = this.parent;
if (!par) return;
if (par.instanceOfContainer) par.setFocus(par, NULL);
}
- METHOD(Item, resizeNotify, void(Item this, vector relOrigin, vector relSize, vector absOrigin, vector absSize))
+ METHOD(MenuItem, resizeNotify, void(MenuItem this, vector relOrigin, vector relSize, vector absOrigin, vector absSize))
{
this.origin = absOrigin;
this.size = absSize;
}
int autocvar_menu_showboxes;
- METHOD(Item, draw, void(Item this))
+ METHOD(MenuItem, draw, void(MenuItem this))
{
if (!autocvar_menu_showboxes) return;
vector rgb = '1 0 1';
}
}
- METHOD(Item, showNotify, void(Item this))
+ METHOD(MenuItem, showNotify, void(MenuItem this))
{}
- METHOD(Item, hideNotify, void(Item this))
+ METHOD(MenuItem, hideNotify, void(MenuItem this))
{}
- METHOD(Item, keyDown, float(Item this, float scan, float ascii, float shift))
+ METHOD(MenuItem, keyDown, float(MenuItem this, float scan, float ascii, float shift))
{
return 0; // unhandled
}
- METHOD(Item, keyUp, float(Item this, float scan, float ascii, float shift))
+ METHOD(MenuItem, keyUp, float(MenuItem this, float scan, float ascii, float shift))
{
return 0; // unhandled
}
- METHOD(Item, mouseMove, float(Item this, vector pos))
+ METHOD(MenuItem, mouseMove, float(MenuItem this, vector pos))
{
return 0; // unhandled
}
- METHOD(Item, mousePress, bool(Item this, vector pos))
+ METHOD(MenuItem, mousePress, bool(MenuItem this, vector pos))
{
return false; // unhandled
}
- METHOD(Item, mouseDrag, float(Item this, vector pos))
+ METHOD(MenuItem, mouseDrag, float(MenuItem this, vector pos))
{
return 0; // unhandled
}
- METHOD(Item, mouseRelease, float(Item this, vector pos))
+ METHOD(MenuItem, mouseRelease, float(MenuItem this, vector pos))
{
return 0; // unhandled
}
void m_play_focus_sound();
- METHOD(Item, focusEnter, void(Item this))
+ METHOD(MenuItem, focusEnter, void(MenuItem this))
{
if (this.allowFocusSound) m_play_focus_sound();
}
- METHOD(Item, focusLeave, void(Item this))
+ METHOD(MenuItem, focusLeave, void(MenuItem this))
{}
- METHOD(Item, toString, string(Item this))
+ METHOD(MenuItem, toString, string(MenuItem this))
{
return string_null;
}
#include "draw.qh"
#include "menu.qh"
-CLASS(Item, Object)
- METHOD(Item, draw, void(Item));
- METHOD(Item, keyDown, float(Item, float, float, float));
- METHOD(Item, keyUp, float(Item, float, float, float));
- METHOD(Item, mouseMove, float(Item, vector));
- METHOD(Item, mousePress, bool(Item this, vector pos));
- METHOD(Item, mouseDrag, float(Item, vector));
- METHOD(Item, mouseRelease, float(Item, vector));
- METHOD(Item, focusEnter, void(Item));
- METHOD(Item, focusLeave, void(Item));
- METHOD(Item, resizeNotify, void(Item, vector, vector, vector, vector));
- METHOD(Item, relinquishFocus, void(Item));
- METHOD(Item, showNotify, void(Item));
- METHOD(Item, hideNotify, void(Item));
- METHOD(Item, toString, string(Item));
- METHOD(Item, destroy, void(Item));
- ATTRIB(Item, focused, float, 0);
- ATTRIB(Item, focusable, float, 0);
- ATTRIB(Item, allowFocusSound, float, 0);
- ATTRIB(Item, parent, entity);
- ATTRIB(Item, preferredFocusPriority, float, 0);
- ATTRIB(Item, origin, vector, '0 0 0');
- ATTRIB(Item, size, vector, '0 0 0');
- ATTRIB(Item, tooltip, string);
-ENDCLASS(Item)
+CLASS(MenuItem, Object)
+ METHOD(MenuItem, draw, void(MenuItem));
+ METHOD(MenuItem, keyDown, float(MenuItem, float, float, float));
+ METHOD(MenuItem, keyUp, float(MenuItem, float, float, float));
+ METHOD(MenuItem, mouseMove, float(MenuItem, vector));
+ METHOD(MenuItem, mousePress, bool(MenuItem this, vector pos));
+ METHOD(MenuItem, mouseDrag, float(MenuItem, vector));
+ METHOD(MenuItem, mouseRelease, float(MenuItem, vector));
+ METHOD(MenuItem, focusEnter, void(MenuItem));
+ METHOD(MenuItem, focusLeave, void(MenuItem));
+ METHOD(MenuItem, resizeNotify, void(MenuItem, vector, vector, vector, vector));
+ METHOD(MenuItem, relinquishFocus, void(MenuItem));
+ METHOD(MenuItem, showNotify, void(MenuItem));
+ METHOD(MenuItem, hideNotify, void(MenuItem));
+ METHOD(MenuItem, toString, string(MenuItem));
+ METHOD(MenuItem, destroy, void(MenuItem));
+ ATTRIB(MenuItem, focused, float, 0);
+ ATTRIB(MenuItem, focusable, float, 0);
+ ATTRIB(MenuItem, allowFocusSound, float, 0);
+ ATTRIB(MenuItem, parent, entity);
+ ATTRIB(MenuItem, preferredFocusPriority, float, 0);
+ ATTRIB(MenuItem, origin, vector, '0 0 0');
+ ATTRIB(MenuItem, size, vector, '0 0 0');
+ ATTRIB(MenuItem, tooltip, string);
+ENDCLASS(MenuItem)
#include <menu/item.qh>
-CLASS(Container, Item)
+CLASS(Container, MenuItem)
METHOD(Container, draw, void(entity));
METHOD(Container, keyUp, float(entity, float, float, float));
METHOD(Container, keyDown, float(entity, float, float, float));
#pragma once
#include "../item.qh"
-CLASS(Image, Item)
+CLASS(Image, MenuItem)
METHOD(Image, configureImage, void(entity, string));
METHOD(Image, draw, void(entity));
METHOD(Image, toString, string(entity));
}
// skipping SUPER(InputBox).draw(me);
- Item_draw(me);
+ MenuItem_draw(me);
}
void InputBox_showNotify(entity me)
#pragma once
#include "../item.qh"
-CLASS(Label, Item)
+CLASS(Label, MenuItem)
METHOD(Label, configureLabel, void(entity, string, float, float));
METHOD(Label, draw, void(entity));
METHOD(Label, resizeNotify, void(entity, vector, vector, vector, vector));
#pragma once
#include "../item.qh"
-CLASS(ListBox, Item)
+CLASS(ListBox, MenuItem)
METHOD(ListBox, resizeNotify, void(entity, vector, vector, vector, vector));
METHOD(ListBox, configureListBox, void(entity, float, float));
METHOD(ListBox, draw, void(entity));
#pragma once
#include "../item.qh"
-CLASS(XonoticCrosshairPreview, Item)
+CLASS(XonoticCrosshairPreview, MenuItem)
METHOD(XonoticCrosshairPreview, configureXonoticCrosshairPreview, void(entity));
METHOD(XonoticCrosshairPreview, draw, void(entity));
ATTRIB(XonoticCrosshairPreview, src, string);
#pragma once
#include "../item.qh"
-CLASS(XonoticPicker, Item)
+CLASS(XonoticPicker, MenuItem)
METHOD(XonoticPicker, configureXonoticPicker, void(entity));
METHOD(XonoticPicker, mousePress, bool(XonoticPicker this, vector pos));
METHOD(XonoticPicker, mouseRelease, float(entity, vector));