]> git.jsancho.org Git - lugaru.git/blob - Source/Menu.h
major refactor of menu system, part 1
[lugaru.git] / Source / Menu.h
1 #ifndef _MENU_H_
2 #define _MENU_H_
3
4 #include "Game.h"
5
6 namespace Menu {
7     typedef void(*MBCallback)(int id);
8
9     void GUITick(Game* game);
10     void clearMenu();
11     void addLabel(int id,const string& label,int x,int y);
12     void addButton(int id,const string& label,MBCallback cb,int x,int y,int w,int h);
13     void addButton(int id,const string& label,MBCallback cb,int x,int y,int w,int h,float r,float g,float b);
14     void addImage(int id,int texture,int x,int y,int w,int h);
15     void addImageButton(int id,int texture,MBCallback cb,int x,int y,int w,int h);
16     void addImageButton(int id,int texture,MBCallback cb,int x,int y,int w,int h,float r,float g,float b);
17     void addMapLine(const XYZ& start, const XYZ& end, float startsize, float endsize, float r,float g,float b);
18     void addMapMarker(int id,int texture,MBCallback cb,int x,int y,int w,int h,float r,float g,float b);
19     void setMapItem(int id);
20     void setButtonText(int id,const string& label);
21     void setButtonText(int id,const string& label,int x,int y,int w,int h);
22     int getSelected(int mousex, int mousey);
23     void drawItems(Game* game);
24 }
25
26 #endif