2
* Copyright (C) 2002-2004, 2006-2008, 2012 by the Widelands Development Team
2
* Copyright (C) 2002-2017 by the Widelands Development Team
4
4
* This program is free software; you can redistribute it and/or
5
5
* modify it under the terms of the GNU General Public License
25
25
/// Decreases the height of a node by a value.
26
26
struct EditorDecreaseHeightTool : public EditorTool {
27
EditorDecreaseHeightTool() : EditorTool(*this, *this), change_by_(1) {}
29
int32_t handle_click_impl
30
(const Widelands::World& world,
31
Widelands::NodeAndTriangle<> center,
32
EditorInteractive & parent,
33
EditorActionArgs* args,
34
Widelands::Map* map) override;
36
int32_t handle_undo_impl
37
(const Widelands::World& world,
38
Widelands::NodeAndTriangle<> center,
39
EditorInteractive& parent,
40
EditorActionArgs* args,
41
Widelands::Map* map) override;
43
EditorActionArgs format_args_impl(EditorInteractive & parent) override;
45
char const * get_sel_impl() const override {
46
return "images/wui/editor//fsel_editor_decrease_height.png";
49
int32_t get_change_by() const {return change_by_;}
50
void set_change_by(const int32_t n) {change_by_ = n;}
27
EditorDecreaseHeightTool() : EditorTool(*this, *this), change_by_(1) {
30
int32_t handle_click_impl(const Widelands::World& world,
31
const Widelands::NodeAndTriangle<>& center,
32
EditorInteractive& parent,
33
EditorActionArgs* args,
34
Widelands::Map* map) override;
36
int32_t handle_undo_impl(const Widelands::World& world,
37
const Widelands::NodeAndTriangle<>& center,
38
EditorInteractive& parent,
39
EditorActionArgs* args,
40
Widelands::Map* map) override;
42
EditorActionArgs format_args_impl(EditorInteractive& parent) override;
44
const Image* get_sel_impl() const override {
45
return g_gr->images().get("images/wui/editor//fsel_editor_decrease_height.png");
48
int32_t get_change_by() const {
51
void set_change_by(const int32_t n) {
53
56
int32_t change_by_;