Enable the hidden join observe buttons per row

This commit is contained in:
Mark de Wever 2010-03-26 15:47:08 +00:00
parent 4ab9fd8e95
commit b84f2ebff0
5 changed files with 31 additions and 10 deletions

View file

@ -10,6 +10,7 @@ Version 1.9.0-svn:
* Removed the unused gui2 menu bar
* Added a window register framework
* Enabled the --new-widgets MP create dialog again
* Enable the hidden join observe buttons per row
Version 1.8.0:
* AI:

View file

@ -188,16 +188,16 @@
[/row]
[/grid]
{VERTICAL_END}
# {HORIZONTAL_SEP}
# horizontal_alignment = "right"
# [grid]
# [row]
# {GAMELISTBOX_BODY_BUTTON "join" "Join"}
# [/row]
# [row]
# {GAMELISTBOX_BODY_BUTTON "observe" "Observe"}
# [/row]
# [/grid]
{HORIZONTAL_SEP}
horizontal_alignment = "right"
[grid]
[row]
{GAMELISTBOX_BODY_BUTTON "join" "Join"}
[/row]
[row]
{GAMELISTBOX_BODY_BUTTON "observe" "Observe"}
[/row]
[/grid]
{HORIZONTAL_END}
[/toggle_panel]
[/column]

View file

@ -7,9 +7,12 @@ Version 1.9.0-svn:
* Northern Rebirth:
* In Showdown, you recover full gold only if Sisal survived the previous
scenario.
* Language and i18n:
* Updated translations:
* User interface:
* Show join and observe buttons per row in the lobby.
Version 1.8.0:
* Campaigns:

View file

@ -44,6 +44,10 @@ ttoggle_panel::ttoggle_panel()
connect_signal<event::MOUSE_LEAVE>(boost::bind(
&ttoggle_panel::signal_handler_mouse_leave, this, _2, _3));
connect_signal<event::LEFT_BUTTON_CLICK>(boost::bind(
&ttoggle_panel::signal_handler_pre_left_button_click
, this, _2)
, event::tdispatcher::back_pre_child);
connect_signal<event::LEFT_BUTTON_CLICK>(boost::bind(
&ttoggle_panel::signal_handler_left_button_click
, this, _2, _3));
@ -178,6 +182,17 @@ void ttoggle_panel::signal_handler_mouse_leave(
handled = true;
}
void ttoggle_panel::signal_handler_pre_left_button_click(
const event::tevent event)
{
DBG_GUI_E << get_control_type() << "[" << id() << "]: " << event << ".\n";
set_value(true);
if(callback_state_change_) {
callback_state_change_(this);
}
}
void ttoggle_panel::signal_handler_left_button_click(
const event::tevent event, bool& handled)
{

View file

@ -177,6 +177,8 @@ private:
void signal_handler_mouse_leave(const event::tevent event, bool& handled);
void signal_handler_pre_left_button_click(const event::tevent event);
void signal_handler_left_button_click(
const event::tevent event, bool& handled);