mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-14 01:29:12 +00:00
Apply patch #521
This commit is contained in:
parent
9b2627835f
commit
2c7fe035aa
@ -61,6 +61,7 @@ SVN trunk (1.1.2+svn):
|
||||
* misc
|
||||
* fix alt key under MacosX
|
||||
* help contents available from title screen
|
||||
* preferences available from multiplayer lobby
|
||||
|
||||
Version 1.1.2:
|
||||
* campaigns
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "network.hpp"
|
||||
#include "playcampaign.hpp"
|
||||
#include "preferences.hpp"
|
||||
#include "preferences_display.hpp"
|
||||
#include "random.hpp"
|
||||
#include "replay.hpp"
|
||||
#include "video.hpp"
|
||||
@ -386,6 +387,14 @@ void enter_lobby_mode(display& disp, const config& game_config, game_data& data,
|
||||
}
|
||||
break;
|
||||
case mp::ui::QUIT:
|
||||
return;
|
||||
case mp::ui::PREFERENCES:
|
||||
{
|
||||
const preferences::display_manager disp_manager(&disp);
|
||||
preferences::show_preferences_dialog(disp,game_config);
|
||||
disp.redraw_everything();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -448,6 +448,7 @@ lobby::lobby(display& disp, const config& cfg, chat& c, config& gamelist) :
|
||||
observe_game_(disp.video(), _("Observe Game")),
|
||||
join_game_(disp.video(), _("Join Game")),
|
||||
create_game_(disp.video(), _("Create Game")),
|
||||
game_preferences_(disp.video(), _("Preferences")),
|
||||
quit_game_(disp.video(), _("Quit")),
|
||||
sorter_(gamelist),
|
||||
games_menu_(disp.video()),
|
||||
@ -466,6 +467,7 @@ void lobby::hide_children(bool hide)
|
||||
observe_game_.hide(hide);
|
||||
join_game_.hide(hide);
|
||||
create_game_.hide(hide);
|
||||
game_preferences_.hide(hide);
|
||||
quit_game_.hide(hide);
|
||||
}
|
||||
|
||||
@ -476,7 +478,8 @@ void lobby::layout_children(const SDL_Rect& rect)
|
||||
join_game_.set_location(xscale(12),yscale(7));
|
||||
observe_game_.set_location(join_game_.location().x + join_game_.location().w + 5,yscale(7));
|
||||
create_game_.set_location(observe_game_.location().x + observe_game_.location().w + 5,yscale(7));
|
||||
quit_game_.set_location(create_game_.location().x + create_game_.location().w + 5,yscale(7));
|
||||
game_preferences_.set_location(create_game_.location().x + create_game_.location().w + 5,yscale(7));
|
||||
quit_game_.set_location(game_preferences_.location().x + game_preferences_.location().w + 5,yscale(7));
|
||||
|
||||
games_menu_.set_location(client_area().x, client_area().y + title().height());
|
||||
games_menu_.set_measurements(client_area().w, client_area().h
|
||||
@ -536,6 +539,11 @@ void lobby::process_event()
|
||||
return;
|
||||
}
|
||||
|
||||
if(game_preferences_.pressed()) {
|
||||
set_result(PREFERENCES);
|
||||
return;
|
||||
}
|
||||
|
||||
if(quit_game_.pressed()) {
|
||||
recorder.set_skip(false);
|
||||
set_result(QUIT);
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
gui::button observe_game_;
|
||||
gui::button join_game_;
|
||||
gui::button create_game_;
|
||||
gui::button game_preferences_;
|
||||
gui::button quit_game_;
|
||||
|
||||
lobby_sorter sorter_;
|
||||
|
@ -70,7 +70,7 @@ private:
|
||||
class ui : public gui::widget
|
||||
{
|
||||
public:
|
||||
enum result { CONTINUE, JOIN, OBSERVE, CREATE, PLAY, QUIT };
|
||||
enum result { CONTINUE, JOIN, OBSERVE, CREATE, PREFERENCES, PLAY, QUIT };
|
||||
|
||||
ui(display& d, const std::string& title,
|
||||
const config& cfg, chat& c, config& gamelist);
|
||||
|
Loading…
x
Reference in New Issue
Block a user