summaryrefslogtreecommitdiff
path: root/editor/plugins/animation_player_editor_plugin.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /editor/plugins/animation_player_editor_plugin.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.h')
-rw-r--r--editor/plugins/animation_player_editor_plugin.h50
1 files changed, 20 insertions, 30 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index d9b6ad52ff..0eee4afcd4 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -29,14 +29,13 @@
#ifndef ANIMATION_PLAYER_EDITOR_PLUGIN_H
#define ANIMATION_PLAYER_EDITOR_PLUGIN_H
-#include "editor/editor_plugin.h"
#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/texture_button.h"
#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
-
+#include "scene/gui/texture_button.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
@@ -44,7 +43,7 @@
class AnimationKeyEditor;
class AnimationPlayerEditor : public VBoxContainer {
- GDCLASS(AnimationPlayerEditor, VBoxContainer );
+ GDCLASS(AnimationPlayerEditor, VBoxContainer);
EditorNode *editor;
AnimationPlayer *player;
@@ -65,7 +64,6 @@ class AnimationPlayerEditor : public VBoxContainer {
RESOURCE_SAVE
};
-
OptionButton *animation;
Button *stop;
Button *play;
@@ -97,30 +95,27 @@ class AnimationPlayerEditor : public VBoxContainer {
EditorFileDialog *file;
AcceptDialog *accept;
- ConfirmationDialog* delete_dialog;
+ ConfirmationDialog *delete_dialog;
int current_option;
struct BlendEditor {
- AcceptDialog * dialog;
+ AcceptDialog *dialog;
Tree *tree;
OptionButton *next;
} blend_editor;
-
ConfirmationDialog *name_dialog;
ConfirmationDialog *error_dialog;
bool renaming;
-
bool updating;
bool updating_blends;
AnimationKeyEditor *key_editor;
-
- void _select_anim_by_name(const String& p_anim);
+ void _select_anim_by_name(const String &p_anim);
void _play_pressed();
void _play_from_pressed();
void _play_bw_pressed();
@@ -134,9 +129,9 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_name_edited();
void _animation_load();
- void _animation_save_in_path(const Ref<Resource>& p_resource, const String& p_path);
- void _animation_save(const Ref<Resource>& p_resource);
- void _animation_save_as(const Ref<Resource>& p_resource);
+ void _animation_save_in_path(const Ref<Resource> &p_resource, const String &p_path);
+ void _animation_save(const Ref<Resource> &p_resource);
+ void _animation_save_as(const Ref<Resource> &p_resource);
void _animation_remove();
void _animation_remove_confirmed();
@@ -144,10 +139,10 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_edit();
void _animation_duplicate();
void _animation_resource_edit();
- void _scale_changed(const String& p_scale);
+ void _scale_changed(const String &p_scale);
void _dialog_action(String p_file);
- void _seek_frame_changed(const String& p_frame);
- void _seek_value_changed(float p_value, bool p_set=false);
+ void _seek_frame_changed(const String &p_frame);
+ void _seek_value_changed(float p_value, bool p_set = false);
void _blend_editor_next_changed(const int p_idx);
void _list_changed();
@@ -155,7 +150,6 @@ class AnimationPlayerEditor : public VBoxContainer {
void _update_player();
void _blend_edited();
-
void _hide_anim_editors();
void _animation_player_changed(Object *p_pl);
@@ -164,46 +158,43 @@ class AnimationPlayerEditor : public VBoxContainer {
void _animation_key_editor_anim_len_changed(float p_new);
void _animation_key_editor_anim_step_changed(float p_len);
- void _unhandled_key_input(const InputEvent& p_ev);
+ void _unhandled_key_input(const InputEvent &p_ev);
void _animation_tool_menu(int p_option);
void _animation_save_menu(int p_option);
-
AnimationPlayerEditor();
-protected:
+protected:
void _notification(int p_what);
void _gui_input(InputEvent p_event);
void _node_removed(Node *p_node);
static void _bind_methods();
-public:
+public:
AnimationPlayer *get_player() const;
static AnimationPlayerEditor *singleton;
- AnimationKeyEditor* get_key_editor() { return key_editor; }
+ AnimationKeyEditor *get_key_editor() { return key_editor; }
Dictionary get_state() const;
- void set_state(const Dictionary& p_state);
-
+ void set_state(const Dictionary &p_state);
void ensure_visibility();
- void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo=p_undo_redo; }
+ void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }
void edit(AnimationPlayer *p_player);
AnimationPlayerEditor(EditorNode *p_editor);
};
class AnimationPlayerEditorPlugin : public EditorPlugin {
- GDCLASS( AnimationPlayerEditorPlugin, EditorPlugin );
+ GDCLASS(AnimationPlayerEditorPlugin, EditorPlugin);
AnimationPlayerEditor *anim_editor;
EditorNode *editor;
public:
-
virtual Dictionary get_state() const { return anim_editor->get_state(); }
- virtual void set_state(const Dictionary& p_state) { anim_editor->set_state(p_state); }
+ virtual void set_state(const Dictionary &p_state) { anim_editor->set_state(p_state); }
virtual String get_name() const { return "Anim"; }
bool has_main_screen() const { return false; }
@@ -213,7 +204,6 @@ public:
AnimationPlayerEditorPlugin(EditorNode *p_node);
~AnimationPlayerEditorPlugin();
-
};
#endif // ANIMATION_PLAYER_EDITOR_PLUGIN_H