Author: mordante
Date: Mon Aug 25 17:35:39 2008
New Revision: 28969

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28969&view=rev
Log:
Allow smaller resolutions with --new-widgets.

For testing at tiny gui resolutions it's handy to allow smaller
resolutions in the normal game. Added a hack for the old editor.

Modified:
    trunk/src/editor/editor.cpp
    trunk/src/preferences.cpp

Modified: trunk/src/editor/editor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor.cpp?rev=28969&r1=28968&r2=28969&view=diff
==============================================================================
--- trunk/src/editor/editor.cpp (original)
+++ trunk/src/editor/editor.cpp Mon Aug 25 17:35:39 2008
@@ -52,6 +52,16 @@
 #include <vector>
 #include <string>
 #include <cmath>
+
+namespace gui2 {
+       // Preferences depends on new_widgets which are defined in
+       // gui/widgets/settings.cpp. Including that in the editor would pull in
+       // more dependencies. So added ithere, it's a kind of hack but 
new_widgets
+       // will be removed once the library is finished (probably the editor is
+       // already gone by that time as well.
+       bool new_widgets = false;
+} // namespace gui2
+
 
 namespace {
        static std::string wm_title_string;

Modified: trunk/src/preferences.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/preferences.cpp?rev=28969&r1=28968&r2=28969&view=diff
==============================================================================
--- trunk/src/preferences.cpp (original)
+++ trunk/src/preferences.cpp Mon Aug 25 17:35:39 2008
@@ -24,6 +24,7 @@
 #include "config.hpp"
 #include "filesystem.hpp"
 #include "gettext.hpp"
+#include "gui/widgets/settings.hpp"
 #include "hotkeys.hpp"
 #include "log.hpp"
 #include "preferences.hpp"
@@ -126,6 +127,13 @@
 #ifdef USE_TINY_GUI
        return 320;
 #endif
+
+       // Most things (not all) in the new widgets library work properly on 
tiny
+       // gui resolution. So allow them, which makes initial testing easier.
+       if(gui2::new_widgets) {
+               return 320;
+       }
+
        return 800;
 }
 
@@ -134,6 +142,13 @@
 #ifdef USE_TINY_GUI
        return 240;
 #endif
+
+       // Most things (not all) in the new widgets library work properly on 
tiny
+       // gui resolution. So allow them, which makes initial testing easier.
+       if(gui2::new_widgets) {
+               return 240;
+       }
+
        if (game_config::small_gui)
                return 480;
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to