[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src multiplayer_ui.cpp multiplayer_ui.hpp
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src multiplayer_ui.cpp multiplayer_ui.hpp |
Date: |
Thu, 14 Apr 2005 14:44:06 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/04/14 18:44:06
Modified files:
src : multiplayer_ui.cpp multiplayer_ui.hpp
Log message:
Fixed bug #12567, MP lobby chat not going to bottom when changing
screens.
Also restored word-wrapping in MP lobby chat.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_ui.cpp.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_ui.hpp.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: wesnoth/src/multiplayer_ui.cpp
diff -u wesnoth/src/multiplayer_ui.cpp:1.18 wesnoth/src/multiplayer_ui.cpp:1.19
--- wesnoth/src/multiplayer_ui.cpp:1.18 Sun Mar 27 23:06:17 2005
+++ wesnoth/src/multiplayer_ui.cpp Thu Apr 14 18:44:05 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_ui.cpp,v 1.18 2005/03/27 23:06:17 gruikya Exp $ */
+/* $Id: multiplayer_ui.cpp,v 1.19 2005/04/14 18:44:05 gruikya Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -95,8 +95,8 @@
}
textbox.set_text(s);
-
last_update_ = message_history_.size();
+ textbox.scroll_to_bottom();
}
void chat::update_textbox(gui::textbox& textbox)
@@ -122,6 +122,7 @@
ui::ui(display& disp, const config& cfg, chat& c, config& gamelist) :
gui::widget(disp.video()),
disp_(disp),
+ initialized_(false),
hotkey_handler_(&disp),
disp_manager_(&disp),
@@ -136,7 +137,6 @@
result_(CONTINUE)
{
- chat_.init_textbox(chat_textbox_);
}
void ui::process_network()
@@ -220,6 +220,11 @@
hide_children();
widget::set_location(rect);
layout_children(rect);
+ if(!initialized_) {
+ chat_textbox_.set_wrap(true);
+ chat_.init_textbox(chat_textbox_);
+ initialized_ = true;
+ }
hide_children(false);
}
Index: wesnoth/src/multiplayer_ui.hpp
diff -u wesnoth/src/multiplayer_ui.hpp:1.7 wesnoth/src/multiplayer_ui.hpp:1.8
--- wesnoth/src/multiplayer_ui.hpp:1.7 Sat Mar 19 17:59:13 2005
+++ wesnoth/src/multiplayer_ui.hpp Thu Apr 14 18:44:05 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_ui.hpp,v 1.7 2005/03/19 17:59:13 gruikya Exp $ */
+/* $Id: multiplayer_ui.hpp,v 1.8 2005/04/14 18:44:05 gruikya Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -141,6 +141,10 @@
// Returns the current gamelist
config& gamelist() { return gamelist_; };
private:
+ /** Set to true when the widgets are intialized. Allows delayed
+ * initialization on first positioning. */
+ bool initialized_;
+
// Ensures standard hotkeys are coorectly handled
const hotkey::basic_handler hotkey_handler_;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src multiplayer_ui.cpp multiplayer_ui.hpp,
Philippe Plantier <=