You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -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 {
|
||||
|
||||
OBJ_TYPE(AnimationPlayerEditor, VBoxContainer );
|
||||
OBJ_TYPE(AnimationPlayerEditor, VBoxContainer);
|
||||
|
||||
EditorNode *editor;
|
||||
AnimationPlayer *player;
|
||||
@@ -65,7 +64,6 @@ class AnimationPlayerEditor : public VBoxContainer {
|
||||
RESOURCE_SAVE
|
||||
};
|
||||
|
||||
|
||||
OptionButton *animation;
|
||||
Button *stop;
|
||||
Button *play;
|
||||
@@ -73,7 +71,7 @@ class AnimationPlayerEditor : public VBoxContainer {
|
||||
Button *play_bw;
|
||||
Button *play_bw_from;
|
||||
|
||||
// Button *pause;
|
||||
// Button *pause;
|
||||
Button *add_anim;
|
||||
Button *autoplay;
|
||||
Button *rename_anim;
|
||||
@@ -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 _input_event(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 {
|
||||
|
||||
OBJ_TYPE( AnimationPlayerEditorPlugin, EditorPlugin );
|
||||
OBJ_TYPE(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
|
||||
|
||||
Reference in New Issue
Block a user