From 60b252c584adc35f02ce2e00ea4556cc2a81958d Mon Sep 17 00:00:00 2001 From: Jakob Fries Date: Sat, 14 Jul 2007 23:08:17 +0000 Subject: [PATCH] --- datasrc/client.dts | 22 ++++++++++++ datasrc/teewars.ds | 74 ++++++++++++++++++++++++++++++++++++++++ src/game/client/menu.cpp | 2 ++ 3 files changed, 98 insertions(+) diff --git a/datasrc/client.dts b/datasrc/client.dts index 12189231f..bb8e157a4 100644 --- a/datasrc/client.dts +++ b/datasrc/client.dts @@ -62,6 +62,26 @@ struct animation { instance:sequence attach = attach } +struct gui_box { + int x = @1 + int y = @2 + int w = @3 + int h = @4 +} + +struct gui_compositebox { + instance:gui_box rect = rect + instance:gui_box center = center +} + +struct gui_widgets { + array:gui_compositebox boxes = boxes.* + array:gui_box misc = misc.* +} + +const array:int gui_box = gui.boxes.* +const array:int gui_misc = gui.misc.* + struct data_container { array:image images = images.* array:spriteset spritesets = sprites.* @@ -71,6 +91,8 @@ struct data_container { array:soundset sounds = sounds.* array:animation animations = animations.* + + instance:gui_widgets gui = gui } const array:int weapon = weapons.* diff --git a/datasrc/teewars.ds b/datasrc/teewars.ds index 45df436c9..9923a5128 100644 --- a/datasrc/teewars.ds +++ b/datasrc/teewars.ds @@ -413,3 +413,77 @@ animations { } } } + +gui { + boxes { + button { + rect 0 0 48 48 + center 16 16 16 16 + } + + screen_thick { + rect 0 384 48 48 + center 16 400 16 16 + } + + screen_transparent { + rect 48 384 48 48 + center 64 400 16 16 + } + + screen_info { + rect 96 384 48 48 + center 112 400 16 16 + } + + screen_textbox { + rect 144 384 48 48 + center 160 400 16 16 + } + + screen_list { + rect 192 384 48 48 + center 208 400 16 16 + } + } + + misc { + button_big_topleft 0 0 16 16 + button_big_topmid 16 0 16 16 + button_big_topright 32 0 16 16 + button_big_midleft 0 16 16 16 + button_big_midmid 16 16 16 16 + button_big_midright 32 16 16 16 + button_big_btmleft 0 32 16 16 + button_big_btmmid 16 32 16 16 + button_big_btmright 32 32 16 16 + slider_big_horiz_begin 0 48 16 16 + slider_big_horiz_mid 16 48 16 16 + slider_big_horiz_end 32 48 16 16 + slider_small_horiz_begin 0 96 16 16 + slider_small_horiz_mid 16 96 16 16 + slider_small_horiz_end 32 96 16 16 + slider_small_vert_begin 48 96 16 16 + radio_unchecked 64 112 32 32 + radio_checked 96 112 32 32 + slider_small_vert_mid 48 112 16 16 + slider_small_vert_end 48 128 16 16 + slider_big_vert_begin 48 48 16 16 + slider_big_handle_vert 64 48 16 32 + slider_big_handle_horiz 80 64 32 16 + slider_small_handle_horiz 80 48 16 16 + slider_big_arrow_left 0 64 16 16 + slider_big_arrow_up 16 64 16 16 + slider_big_arrow_right 32 64 16 16 + slider_big_arrow_down 16 80 16 16 + slider_small_arrow_left 0 112 16 16 + slider_small_arrow_up 16 112 16 16 + slider_small_arrow_right 32 112 16 16 + slider_small_arrow_down 16 128 16 16 + slider_small_handle_vert 96 48 16 16 + slider_big_vert_mid 48 64 16 16 + slider_big_vert_end 48 80 16 16 + checkbox_unchecked 64 112 32 32 + checkbox_checked 96 112 32 32 + } +} diff --git a/src/game/client/menu.cpp b/src/game/client/menu.cpp index 276ff4266..1ff33670a 100644 --- a/src/game/client/menu.cpp +++ b/src/game/client/menu.cpp @@ -21,6 +21,8 @@ #include "mapres_tilemap.h" #include +#include "data.h" + using namespace baselib; /********************************************************