Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
5a21847f
Commit
5a21847f
authored
Feb 23, 2019
by
Mariano Suligoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TileSetEditor: Show Edition Context by demand
parent
4f697f73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
tile_set_editor_plugin.cpp
editor/plugins/tile_set_editor_plugin.cpp
+13
-1
No files found.
editor/plugins/tile_set_editor_plugin.cpp
View file @
5a21847f
...
...
@@ -2536,6 +2536,11 @@ void TileSetEditor::set_current_tile(int p_id) {
helper
->
_change_notify
(
""
);
select_coord
(
Vector2
(
0
,
0
));
update_workspace_tile_mode
();
if
(
p_id
==
-
1
)
{
editor
->
get_inspector
()
->
edit
(
tileset
.
ptr
());
}
else
{
editor
->
get_inspector
()
->
edit
(
helper
);
}
}
}
...
...
@@ -2712,7 +2717,6 @@ void TileSetEditorPlugin::edit(Object *p_node) {
if
(
Object
::
cast_to
<
TileSet
>
(
p_node
))
{
tileset_editor
->
edit
(
Object
::
cast_to
<
TileSet
>
(
p_node
));
editor
->
get_inspector
()
->
edit
(
tileset_editor
->
helper
);
}
}
...
...
@@ -2741,6 +2745,7 @@ Dictionary TileSetEditorPlugin::get_state() const {
state
[
"snap_separation"
]
=
tileset_editor
->
snap_separation
;
state
[
"snap_enabled"
]
=
tileset_editor
->
tools
[
TileSetEditor
::
TOOL_GRID_SNAP
]
->
is_pressed
();
state
[
"keep_inside_tile"
]
=
tileset_editor
->
tools
[
TileSetEditor
::
SHAPE_KEEP_INSIDE_TILE
]
->
is_pressed
();
state
[
"show_information"
]
=
tileset_editor
->
tools
[
TileSetEditor
::
VISIBLE_INFO
]
->
is_pressed
();
return
state
;
}
...
...
@@ -2761,11 +2766,18 @@ void TileSetEditorPlugin::set_state(const Dictionary &p_state) {
if
(
state
.
has
(
"snap_enabled"
))
{
tileset_editor
->
tools
[
TileSetEditor
::
TOOL_GRID_SNAP
]
->
set_pressed
(
state
[
"snap_enabled"
]);
if
(
tileset_editor
->
helper
)
{
tileset_editor
->
_on_grid_snap_toggled
(
state
[
"snap_enabled"
]);
}
}
if
(
state
.
has
(
"keep_inside_tile"
))
{
tileset_editor
->
tools
[
TileSetEditor
::
SHAPE_KEEP_INSIDE_TILE
]
->
set_pressed
(
state
[
"keep_inside_tile"
]);
}
if
(
state
.
has
(
"show_information"
))
{
tileset_editor
->
tools
[
TileSetEditor
::
VISIBLE_INFO
]
->
set_pressed
(
state
[
"show_information"
]);
}
}
TileSetEditorPlugin
::
TileSetEditorPlugin
(
EditorNode
*
p_node
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment