wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src dialogs.cpp


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src dialogs.cpp
Date: Mon, 16 May 2005 19:03:04 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    05/05/16 23:03:04

Modified files:
        src            : dialogs.cpp 

Log message:
        help load dialog to fit on PDA screens

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/dialogs.cpp.diff?tr1=1.102&tr2=1.103&r1=text&r2=text

Patches:
Index: wesnoth/src/dialogs.cpp
diff -u wesnoth/src/dialogs.cpp:1.102 wesnoth/src/dialogs.cpp:1.103
--- wesnoth/src/dialogs.cpp:1.102       Mon May 16 22:44:19 2005
+++ wesnoth/src/dialogs.cpp     Mon May 16 23:03:04 2005
@@ -1,4 +1,4 @@
-/* $Id: dialogs.cpp,v 1.102 2005/05/16 22:44:19 ydirson Exp $ */
+/* $Id: dialogs.cpp,v 1.103 2005/05/16 23:03:04 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -254,7 +254,8 @@
                          const std::vector<save_info>& info, const 
std::vector<config*>& summaries)
                : gui::preview_pane(video), game_config_(&game_config), 
map_(map), data_(&data), info_(&info), summaries_(&summaries), index_(0)
        {
-               set_measurements(200, 400);
+               set_measurements(minimum<int>(200,video.getx()/4),
+                                minimum<int>(400,video.gety() * 4/5));
        }
 
        void draw_contents();
@@ -328,9 +329,14 @@
                        map_surf = itor->second;
                } else if(map_ != NULL) {
                        try {
+#ifdef USE_TINY_GUI
+                               const int minimap_size = 60;
+#else
+                               const int minimap_size = 100;
+#endif
                                map_->read(map_data);
 
-                               map_surf = image::getMinimap(100, 100, *map_);
+                               map_surf = image::getMinimap(minimap_size, 
minimap_size, *map_);
                                if(map_surf != NULL) {
                                        
map_cache_.insert(std::pair<std::string,surface>(map_data,surface(map_surf)));
                                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]