diff options
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/gc_client.cpp | 6 | ||||
| -rw-r--r-- | src/game/client/gc_mapres_tilemap.cpp | 7 | ||||
| -rw-r--r-- | src/game/client/gc_menu.cpp | 21 |
3 files changed, 21 insertions, 13 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index 68c6db00..9c70bd86 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -47,10 +47,6 @@ enum CHATMODE_REMOTECONSOLE, }; -typedef struct -{ - float x, y, w, h; -} RECT; RECT *ui2_screen(); static int chat_mode = CHATMODE_NONE; @@ -1885,7 +1881,7 @@ int emoticon_selector_render() emoticon_selector_active = false; } - RECT screen = *ui2_screen(); + RECT screen = *ui_screen(); gfx_mapscreen(screen.x, screen.y, screen.w, screen.h); diff --git a/src/game/client/gc_mapres_tilemap.cpp b/src/game/client/gc_mapres_tilemap.cpp index 6e687495..d94add17 100644 --- a/src/game/client/gc_mapres_tilemap.cpp +++ b/src/game/client/gc_mapres_tilemap.cpp @@ -9,6 +9,13 @@ int tilemap_init() { return 0; } +/* +struct render_info +{ + unsigned char *data; +}; + +void tilemap_render_one()*/ void tilemap_render(float scale, int fg) { diff --git a/src/game/client/gc_menu.cpp b/src/game/client/gc_menu.cpp index 17716bd6..5062b15b 100644 --- a/src/game/client/gc_menu.cpp +++ b/src/game/client/gc_menu.cpp @@ -70,6 +70,7 @@ static vec4 color_tabbar_active = color_tabbar_active_outgame; enum { + /* CORNER_TL=1, CORNER_TR=2, CORNER_BL=4, @@ -81,6 +82,7 @@ enum CORNER_L=CORNER_TL|CORNER_BL, CORNER_ALL=CORNER_T|CORNER_B, + */ PAGE_NEWS=0, PAGE_INTERNET, @@ -90,11 +92,11 @@ enum //PAGE_GAME, // not a real page PAGE_SYSTEM, }; - +/* typedef struct { float x, y, w, h; -} RECT; +} RECT;*/ static RECT screen = { 0.0f, 0.0f, 848.0f, 480.0f }; @@ -286,7 +288,7 @@ int ui2_do_button(const void *id, const char *text, int checked, const RECT *r, { /* logic */ int ret = 0; - int inside = ui_mouse_inside(r->x,r->y,r->w,r->h); + int inside = ui_mouse_inside(r); if(ui_active_item() == id) { @@ -461,7 +463,7 @@ static void ui2_draw_checkbox_number(const void *id, const char *text, int check int ui2_do_edit_box(void *id, const RECT *rect, char *str, int str_size, bool hidden=false) { - int inside = ui_mouse_inside(rect->x,rect->y,rect->w,rect->h); + int inside = ui_mouse_inside(rect); int r = 0; static int at_index = 0; @@ -592,7 +594,7 @@ float ui2_do_scrollbar_v(const void *id, const RECT *rect, float current) /* logic */ float ret = current; - int inside = ui_mouse_inside(handle.x,handle.y,handle.w,handle.h); + int inside = ui_mouse_inside(&handle); if(ui_active_item() == id) { @@ -648,7 +650,7 @@ float ui2_do_scrollbar_h(const void *id, const RECT *rect, float current) /* logic */ float ret = current; - int inside = ui_mouse_inside(handle.x,handle.y,handle.w,handle.h); + int inside = ui_mouse_inside(&handle); if(ui_active_item() == id) { @@ -696,7 +698,7 @@ int ui2_do_key_reader(void *id, const RECT *rect, int key) { // process static bool mouse_released = true; - int inside = ui_mouse_inside(rect->x, rect->y, rect->w, rect->h); + int inside = ui_mouse_inside(rect); int new_key = key; if(!ui_mouse_button(0)) @@ -895,7 +897,10 @@ void render_loading(float percent) const char *caption = "Loading"; tw = gfx_pretty_text_width(48.0f, caption, -1); - ui_do_label(x+w/2-tw/2, y+20, caption, 48.0f); + RECT r; + r.x = x+w/2; + r.y = y+20; + ui_do_label(&r, caption, 48.0f, 0, -1); gfx_texture_set(-1); gfx_quads_begin(); |