Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-10-14 10:08:50 +0000
committerStijn Buys <ingar@osirion.org>2012-10-14 10:08:50 +0000
commit97d79a827ef4978df15fa117e013817dbcde1d09 (patch)
tree2f7f74b5b1b8fcfb1ba68051e688d811f1056174 /src/client
parent1883c2ea6cb3dd4ba5f26af31a0ad481d524dfef (diff)
Added protection against duplicate dialog definitions, made the dialog window smaller.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/dialog.cc2
-rw-r--r--src/client/mainmenu.cc3
-rw-r--r--src/client/mainwindow.cc1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/client/dialog.cc b/src/client/dialog.cc
index f113433..b593388 100644
--- a/src/client/dialog.cc
+++ b/src/client/dialog.cc
@@ -54,7 +54,7 @@ void Dialog::resize()
dialog_widget->set_size(
ui::UI::elementsize.width() * 3.0f,
- ui::UI::elementsize.width() * 2.0f
+ ui::UI::elementsize.width() * 1.5f
);
dialog_widget->set_location(
(width() - dialog_widget->width()) * 0.5f,
diff --git a/src/client/mainmenu.cc b/src/client/mainmenu.cc
index 7271bcf..7374224 100644
--- a/src/client/mainmenu.cc
+++ b/src/client/mainmenu.cc
@@ -116,9 +116,10 @@ void MainMenu::load_definitions()
if (ini.got_key_label("label", strval)) {
dialog = new Dialog(this);
dialog->set_label(strval);
+ } else {
+ ini.unknown_error("dialog definition requires label first");
}
} else {
-
if (ini.got_key_label("label", strval)) {
dialog->set_label(strval);
diff --git a/src/client/mainwindow.cc b/src/client/mainwindow.cc
index 2f3f66a..1d9f4ff 100644
--- a/src/client/mainwindow.cc
+++ b/src/client/mainwindow.cc
@@ -125,6 +125,7 @@ void MainWindow::draw()
mainwindow_mainmenu->show();
} else if (core::localcontrol()->state() == core::Entity::Destroyed) {
+ mainwindow_gamewindow->hide();
mainwindow_mainmenu->show_menu("respawn");
} else if (mainwindow_gamewindow->hidden()) {