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

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

[Wesnoth-cvs-commits] wesnoth/src multiplayer_create.cpp multiplayer_...


From: Philippe Plantier
Subject: [Wesnoth-cvs-commits] wesnoth/src multiplayer_create.cpp multiplayer_...
Date: Sat, 26 Feb 2005 14:50:00 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Philippe Plantier <address@hidden>      05/02/26 19:50:00

Modified files:
        src            : multiplayer_create.cpp multiplayer_create.hpp 

Log message:
        Put back tooltips on the MP create dialog.
        Repositioned the MP create dialog OK / cancel buttons.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_create.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_create.hpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: wesnoth/src/multiplayer_create.cpp
diff -u wesnoth/src/multiplayer_create.cpp:1.3 
wesnoth/src/multiplayer_create.cpp:1.4
--- wesnoth/src/multiplayer_create.cpp:1.3      Tue Feb 22 23:07:19 2005
+++ wesnoth/src/multiplayer_create.cpp  Sat Feb 26 19:50:00 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_create.cpp,v 1.3 2005/02/22 23:07:19 gruikya Exp $ */
+/* $Id: multiplayer_create.cpp,v 1.4 2005/02/26 19:50:00 gruikya Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -25,6 +25,7 @@
 create::create(display& disp, const config &cfg, chat& c, config& gamelist) :
        ui(disp, cfg, c, gamelist),
 
+       tooltip_manager_(disp),
        map_selection_(-1),
 
        maps_menu_(disp, std::vector<std::string>()),
@@ -167,6 +168,10 @@
 
 void create::process_event()
 {
+       int mousex, mousey;
+       SDL_GetMouseState(&mousex,&mousey);
+       tooltips::process(mousex, mousey);
+
        if(cancel_game_.pressed()) {
                set_result(QUIT);
                return;
@@ -241,7 +246,7 @@
                                        
generator_.assign(create_map_generator(parameters_.scenario_data["map_generation"],parameters_.scenario_data.child("generator")));
                                }
 
-                               
if(parameters_.scenario_data["description"].empty() == false) {
+                               
if(!parameters_.scenario_data["description"].empty()) {
                                        
tooltips::add_tooltip(minimap_rect_,parameters_.scenario_data["description"]);
                                }
                        }
@@ -446,8 +451,11 @@
 #endif
 
        // Buttons
-       right_button->set_location(ca.w - right_button->width(), ca.y + ca.h - 
right_button->height());
-       left_button->set_location(right_button->location().x - 
right_button->width(), ca.y + ca.h - right_button->height());
+       right_button->set_location(ca.x + ca.w - right_button->width() - 
gui::ButtonHPadding, 
+                       ca.y + ca.h - right_button->height() - 
gui::ButtonVPadding);
+       left_button->set_location(right_button->location().x - 
left_button->width() -
+                       gui::ButtonHPadding,
+                       ca.y + ca.h - left_button->height() - 
gui::ButtonVPadding);
 }
 
 }
Index: wesnoth/src/multiplayer_create.hpp
diff -u wesnoth/src/multiplayer_create.hpp:1.2 
wesnoth/src/multiplayer_create.hpp:1.3
--- wesnoth/src/multiplayer_create.hpp:1.2      Mon Feb 21 21:33:27 2005
+++ wesnoth/src/multiplayer_create.hpp  Sat Feb 26 19:50:00 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_create.hpp,v 1.2 2005/02/21 21:33:27 gruikya Exp $ */
+/* $Id: multiplayer_create.hpp,v 1.3 2005/02/26 19:50:00 gruikya Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -18,6 +18,7 @@
 #include "widgets/label.hpp"
 #include "widgets/combo.hpp"
 #include "mapgen.hpp"
+#include "tooltips.hpp"
 
 namespace mp {
 
@@ -73,6 +74,7 @@
 private:
        void update_minimap(void);
 
+       tooltips::manager tooltip_manager_;
        int map_selection_;
 
        std::vector<std::string> user_maps_;




reply via email to

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