aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/texture_region_editor_plugin.h
diff options
context:
space:
mode:
authorGeequlim2016-06-05 00:40:53 +0800
committerGeequlim2016-06-05 00:45:53 +0800
commit5894060abb35713d744b6a79e7112d38926ba767 (patch)
tree8ca71fee94a312d9553a7d76b12232311ddeb6eb /tools/editor/plugins/texture_region_editor_plugin.h
parent9546b2ffd4a73001b4e00248b8f7dc893c133a06 (diff)
downloadgodot-5894060abb35713d744b6a79e7112d38926ba767.tar.gz
godot-5894060abb35713d744b6a79e7112d38926ba767.tar.zst
godot-5894060abb35713d744b6a79e7112d38926ba767.zip
Enhanced StyleBoxTexture:
Add texture region support for StyleBoxTexture. Quick region(texture region and scale region) selection for StyleBoxTexture with TextureRegionEditorPlugin.
Diffstat (limited to 'tools/editor/plugins/texture_region_editor_plugin.h')
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/editor/plugins/texture_region_editor_plugin.h b/tools/editor/plugins/texture_region_editor_plugin.h
index ff05b8c19..951b11e1e 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.h
+++ b/tools/editor/plugins/texture_region_editor_plugin.h
@@ -37,6 +37,7 @@
#include "tools/editor/editor_node.h"
#include "scene/2d/sprite.h"
#include "scene/gui/patch_9_frame.h"
+#include "scene/resources/style_box.h"
class TextureRegionEditor : public HBoxContainer {
@@ -80,6 +81,8 @@ class TextureRegionEditor : public HBoxContainer {
String node_type;
Patch9Frame *node_patch9;
Sprite *node_sprite;
+ StyleBoxTexture *obj_styleBox;
+
int editing_region;
Rect2 rect;
Rect2 rect_prev;
@@ -102,14 +105,13 @@ class TextureRegionEditor : public HBoxContainer {
protected:
void _notification(int p_what);
- void _node_removed(Node *p_node);
+ void _node_removed(Object *p_obj);
static void _bind_methods();
Vector2 snap_point(Vector2 p_target) const;
public:
- void edit();
void _edit_node(int tex_region);
void _edit_region();
void _edit_margin();
@@ -117,7 +119,7 @@ public:
void _region_input(const InputEvent &p_input);
void _scroll_changed(float);
- void edit(Node *p_sprite);
+ void edit(Object *p_obj);
TextureRegionEditor(EditorNode* p_editor);
};