Make NEW_DRAW unconditionally, WML side.

Remove the condition from the WML, also a few code changes which are not
longer needed, now that the WML has been converted.
This commit is contained in:
Mark de Wever 2008-12-29 08:51:37 +00:00
parent c2368c2b61
commit 2cc2a51603
7 changed files with 3 additions and 340 deletions

View file

@ -7,162 +7,6 @@
### but to show them they are kept here commented out.
###
[listbox_definition]
#ifdef NEW_DRAW
id = "default-do_not_use"
#else
id = "default"
#endif
description = "a listbox"
[resolution]
# The minimum values are set pretty low bit low and if more buttons are
# enabled the minimum should be increased. For now the minimum should
# work for all resolutions, due to the low minimum values. NOTE not
# fully tested yet.
min_width = 40
min_height = 70
default_width = 40
default_height = 70
max_width = 0
max_height = 0
[state_enabled]
[draw]
[/draw]
[/state_enabled]
[state_disabled]
[draw]
[/draw]
[/state_disabled]
[scrollbar]
# [row]
# [column]
# # note we want a special button definition for this later.
# [button]
# id = "_begin" # FIXME look whether or not to rename to top and bottom
# definition = "default"
#
# label = "begin"
# [/button]
# [/column]
# [/row]
# [row]
# [column]
# # note we want a special button definition for this later.
# [button]
# id = "_page_up"
# definition = "default"
#
# label = "page up"
# [/button]
# [/column]
# [/row]
[row]
[column]
# note we want a special button definition for this later.
[button]
id = "_half_page_up"
definition = "up_arrow"
[/button]
[/column]
[/row]
# [row]
# [column]
# # note we want a special button definition for this later.
# [button]
# id = "_line_up"
# definition = "default"
#
# label = "line up"
# [/button]
# [/column]
# [/row]
[row]
grow_factor = 1
[column]
vertical_grow = "true"
[vertical_scrollbar]
id = "_scrollbar"
definition = "default"
[/vertical_scrollbar]
[/column]
[/row]
# [row]
# [column]
# # note we want a special button definition for this later.
# [button]
# id = "_line_down"
# definition = "default"
#
# label = "line down"
# [/button]
# [/column]
# [/row]
[row]
[column]
# note we want a special button definition for this later.
[button]
id = "_half_page_down"
definition = "down_arrow"
[/button]
[/column]
[/row]
# [row]
# [column]
# # note we want a special button definition for this later.
# [button]
# id = "_page_down"
# definition = "default"
#
# label = "page down"
# [/button]
# [/column]
# [/row]
# [row]
# [column]
# # note we want a special button definition for this later.
# [button]
# id = "_end"
# definition = "default"
#
# label = "end"
# [/button]
# [/column]
# [/row]
[/scrollbar]
[/resolution]
[/listbox_definition]
#ifdef NEW_DRAW
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED
[resolution]
@ -292,7 +136,6 @@
[listbox_definition]
id = "default"
# id = "test"
description = "Testing version."
{_GUI_RESOLUTION
@ -316,8 +159,3 @@
#undef _GUI_RESOLUTION
#endif

View file

@ -3,160 +3,6 @@
### Definition of a scroll label.
###
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED
[resolution]
{RESOLUTION}
min_width = 0
min_height = 0
default_width = 0
default_height = 0
max_width = 0
max_height = 0
text_font_size = {FONT_SIZE}
text_font_style = {FONT_STYLE}
[state_enabled]
full_redraw = "true"
[draw]
[/draw]
[/state_enabled]
[state_disabled]
full_redraw = "true"
[draw]
[/draw]
[/state_disabled]
[grid]
[row]
[column]
[grid]
id = "_content_grid"
[row]
[column]
horizontal_grow = "true"
vertical_grow = "true"
[label]
id = "_label"
definition = "default"
[/label]
[/column]
[/row]
[/grid]
[/column]
[column]
[grid]
#TODO the definition of this might be one macro...
# evaluate later.
id = "_scrollbar_grid"
[row]
[column]
# note we want a special button definition for this later.
[button]
id = "_half_page_up"
definition = "up_arrow"
[/button]
[/column]
[/row]
[row]
grow_factor = 1
[column]
vertical_grow = "true"
[vertical_scrollbar]
id = "_scrollbar"
definition = "default"
[/vertical_scrollbar]
[/column]
[/row]
[row]
[column]
# note we want a special button definition for this later.
[button]
id = "_half_page_down"
definition = "down_arrow"
[/button]
[/column]
[/row]
[/grid]
[/column]
[/row]
[/grid]
[/resolution]
#enddef
[scroll_label_definition]
id = "default"
description = "The default scroll label."
{_GUI_RESOLUTION
({GUI_TINY__RESOLUTION})
({GUI_TINY__FONT_SIZE__DEFAULT})
()
({GUI__FONT_COLOUR_ENABLED__DEFAULT})
({GUI__FONT_COLOUR_DISABLED__DEFAULT})
}
{_GUI_RESOLUTION
({GUI_NORMAL__RESOLUTION})
({GUI_NORMAL__FONT_SIZE__DEFAULT})
()
({GUI__FONT_COLOUR_ENABLED__DEFAULT})
({GUI__FONT_COLOUR_DISABLED__DEFAULT})
}
[/scroll_label_definition]
#undef _GUI_RESOLUTION
#ifdef NEW_DRAW
#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_STYLE FONT_COLOUR_ENABLED FONT_COLOUR_DISABLED
[resolution]
@ -255,8 +101,8 @@
#enddef
[scroll_label_definition]
id = "test"
description = "Testing version."
id = "default"
description = "The default scroll label."
{_GUI_RESOLUTION
({GUI_TINY__RESOLUTION})
@ -279,5 +125,3 @@
#undef _GUI_RESOLUTION
#endif

View file

@ -393,11 +393,7 @@
[scroll_label] # NOTE maybe change the code to use message instead of label as id
id = "label"
#ifdef NEW_DRAW
definition = "test"
#else
definition = "default"
#endif
[/scroll_label]
[/column]
@ -611,11 +607,7 @@
[scroll_label]
id = "label"
#ifdef NEW_DRAW
definition = "test"
#else
definition = "default"
#endif
[/scroll_label]
[/column]

View file

@ -101,11 +101,7 @@
[listbox]
id = "method_list"
#ifdef NEW_DRAW
definition = "test"
#else
definition = "default"
#endif
vertical_scrollbar_mode = "never"
assume_fixed_row_size = "true"

View file

@ -66,11 +66,8 @@
[listbox]
id = "server_list"
#ifdef NEW_DRAW
definition = "test"
#else
definition = "default"
#endif
assume_fixed_row_size = "true"
[header]

View file

@ -85,7 +85,6 @@ namespace game_config {
defines_map_["APPLE"] = preproc_define();
#endif
defines_map_["NEW_DRAW"] = preproc_define();
}
void config_cache::get_config(const std::string& path, config& cfg)

View file

@ -702,12 +702,9 @@ tlistbox_definition::tresolution::tresolution(const config& cfg) :
const config* child = cfg.child("grid");
if(child) { // HACK needed to support old grids
VALIDATE(child, _("No grid defined."));
grid = new tbuilder_grid(*child);
}
}
tmenubar_definition::tmenubar_definition(const config& cfg) :