diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Common/UI/UIComponent_DebugUIConsole.cpp | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/UI/UIComponent_DebugUIConsole.cpp')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIComponent_DebugUIConsole.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/UI/UIComponent_DebugUIConsole.cpp b/Minecraft.Client/Common/UI/UIComponent_DebugUIConsole.cpp new file mode 100644 index 00000000..7436d796 --- /dev/null +++ b/Minecraft.Client/Common/UI/UIComponent_DebugUIConsole.cpp @@ -0,0 +1,39 @@ +#include "stdafx.h" +#include "UI.h" +#include "UIComponent_DebugUIConsole.h" + +UIComponent_DebugUIConsole::UIComponent_DebugUIConsole(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer) +{ + // Setup all the Iggy references we need for this scene + initialiseMovie(); + + m_bTextChanged = false; +} + +wstring UIComponent_DebugUIConsole::getMoviePath() +{ + return L"DebugUIConsoleComponent"; +} + +void UIComponent_DebugUIConsole::tick() +{ + UIScene::tick(); + if(m_bTextChanged) + { + m_bTextChanged = false; + for(unsigned int i = 0; i < 10 && i < m_textList.size(); ++i) + { + m_labels[i].setLabel(m_textList[i]); + } + } +} + +void UIComponent_DebugUIConsole::addText(const string &text) +{ + if(!text.empty() && text.compare("\n") != 0) + { + if(m_textList.size() >= 10) m_textList.pop_front(); + m_textList.push_back(text); + m_bTextChanged = true; + } +}
\ No newline at end of file |
