Sdk/Console: Add command history

Former-commit-id: e5b437988a3f81b2724c0f1a45da0bbfc85b14b0
This commit is contained in:
Lynix
2016-03-30 18:36:54 +02:00
parent b331d66c70
commit 2b51a8b4b6
2 changed files with 51 additions and 6 deletions

View File

@@ -9,6 +9,7 @@
#include <Nazara/Graphics/Sprite.hpp>
#include <Nazara/Graphics/TextSprite.hpp>
#include <Nazara/Utility/Event.hpp>
#include <Nazara/Utility/Node.hpp>
#include <Nazara/Utility/SimpleTextDrawer.hpp>
#include <NDK/EntityOwner.hpp>
@@ -43,6 +44,7 @@ namespace Ndk
inline bool IsVisible() const;
void SendCharacter(char32_t character);
void SendEvent(Nz::WindowEvent event);
void SetCharacterSize(unsigned int size);
void SetSize(const Nz::Vector2f& size);
@@ -65,6 +67,8 @@ namespace Ndk
Nz::String text;
};
std::size_t m_historyPosition;
std::vector<Nz::String> m_commandHistory;
std::vector<Line> m_historyLines;
EntityOwner m_historyBackground;
EntityOwner m_history;