Author: mordante
Date: Tue Nov 25 18:08:08 2008
New Revision: 31073
URL: http://svn.gna.org/viewcvs/wesnoth?rev=31073&view=rev
Log:
Remove the test left and right dialog.
Modified:
trunk/data/scenario-test.cfg
trunk/src/game_events.cpp
Modified: trunk/data/scenario-test.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/scenario-test.cfg?rev=31073&r1=31072&r2=31073&view=diff
==============================================================================
--- trunk/data/scenario-test.cfg (original)
+++ trunk/data/scenario-test.cfg Tue Nov 25 18:08:08 2008
@@ -228,40 +228,6 @@
x,y=17,7
text="Open the hell"
[/label]
-
- [label]
- x,y=18,10
- text="left"
- [/label]
-
- [event]
- name=moveto
- first_time_only=no
- [filter]
- x,y,side=18,10,1
- [/filter]
-
- [message_test_left]
- message="Test message"
- [/message_test_left]
- [/event]
-
- [label]
- x,y=19,11
- text="right"
- [/label]
-
- [event]
- name=moveto
- first_time_only=no
- [filter]
- x,y,side=19,11,1
- [/filter]
-
- [message_test_right]
- message="Test message"
- [/message_test_right]
- [/event]
[label]
x,y=20,12
Modified: trunk/src/game_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=31073&r1=31072&r2=31073&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Tue Nov 25 18:08:08 2008
@@ -1900,71 +1900,6 @@
lg::wml_error << message << '\n';
}
- // Test function to show the new message dialog.
- // NOTE this event is undocumented since it's only added as test hack
and will
- // be removed without further notice.
- WML_HANDLER_FUNCTION(message_test_left,/*handler*/,event_info, cfg)
- {
- const std::string message = cfg["message"];
- gui2::twindow window = gui2::build((screen)->video(),
"message_test_left");
-
- // Use an ugly hack, if the spacer has the wanted best_size we
use the
- // bigger image otherwise the smaller one.
- gui2::tspacer* spacer =
-
dynamic_cast<gui2::tspacer*>(window.find_widget("image_place_holder", false));
- unsigned image_size = 200;
- if(spacer && spacer->get_best_size().x == 500) {
- image_size = 400;
- }
-
- const unit_map::iterator speaker = units->find(event_info.loc1);
- assert(speaker != units->end());
-
- const tportrait* portrait =
speaker->second.portrait(image_size, tportrait::LEFT);
- const std::string image = portrait ? portrait->image : "";
- const bool mirror = portrait ? portrait->mirror : false;
-
- window.canvas(1).set_variable("portrait_image", variant(image));
- window.canvas(1).set_variable("portrait_mirror",
variant(mirror));
-
- gui2::tcontrol* label =
dynamic_cast<gui2::tcontrol*>(window.find_widget("message", false));
- assert(label);
- label->set_label(message);
-
- window.show();
- }
-
- WML_HANDLER_FUNCTION(message_test_right,/*handler*/,event_info,cfg)
- {
- const std::string message = cfg["message"];
- gui2::twindow window = gui2::build((screen)->video(),
"message_test_right");
-
- // Use an ugly hack, if the spacer has the wanted best_size we
use the
- // bigger image otherwise the smaller one.
- gui2::tspacer* spacer =
-
dynamic_cast<gui2::tspacer*>(window.find_widget("image_place_holder", false));
- unsigned image_size = 200;
- if(spacer && spacer->get_best_size().x == 500) {
- image_size = 400;
- }
-
- const unit_map::iterator speaker = units->find(event_info.loc1);
- assert(speaker != units->end());
-
- const tportrait* portrait =
speaker->second.portrait(image_size, tportrait::RIGHT);
- const std::string image = portrait ? portrait->image : "";
- const bool mirror = portrait ? portrait->mirror : false;
-
- window.canvas(1).set_variable("portrait_image", variant(image));
- window.canvas(1).set_variable("portrait_mirror",
variant(mirror));
-
- gui2::tcontrol* label =
dynamic_cast<gui2::tcontrol*>(window.find_widget("message", false));
- assert(label);
- label->set_label(message);
-
- window.show();
- }
-
WML_HANDLER_FUNCTION(debug_message,/*handler*/,/*event_info*/,cfg)
{
const std::string log_level = cfg["logger"];
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits