From 688047a4c95e688984c8000722e9fd368d3bced6 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 1 Sep 2015 00:49:47 -0300 Subject: -removed resources dock, good bye old friend --- tools/editor/editor_data.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tools/editor/editor_data.cpp') 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() { -- cgit v1.2.3-70-g09d2