]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Menu.h
major refactor of menu system, part 2
[lugaru.git] / Source / Menu.h
index f671ebc51ab105832b280351729d72a82c86edd9..a4a2e9c5b90a92a042a14887faae856615cbd0f1 100644 (file)
@@ -4,23 +4,18 @@
 #include "Game.h"
 
 namespace Menu {
-    typedef void(*MBCallback)(int id);
-
-    void GUITick(Game* game);
     void clearMenu();
-    void addLabel(int id,const string& label,int x,int y);
-    void addButton(int id,const string& label,MBCallback cb,int x,int y,int w,int h);
-    void addButton(int id,const string& label,MBCallback cb,int x,int y,int w,int h,float r,float g,float b);
-    void addImage(int id,int texture,int x,int y,int w,int h);
-    void addImageButton(int id,int texture,MBCallback cb,int x,int y,int w,int h);
-    void addImageButton(int id,int texture,MBCallback cb,int x,int y,int w,int h,float r,float g,float b);
-    void addMapLine(const XYZ& start, const XYZ& end, float startsize, float endsize, float r,float g,float b);
-    void addMapMarker(int id,int texture,MBCallback cb,int x,int y,int w,int h,float r,float g,float b);
-    void setMapItem(int id);
-    void setButtonText(int id,const string& label);
-    void setButtonText(int id,const string& label,int x,int y,int w,int h);
+    void addLabel(int id,const string& text,int x,int y,float r=1,float g=0,float b=0);
+    void addButton(int id,const string& text,int x,int y,float r=1,float g=0,float b=0);
+    void addImage(int id,int texture,int x,int y,int w,int h,float r=1,float g=1,float b=1);
+    void addButtonImage(int id,int texture,int x,int y,int w,int h,float r=1,float g=1,float b=1);
+    void addMapLine(int x, int y, int w, int h, float startsize, float endsize, float r,float g,float b);
+    void addMapMarker(int id,int texture,int x,int y,int w,int h,float r,float g,float b);
+    void addMapLabel(int id,const string& text,int x,int y,float r=1,float g=0,float b=0);
+    void setText(int id,const string& text);
+    void setText(int id,const string& text,int x,int y,int w,int h);
     int getSelected(int mousex, int mousey);
-    void drawItems(Game* game);
+    void drawItems();
 }
 
 #endif