diff options
| author | Juan Linietsky | 2015-09-01 00:49:47 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-09-01 00:49:47 -0300 |
| commit | 688047a4c95e688984c8000722e9fd368d3bced6 (patch) | |
| tree | 4a9b6695ccfe5b3a50c5e92b7dd88aea61251dcd /tools/editor/editor_data.cpp | |
| parent | cf57a654d7d09fe169455ffc2049cd4bfec660f3 (diff) | |
| download | godot-688047a4c95e688984c8000722e9fd368d3bced6.tar.gz godot-688047a4c95e688984c8000722e9fd368d3bced6.tar.zst godot-688047a4c95e688984c8000722e9fd368d3bced6.zip | |
-removed resources dock, good bye old friend
Diffstat (limited to 'tools/editor/editor_data.cpp')
| -rw-r--r-- | tools/editor/editor_data.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index 3131bd895..673ee30ad 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -123,6 +123,27 @@ void EditorHistory::add_object(ObjectID p_object,int p_relevel){ _add_object(p_object,"",p_relevel); } +int EditorHistory::get_history_len() { + return history.size(); +} +int EditorHistory::get_history_pos() { + return current; +} + +ObjectID EditorHistory::get_history_obj(int p_obj) const { + ERR_FAIL_INDEX_V(p_obj,history.size(),0); + ERR_FAIL_INDEX_V(history[p_obj].level,history[p_obj].path.size(),0); + return history[p_obj].path[history[p_obj].level].object; +} + +bool EditorHistory::is_at_begining() const { + return current<=0; +} +bool EditorHistory::is_at_end() const { + + return ((current+1)>=history.size()); +} + bool EditorHistory::next() { |
