forked from Zylann/godot_heightmap_module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheight_map_brush_panel.h
46 lines (38 loc) · 1.04 KB
/
height_map_brush_panel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef HEIGHT_MAP_BRUSH_PANEL_H
#define HEIGHT_MAP_BRUSH_PANEL_H
#include <scene/gui/label.h>
#include <scene/gui/slider.h>
#include <scene/gui/spin_box.h>
#include "scene/gui/item_list.h"
#include <scene/gui/control.h>
#include <scene/gui/check_box.h>
class HeightMapBrushPanel : public Control {
GDCLASS(HeightMapBrushPanel, Control)
public:
HeightMapBrushPanel();
~HeightMapBrushPanel();
static const char *PARAM_CHANGED;
enum Params {
BRUSH_SIZE = 0,
BRUSH_OPACITY,
BRUSH_HEIGHT,
BRUSH_MODE_CHANGE,
DECELS_CHANGED
};
Ref<ImageTexture> make_brush_icon(const uint8_t* p_brush_png);
void init_params(int size, float opacity, float height, int mode);
ItemList *_Terrain_ItemList;
CheckBox *_Terrain_Decels_CheckBox;
protected:
static void _bind_methods();
private:
void on_param_changed(Variant value, int param);
private:
Label *_size_label;
Slider *_size_slider;
Label *_opacity_label;
Slider *_opacity_slider;
SpinBox *_height_edit;
Label *_decels_label;
};
#endif // HEIGHT_MAP_BRUSH_PANEL_H