X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMenu.h;h=bf99bdcf9b4cddb077e5e08541197deaf8dc1154;hb=3455f3a84eef6a73f39a4267da445c7998c3515e;hp=a1fc295572453797a8bd1641bf24987849f46e21;hpb=4775ffa253110d66338030db8633463195e81615;p=lugaru.git diff --git a/Source/Menu.h b/Source/Menu.h index a1fc295..bf99bdc 100644 --- a/Source/Menu.h +++ b/Source/Menu.h @@ -35,30 +35,9 @@ struct MenuItem { float linestartsize; float lineendsize; - void init(MenuItemType _type, int _id, const string& _text, Texture _texture, + MenuItem(MenuItemType _type, int _id, const string& _text, Texture _texture, int _x, int _y, int _w, int _h, float _r, float _g, float _b, - float _linestartsize = 1, float _lineendsize = 1) { - type = _type; - id = _id; - text = _text; - texture = _texture; - x = _x; - y = _y; - w = _w; - h = _h; - r = _r; - g = _g; - b = _b; - effectfade = 0; - linestartsize = _linestartsize; - lineendsize = _lineendsize; - if (type == MenuItem::BUTTON) { - if (w == -1) - w = text.length() * 10; - if (h == -1) - h = 20; - } - } + float _linestartsize = 1, float _lineendsize = 1); }; class Menu @@ -77,6 +56,13 @@ public: static int getSelected(int mousex, int mousey); static void drawItems(); + static void Load(); + static void Tick(); + static void updateSettingsMenu(); + static void updateStereoConfigMenu(); + static void updateControlsMenu(); + static void setKeySelected(); + private: static void handleFadeEffect();