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
243cb503
Unverified
Commit
243cb503
authored
Jun 03, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39204 from Calinou/distraction-free-property-getter
Add a getter and property for the editor distraction-free mode
parents
19dc5c42
cc1859ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
2 deletions
+10
-2
editor_node.cpp
editor/editor_node.cpp
+1
-1
editor_node.h
editor/editor_node.h
+1
-1
editor_plugin.cpp
editor/editor_plugin.cpp
+7
-0
editor_plugin.h
editor/editor_plugin.h
+1
-0
No files found.
editor/editor_node.cpp
View file @
243cb503
...
...
@@ -4782,7 +4782,7 @@ void EditorNode::set_distraction_free_mode(bool p_enter) {
}
}
bool
EditorNode
::
get_distraction_free_mode
()
const
{
bool
EditorNode
::
is_distraction_free_mode_enabled
()
const
{
return
distraction_free
->
is_pressed
();
}
...
...
editor/editor_node.h
View file @
243cb503
...
...
@@ -693,7 +693,7 @@ public:
bool
get_docks_visible
()
const
;
void
set_distraction_free_mode
(
bool
p_enter
);
bool
get_distraction_free_mode
()
const
;
bool
is_distraction_free_mode_enabled
()
const
;
void
add_control_to_dock
(
DockSlot
p_slot
,
Control
*
p_control
);
void
remove_control_from_dock
(
Control
*
p_control
);
...
...
editor/editor_plugin.cpp
View file @
243cb503
...
...
@@ -270,6 +270,10 @@ void EditorInterface::set_distraction_free_mode(bool p_enter) {
EditorNode
::
get_singleton
()
->
set_distraction_free_mode
(
p_enter
);
}
bool
EditorInterface
::
is_distraction_free_mode_enabled
()
const
{
return
EditorNode
::
get_singleton
()
->
is_distraction_free_mode_enabled
();
}
EditorInterface
*
EditorInterface
::
singleton
=
nullptr
;
void
EditorInterface
::
_bind_methods
()
{
...
...
@@ -302,6 +306,9 @@ void EditorInterface::_bind_methods() {
ClassDB
::
bind_method
(
D_METHOD
(
"set_main_screen_editor"
,
"name"
),
&
EditorInterface
::
set_main_screen_editor
);
ClassDB
::
bind_method
(
D_METHOD
(
"set_distraction_free_mode"
,
"enter"
),
&
EditorInterface
::
set_distraction_free_mode
);
ClassDB
::
bind_method
(
D_METHOD
(
"is_distraction_free_mode_enabled"
),
&
EditorInterface
::
is_distraction_free_mode_enabled
);
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
BOOL
,
"distraction_free_mode"
),
"set_distraction_free_mode"
,
"is_distraction_free_mode_enabled"
);
}
EditorInterface
::
EditorInterface
()
{
...
...
editor/editor_plugin.h
View file @
243cb503
...
...
@@ -105,6 +105,7 @@ public:
void
set_main_screen_editor
(
const
String
&
p_name
);
void
set_distraction_free_mode
(
bool
p_enter
);
bool
is_distraction_free_mode_enabled
()
const
;
EditorInterface
();
};
...
...
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