[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/widgets slider.cpp slider.hpp widge...
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/widgets slider.cpp slider.hpp widge... |
Date: |
Sat, 06 Nov 2004 08:48:14 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/11/06 13:42:26
Modified files:
src/widgets : slider.cpp slider.hpp widget.hpp
Log message:
Put back the virtuality of set_location so that slider can tamper with
it.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/slider.cpp.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/slider.hpp.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/widget.hpp.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
Patches:
Index: wesnoth/src/widgets/slider.cpp
diff -u wesnoth/src/widgets/slider.cpp:1.33 wesnoth/src/widgets/slider.cpp:1.34
--- wesnoth/src/widgets/slider.cpp:1.33 Sat Nov 6 13:13:16 2004
+++ wesnoth/src/widgets/slider.cpp Sat Nov 6 13:42:25 2004
@@ -1,4 +1,4 @@
-/* $Id: slider.cpp,v 1.33 2004/11/06 13:13:16 silene Exp $ */
+/* $Id: slider.cpp,v 1.34 2004/11/06 13:42:25 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -34,10 +34,11 @@
{
}
-void slider::update_location(SDL_Rect const &rect)
+void slider::set_location(SDL_Rect const &rect)
{
- SDL_Rect dst = { rect.x, rect.y, rect.w, image_->h };
- bg_register(dst);
+ SDL_Rect r = rect;
+ r.h = image_->h;
+ widget::set_location(r);
}
void slider::set_min(int value)
Index: wesnoth/src/widgets/slider.hpp
diff -u wesnoth/src/widgets/slider.hpp:1.21 wesnoth/src/widgets/slider.hpp:1.22
--- wesnoth/src/widgets/slider.hpp:1.21 Sat Nov 6 13:13:16 2004
+++ wesnoth/src/widgets/slider.hpp Sat Nov 6 13:42:25 2004
@@ -1,4 +1,4 @@
-/* $Id: slider.hpp,v 1.21 2004/11/06 13:13:16 silene Exp $ */
+/* $Id: slider.hpp,v 1.22 2004/11/06 13:42:25 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -37,8 +37,10 @@
int max_value() const;
int min_value() const;
+ virtual void set_location(SDL_Rect const &rect);
+ using widget::set_location;
+
protected:
- virtual void update_location(SDL_Rect const &rect);
virtual void handle_event(const SDL_Event& event);
virtual void draw_contents();
Index: wesnoth/src/widgets/widget.hpp
diff -u wesnoth/src/widgets/widget.hpp:1.20 wesnoth/src/widgets/widget.hpp:1.21
--- wesnoth/src/widgets/widget.hpp:1.20 Sat Nov 6 13:13:16 2004
+++ wesnoth/src/widgets/widget.hpp Sat Nov 6 13:42:25 2004
@@ -16,7 +16,7 @@
{
public:
SDL_Rect const &location() const;
- void set_location(SDL_Rect const &rect);
+ virtual void set_location(SDL_Rect const &rect);
void set_location(int x, int y);
void set_width(unsigned w);
void set_height(unsigned h);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src/widgets slider.cpp slider.hpp widge...,
Guillaume Melquiond <=