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
7793bfc5
Commit
7793bfc5
authored
Aug 30, 2017
by
toger5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added icon updating to most ui elements
parent
97d7d84c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
162 additions
and
5 deletions
+162
-5
code_editor.cpp
editor/code_editor.cpp
+7
-0
editor_file_dialog.cpp
editor/editor_file_dialog.cpp
+18
-0
editor_help.cpp
editor/editor_help.cpp
+11
-3
editor_node.cpp
editor/editor_node.cpp
+30
-1
filesystem_dock.cpp
editor/filesystem_dock.cpp
+22
-0
node_dock.cpp
editor/node_dock.cpp
+3
-0
canvas_item_editor_plugin.cpp
editor/plugins/canvas_item_editor_plugin.cpp
+42
-1
script_editor_plugin.cpp
editor/plugins/script_editor_plugin.cpp
+7
-0
spatial_editor_plugin.cpp
editor/plugins/spatial_editor_plugin.cpp
+14
-0
scene_tree_dock.cpp
editor/scene_tree_dock.cpp
+8
-0
No files found.
editor/code_editor.cpp
View file @
7793bfc5
...
...
@@ -92,6 +92,13 @@ void FindReplaceBar::_notification(int p_what) {
}
else
if
(
p_what
==
NOTIFICATION_VISIBILITY_CHANGED
)
{
set_process_unhandled_input
(
is_visible_in_tree
());
}
else
if
(
p_what
==
EditorSettings
::
NOTIFICATION_EDITOR_SETTINGS_CHANGED
)
{
find_prev
->
set_icon
(
get_icon
(
"MoveUp"
,
"EditorIcons"
));
find_next
->
set_icon
(
get_icon
(
"MoveDown"
,
"EditorIcons"
));
hide_button
->
set_normal_texture
(
get_icon
(
"Close"
,
"EditorIcons"
));
hide_button
->
set_hover_texture
(
get_icon
(
"CloseHover"
,
"EditorIcons"
));
hide_button
->
set_pressed_texture
(
get_icon
(
"Close"
,
"EditorIcons"
));
}
}
...
...
editor/editor_file_dialog.cpp
View file @
7793bfc5
...
...
@@ -53,6 +53,7 @@ void EditorFileDialog::_notification(int p_what) {
if
(
p_what
==
NOTIFICATION_ENTER_TREE
)
{
//_update_icons
mode_thumbnails
->
set_icon
(
get_icon
(
"FileThumbnail"
,
"EditorIcons"
));
mode_list
->
set_icon
(
get_icon
(
"FileList"
,
"EditorIcons"
));
dir_prev
->
set_icon
(
get_icon
(
"ArrowLeft"
,
"EditorIcons"
));
...
...
@@ -92,6 +93,23 @@ void EditorFileDialog::_notification(int p_what) {
if
(
show_hidden_files
!=
show_hidden
)
set_show_hidden_files
(
show_hidden
);
set_display_mode
((
DisplayMode
)
EditorSettings
::
get_singleton
()
->
get
(
"filesystem/file_dialog/display_mode"
).
operator
int
());
//_update_icons
mode_thumbnails
->
set_icon
(
get_icon
(
"FileThumbnail"
,
"EditorIcons"
));
mode_list
->
set_icon
(
get_icon
(
"FileList"
,
"EditorIcons"
));
dir_prev
->
set_icon
(
get_icon
(
"ArrowLeft"
,
"EditorIcons"
));
dir_next
->
set_icon
(
get_icon
(
"ArrowRight"
,
"EditorIcons"
));
dir_up
->
set_icon
(
get_icon
(
"ArrowUp"
,
"EditorIcons"
));
refresh
->
set_icon
(
get_icon
(
"Reload"
,
"EditorIcons"
));
favorite
->
set_icon
(
get_icon
(
"Favorites"
,
"EditorIcons"
));
fav_up
->
set_icon
(
get_icon
(
"MoveUp"
,
"EditorIcons"
));
fav_down
->
set_icon
(
get_icon
(
"MoveDown"
,
"EditorIcons"
));
fav_rm
->
set_icon
(
get_icon
(
"RemoveSmall"
,
"EditorIcons"
));
Theme
::
get_default
()
->
clear_icon
(
"ResizedFile"
,
"EditorIcons"
);
Theme
::
get_default
()
->
clear_icon
(
"ResizedFolder"
,
"EditorIcons"
);
update_file_list
();
}
}
...
...
editor/editor_help.cpp
View file @
7793bfc5
...
...
@@ -263,19 +263,22 @@ void EditorHelpSearch::_notification(int p_what) {
if
(
p_what
==
NOTIFICATION_ENTER_TREE
)
{
//_update_icons
search_box
->
add_icon_override
(
"right_icon"
,
get_icon
(
"Search"
,
"EditorIcons"
));
connect
(
"confirmed"
,
this
,
"_confirmed"
);
_update_search
();
}
if
(
p_what
==
NOTIFICATION_VISIBILITY_CHANGED
)
{
}
else
if
(
p_what
==
NOTIFICATION_VISIBILITY_CHANGED
)
{
if
(
is_visible_in_tree
())
{
search_box
->
call_deferred
(
"grab_focus"
);
// still not visible
search_box
->
select_all
();
}
}
else
if
(
p_what
==
EditorSettings
::
NOTIFICATION_EDITOR_SETTINGS_CHANGED
)
{
//_update_icons
search_box
->
add_icon_override
(
"right_icon"
,
get_icon
(
"Search"
,
"EditorIcons"
));
}
}
...
...
@@ -385,6 +388,7 @@ void EditorHelpIndex::_notification(int p_what) {
if
(
p_what
==
NOTIFICATION_ENTER_TREE
)
{
//_update_icons
search_box
->
add_icon_override
(
"right_icon"
,
get_icon
(
"Search"
,
"EditorIcons"
));
_update_class_list
();
...
...
@@ -393,6 +397,10 @@ void EditorHelpIndex::_notification(int p_what) {
}
else
if
(
p_what
==
NOTIFICATION_POST_POPUP
)
{
search_box
->
call_deferred
(
"grab_focus"
);
}
else
if
(
p_what
==
EditorSettings
::
NOTIFICATION_EDITOR_SETTINGS_CHANGED
)
{
//_update_icons
search_box
->
add_icon_override
(
"right_icon"
,
get_icon
(
"Search"
,
"EditorIcons"
));
}
}
...
...
editor/editor_node.cpp
View file @
7793bfc5
...
...
@@ -296,6 +296,35 @@ void EditorNode::_notification(int p_what) {
scene_tabs
->
set_min_width
(
0
);
}
_update_scene_tabs
();
//_update_icons
for
(
int
i
=
0
;
i
<
singleton
->
main_editor_buttons
.
size
();
i
++
)
{
main_editor_buttons
[
i
]
->
set_icon
(
gui_base
->
get_icon
(
singleton
->
main_editor_buttons
[
i
]
->
get_name
(),
"EditorIcons"
));
}
play_button
->
set_icon
(
gui_base
->
get_icon
(
"MainPlay"
,
"EditorIcons"
));
play_scene_button
->
set_icon
(
gui_base
->
get_icon
(
"PlayScene"
,
"EditorIcons"
));
play_custom_scene_button
->
set_icon
(
gui_base
->
get_icon
(
"PlayCustom"
,
"EditorIcons"
));
pause_button
->
set_icon
(
gui_base
->
get_icon
(
"Pause"
,
"EditorIcons"
));
stop_button
->
set_icon
(
gui_base
->
get_icon
(
"Stop"
,
"EditorIcons"
));
prev_scene
->
set_icon
(
gui_base
->
get_icon
(
"PrevScene"
,
"EditorIcons"
));
distraction_free
->
set_icon
(
gui_base
->
get_icon
(
"DistractionFree"
,
"EditorIcons"
));
resource_new_button
->
set_icon
(
gui_base
->
get_icon
(
"New"
,
"EditorIcons"
));
resource_load_button
->
set_icon
(
gui_base
->
get_icon
(
"Load"
,
"EditorIcons"
));
resource_save_button
->
set_icon
(
gui_base
->
get_icon
(
"Save"
,
"EditorIcons"
));
property_back
->
set_icon
(
gui_base
->
get_icon
(
"Back"
,
"EditorIcons"
));
property_forward
->
set_icon
(
gui_base
->
get_icon
(
"Forward"
,
"EditorIcons"
));
editor_history_menu
->
set_icon
(
gui_base
->
get_icon
(
"History"
,
"EditorIcons"
));
search_button
->
set_icon
(
gui_base
->
get_icon
(
"Search"
,
"EditorIcons"
));
object_menu
->
set_icon
(
gui_base
->
get_icon
(
"Tools"
,
"EditorIcons"
));
// clear_button->set_icon(gui_base->get_icon("Close", "EditorIcons")); dont have access to that node. needs to become a class property
update_menu
->
set_icon
(
gui_base
->
get_icon
(
"Collapse"
,
"EditorIcons"
));
dock_tab_move_left
->
set_icon
(
theme
->
get_icon
(
"Back"
,
"EditorIcons"
));
dock_tab_move_right
->
set_icon
(
theme
->
get_icon
(
"Forward"
,
"EditorIcons"
));
update_menu
->
set_icon
(
gui_base
->
get_icon
(
"Progress1"
,
"EditorIcons"
));
}
}
...
...
@@ -4917,7 +4946,7 @@ EditorNode::EditorNode() {
play_cc
->
set_margin
(
MARGIN_TOP
,
5
);
play_button_panel
=
memnew
(
PanelContainer
);
play_button_panel
->
add_style_override
(
"panel"
,
gui_base
->
get_stylebox
(
"PlayButtonPanel"
,
"EditorStyles"
));
//
play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
play_cc
->
add_child
(
play_button_panel
);
HBoxContainer
*
play_hb
=
memnew
(
HBoxContainer
);
...
...
editor/filesystem_dock.cpp
View file @
7793bfc5
...
...
@@ -199,11 +199,33 @@ void FileSystemDock::_notification(int p_what) {
int
new_mode
=
int
(
EditorSettings
::
get_singleton
()
->
get
(
"docks/filesystem/display_mode"
));
//_update_icons
button_reload
->
set_icon
(
get_icon
(
"Reload"
,
"EditorIcons"
));
button_favorite
->
set_icon
(
get_icon
(
"Favorites"
,
"EditorIcons"
));
button_back
->
set_icon
(
get_icon
(
"Filesystem"
,
"EditorIcons"
));
if
(
display_mode
==
DISPLAY_THUMBNAILS
)
{
button_display_mode
->
set_icon
(
get_icon
(
"FileList"
,
"EditorIcons"
));
}
else
{
button_display_mode
->
set_icon
(
get_icon
(
"FileThumbnail"
,
"EditorIcons"
));
}
search_box
->
add_icon_override
(
"right_icon"
,
get_icon
(
"Search"
,
"EditorIcons"
));
button_hist_next
->
set_icon
(
get_icon
(
"Forward"
,
"EditorIcons"
));
button_hist_prev
->
set_icon
(
get_icon
(
"Back"
,
"EditorIcons"
));
Theme
::
get_default
()
->
clear_icon
(
"ResizedFolder"
,
"EditorIcons"
);
Theme
::
get_default
()
->
clear_icon
(
"ResizedFile"
,
"EditorIcons"
);
if
(
new_mode
!=
display_mode
)
{
set_display_mode
(
new_mode
);
}
else
{
_update_files
(
true
);
}
_update_tree
();
}
break
;
}
}
...
...
editor/node_dock.cpp
View file @
7793bfc5
...
...
@@ -58,6 +58,9 @@ void NodeDock::_notification(int p_what) {
if
(
p_what
==
NOTIFICATION_ENTER_TREE
)
{
connections_button
->
set_icon
(
get_icon
(
"Connect"
,
"EditorIcons"
));
groups_button
->
set_icon
(
get_icon
(
"Groups"
,
"EditorIcons"
));
}
else
if
(
p_what
==
EditorSettings
::
NOTIFICATION_EDITOR_SETTINGS_CHANGED
)
{
connections_button
->
set_icon
(
get_icon
(
"Connect"
,
"EditorIcons"
));
groups_button
->
set_icon
(
get_icon
(
"Groups"
,
"EditorIcons"
));
}
}
...
...
editor/plugins/canvas_item_editor_plugin.cpp
View file @
7793bfc5
...
...
@@ -2320,7 +2320,6 @@ void CanvasItemEditor::_notification(int p_what) {
ungroup_button
->
set_icon
(
get_icon
(
"Ungroup"
,
"EditorIcons"
));
key_insert_button
->
set_icon
(
get_icon
(
"Key"
,
"EditorIcons"
));
//anchor_menu->add_icon_override("Align Top Left");
anchor_menu
->
set_icon
(
get_icon
(
"Anchor"
,
"EditorIcons"
));
PopupMenu
*
p
=
anchor_menu
->
get_popup
();
...
...
@@ -2347,6 +2346,48 @@ void CanvasItemEditor::_notification(int p_what) {
AnimationPlayerEditor
::
singleton
->
get_key_editor
()
->
connect
(
"visibility_changed"
,
this
,
"_keying_changed"
);
_keying_changed
();
}
else
if
(
p_what
==
EditorSettings
::
NOTIFICATION_EDITOR_SETTINGS_CHANGED
)
{
select_sb
->
set_texture
(
get_icon
(
"EditorRect2D"
,
"EditorIcons"
));
select_button
->
set_icon
(
get_icon
(
"ToolSelect"
,
"EditorIcons"
));
list_select_button
->
set_icon
(
get_icon
(
"ListSelect"
,
"EditorIcons"
));
move_button
->
set_icon
(
get_icon
(
"ToolMove"
,
"EditorIcons"
));
rotate_button
->
set_icon
(
get_icon
(
"ToolRotate"
,
"EditorIcons"
));
pan_button
->
set_icon
(
get_icon
(
"ToolPan"
,
"EditorIcons"
));
pivot_button
->
set_icon
(
get_icon
(
"EditPivot"
,
"EditorIcons"
));
select_handle
=
get_icon
(
"EditorHandle"
,
"EditorIcons"
);
anchor_handle
=
get_icon
(
"EditorControlAnchor"
,
"EditorIcons"
);
lock_button
->
set_icon
(
get_icon
(
"Lock"
,
"EditorIcons"
));
unlock_button
->
set_icon
(
get_icon
(
"Unlock"
,
"EditorIcons"
));
group_button
->
set_icon
(
get_icon
(
"Group"
,
"EditorIcons"
));
ungroup_button
->
set_icon
(
get_icon
(
"Ungroup"
,
"EditorIcons"
));
key_insert_button
->
set_icon
(
get_icon
(
"Key"
,
"EditorIcons"
));
anchor_menu
->
set_icon
(
get_icon
(
"Anchor"
,
"EditorIcons"
));
PopupMenu
*
p
=
anchor_menu
->
get_popup
();
p
->
clear
();
p
->
add_icon_item
(
get_icon
(
"ControlAlignTopLeft"
,
"EditorIcons"
),
"Top Left"
,
ANCHOR_ALIGN_TOP_LEFT
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignTopRight"
,
"EditorIcons"
),
"Top Right"
,
ANCHOR_ALIGN_TOP_RIGHT
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignBottomRight"
,
"EditorIcons"
),
"Bottom Right"
,
ANCHOR_ALIGN_BOTTOM_RIGHT
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignBottomLeft"
,
"EditorIcons"
),
"Bottom Left"
,
ANCHOR_ALIGN_BOTTOM_LEFT
);
p
->
add_separator
();
p
->
add_icon_item
(
get_icon
(
"ControlAlignLeftCenter"
,
"EditorIcons"
),
"Center Left"
,
ANCHOR_ALIGN_CENTER_LEFT
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignTopCenter"
,
"EditorIcons"
),
"Center Top"
,
ANCHOR_ALIGN_CENTER_TOP
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignRightCenter"
,
"EditorIcons"
),
"Center Right"
,
ANCHOR_ALIGN_CENTER_RIGHT
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignBottomCenter"
,
"EditorIcons"
),
"Center Bottom"
,
ANCHOR_ALIGN_CENTER_BOTTOM
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignCenter"
,
"EditorIcons"
),
"Center"
,
ANCHOR_ALIGN_CENTER
);
p
->
add_separator
();
p
->
add_icon_item
(
get_icon
(
"ControlAlignLeftWide"
,
"EditorIcons"
),
"Left Wide"
,
ANCHOR_ALIGN_LEFT_WIDE
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignTopWide"
,
"EditorIcons"
),
"Top Wide"
,
ANCHOR_ALIGN_TOP_WIDE
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignRightWide"
,
"EditorIcons"
),
"Right Wide"
,
ANCHOR_ALIGN_RIGHT_WIDE
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignBottomWide"
,
"EditorIcons"
),
"Bottom Wide"
,
ANCHOR_ALIGN_BOTTOM_WIDE
);
p
->
add_icon_item
(
get_icon
(
"ControlVcenterWide"
,
"EditorIcons"
),
"VCenter Wide "
,
ANCHOR_ALIGN_VCENTER_WIDE
);
p
->
add_icon_item
(
get_icon
(
"ControlHcenterWide"
,
"EditorIcons"
),
"HCenter Wide "
,
ANCHOR_ALIGN_HCENTER_WIDE
);
p
->
add_separator
();
p
->
add_icon_item
(
get_icon
(
"ControlAlignWide"
,
"EditorIcons"
),
"Full Rect"
,
ANCHOR_ALIGN_WIDE
);
p
->
add_icon_item
(
get_icon
(
"ControlAlignWide"
,
"EditorIcons"
),
"Full Rect and Fit Parent"
,
ANCHOR_ALIGN_WIDE_FIT
);
}
}
...
...
editor/plugins/script_editor_plugin.cpp
View file @
7793bfc5
...
...
@@ -1150,6 +1150,13 @@ void ScriptEditor::_notification(int p_what) {
case
EditorSettings
:
:
NOTIFICATION_EDITOR_SETTINGS_CHANGED
:
{
tab_container
->
add_style_override
(
"panel"
,
editor
->
get_gui_base
()
->
get_stylebox
(
"ScriptPanel"
,
"EditorStyles"
));
help_search
->
set_icon
(
get_icon
(
"HelpSearch"
,
"EditorIcons"
));
site_search
->
set_icon
(
get_icon
(
"Instance"
,
"EditorIcons"
));
class_search
->
set_icon
(
get_icon
(
"ClassList"
,
"EditorIcons"
));
script_forward
->
set_icon
(
get_icon
(
"Forward"
,
"EditorIcons"
));
script_back
->
set_icon
(
get_icon
(
"Back"
,
"EditorIcons"
));
}
break
;
default
:
...
...
editor/plugins/spatial_editor_plugin.cpp
View file @
7793bfc5
...
...
@@ -3652,6 +3652,20 @@ void SpatialEditor::_notification(int p_what) {
_finish_indicators
();
memdelete
(
gizmos
);
}
if
(
p_what
==
EditorSettings
::
NOTIFICATION_EDITOR_SETTINGS_CHANGED
)
{
tool_button
[
SpatialEditor
::
TOOL_MODE_SELECT
]
->
set_icon
(
get_icon
(
"ToolSelect"
,
"EditorIcons"
));
tool_button
[
SpatialEditor
::
TOOL_MODE_MOVE
]
->
set_icon
(
get_icon
(
"ToolMove"
,
"EditorIcons"
));
tool_button
[
SpatialEditor
::
TOOL_MODE_ROTATE
]
->
set_icon
(
get_icon
(
"ToolRotate"
,
"EditorIcons"
));
tool_button
[
SpatialEditor
::
TOOL_MODE_SCALE
]
->
set_icon
(
get_icon
(
"ToolScale"
,
"EditorIcons"
));
tool_button
[
SpatialEditor
::
TOOL_MODE_LIST_SELECT
]
->
set_icon
(
get_icon
(
"ListSelect"
,
"EditorIcons"
));
view_menu
->
get_popup
()
->
set_item_icon
(
view_menu
->
get_popup
()
->
get_item_index
(
MENU_VIEW_USE_1_VIEWPORT
),
get_icon
(
"Panels1"
,
"EditorIcons"
));
view_menu
->
get_popup
()
->
set_item_icon
(
view_menu
->
get_popup
()
->
get_item_index
(
MENU_VIEW_USE_2_VIEWPORTS
),
get_icon
(
"Panels2"
,
"EditorIcons"
));
view_menu
->
get_popup
()
->
set_item_icon
(
view_menu
->
get_popup
()
->
get_item_index
(
MENU_VIEW_USE_2_VIEWPORTS_ALT
),
get_icon
(
"Panels2Alt"
,
"EditorIcons"
));
view_menu
->
get_popup
()
->
set_item_icon
(
view_menu
->
get_popup
()
->
get_item_index
(
MENU_VIEW_USE_3_VIEWPORTS
),
get_icon
(
"Panels3"
,
"EditorIcons"
));
view_menu
->
get_popup
()
->
set_item_icon
(
view_menu
->
get_popup
()
->
get_item_index
(
MENU_VIEW_USE_3_VIEWPORTS_ALT
),
get_icon
(
"Panels3Alt"
,
"EditorIcons"
));
view_menu
->
get_popup
()
->
set_item_icon
(
view_menu
->
get_popup
()
->
get_item_index
(
MENU_VIEW_USE_4_VIEWPORTS
),
get_icon
(
"Panels4"
,
"EditorIcons"
));
}
}
void
SpatialEditor
::
add_control_to_menu_panel
(
Control
*
p_control
)
{
...
...
editor/scene_tree_dock.cpp
View file @
7793bfc5
...
...
@@ -736,6 +736,14 @@ void SceneTreeDock::_notification(int p_what) {
case
NOTIFICATION_EXIT_TREE
:
{
clear_inherit_confirm
->
disconnect
(
"confirmed"
,
this
,
"_tool_selected"
);
}
break
;
case
EditorSettings
:
:
NOTIFICATION_EDITOR_SETTINGS_CHANGED
:
{
button_add
->
set_icon
(
get_icon
(
"Add"
,
"EditorIcons"
));
button_instance
->
set_icon
(
get_icon
(
"Instance"
,
"EditorIcons"
));
button_create_script
->
set_icon
(
get_icon
(
"ScriptCreate"
,
"EditorIcons"
));
button_clear_script
->
set_icon
(
get_icon
(
"ScriptRemove"
,
"EditorIcons"
));
filter
->
add_icon_override
(
"right_icon"
,
get_icon
(
"Search"
,
"EditorIcons"
));
}
break
;
}
}
...
...
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