mail[Wesnoth-commits] r43480 - in /trunk/src/whiteboard: highlight_visitor.cpp highlight_visitor.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by gabrielmorin on June 16, 2010 - 05:02:
Author: gabba
Date: Wed Jun 16 05:02:01 2010
New Revision: 43480

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43480&view=rev
Log:
Missing files

Added:
    trunk/src/whiteboard/highlight_visitor.cpp
    trunk/src/whiteboard/highlight_visitor.hpp

Added: trunk/src/whiteboard/highlight_visitor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/highlight_visitor.cpp?rev=43480&view=auto
==============================================================================
--- trunk/src/whiteboard/highlight_visitor.cpp (added)
+++ trunk/src/whiteboard/highlight_visitor.cpp Wed Jun 16 05:02:01 2010
@@ -1,0 +1,44 @@
+/* $Id$ */
+/*
+ Copyright (C) 2010 by Gabriel Morin <gabrielmorin (at) gmail (dot) com>
+ Part of the Battle for Wesnoth Project http://www.wesnoth.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ or at your option any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY.
+
+ See the COPYING file for more details.
+ */
+
+/**
+ * @file highlight_visitor.cpp
+ */
+
+#include "highlight_visitor.hpp"
+#include "move.hpp"
+
+#include "arrow.hpp"
+
+namespace wb
+{
+
+highlight_visitor::highlight_visitor(bool highlight)
+: highlight_(highlight)
+{
+}
+
+highlight_visitor::~highlight_visitor()
+{
+}
+
+void highlight_visitor::visit_move(boost::shared_ptr<move> move)
+{
+       if (highlight_)
+               move->get_arrow()->set_alpha(move::ALPHA_HIGHLIGHT);
+       else
+               move->get_arrow()->set_alpha(move::ALPHA_NORMAL);
+}
+
+} // end namespace wb

Added: trunk/src/whiteboard/highlight_visitor.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/whiteboard/highlight_visitor.hpp?rev=43480&view=auto
==============================================================================
--- trunk/src/whiteboard/highlight_visitor.hpp (added)
+++ trunk/src/whiteboard/highlight_visitor.hpp Wed Jun 16 05:02:01 2010
@@ -1,0 +1,41 @@
+/* $Id$ */
+/*
+ Copyright (C) 2010 by Gabriel Morin <gabrielmorin (at) gmail (dot) com>
+ Part of the Battle for Wesnoth Project http://www.wesnoth.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ or at your option any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY.
+
+ See the COPYING file for more details.
+ */
+
+/**
+ * @file highlight_visitor.hpp
+ */
+
+#ifndef HIGHLIGHT_VISITOR_HPP_
+#define HIGHLIGHT_VISITOR_HPP_
+
+#include "visitor.hpp"
+
+namespace wb
+{
+
+class highlight_visitor: public wb::visitor
+{
+public:
+       highlight_visitor(bool highlight);
+       virtual ~highlight_visitor();
+
+       virtual void visit_move(boost::shared_ptr<move> move);
+
+private:
+       bool highlight_;
+};
+
+} // end namespace wb
+
+#endif /* HIGHLIGHT_VISITOR_HPP_ */




Related Messages


Powered by MHonArc, Updated Wed Jun 16 06:40:18 2010