Empty palette class to be bound with tools not in need for a palette.
This commit is contained in:
parent
56c1f7dc67
commit
b9048772a7
1 changed files with 55 additions and 0 deletions
55
src/editor/palette/empty_palette.hpp
Normal file
55
src/editor/palette/empty_palette.hpp
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
Copyright (C) 2012 - 2012 by Fabian Mueller <fabianmueller5@gmx.de>
|
||||
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 as published by
|
||||
the Free Software Foundation; either version 2 of the License, 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Manage the empty-palette in the editor.
|
||||
*/
|
||||
|
||||
#ifndef EMPTY_PALETTE_H_INCLUDED
|
||||
#define EMPTY_PALETTE_H_INCLUDED
|
||||
|
||||
#include "editor_palettes.hpp"
|
||||
|
||||
namespace editor {
|
||||
static const std::string empty_string = "";
|
||||
|
||||
/** Empty palette */
|
||||
class empty_palette : public editor_palette<unit_type> {
|
||||
public:
|
||||
|
||||
empty_palette(editor_display &gui, const size_specs &sizes, const config& cfg,
|
||||
mouse_action** active_mouse_action)
|
||||
: editor_palette<unit_type>(gui, sizes, cfg, 0, 0, active_mouse_action) {};
|
||||
|
||||
// think about removing it
|
||||
virtual void setup(const config& /*cfg*/) {};
|
||||
|
||||
private:
|
||||
virtual const std::string& get_id(const unit_type& /*terrain*/) { return empty_string; };
|
||||
|
||||
virtual void draw_item(SDL_Rect& /*dstrect*/, const unit_type& /*terrain*/,
|
||||
std::stringstream& /*tooltip_text*/) {};
|
||||
|
||||
// virtual void update_report();
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
empty_palette::empty_palette(editor_display &gui, const size_specs &sizes, const config& cfg,
|
||||
mouse_action** active_mouse_action)
|
||||
: editor_palette<void*>(gui, sizes, cfg, 0, 0, active_mouse_action) {};
|
||||
*/
|
||||
|
||||
}
|
||||
#endif
|
Loading…
Add table
Reference in a new issue