the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 39 lines 861 B view raw
1#include "stdafx.h" 2#include "UI.h" 3#include "UIComponent_DebugUIConsole.h" 4 5UIComponent_DebugUIConsole::UIComponent_DebugUIConsole(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer) 6{ 7 // Setup all the Iggy references we need for this scene 8 initialiseMovie(); 9 10 m_bTextChanged = false; 11} 12 13wstring UIComponent_DebugUIConsole::getMoviePath() 14{ 15 return L"DebugUIConsoleComponent"; 16} 17 18void UIComponent_DebugUIConsole::tick() 19{ 20 UIScene::tick(); 21 if(m_bTextChanged) 22 { 23 m_bTextChanged = false; 24 for(unsigned int i = 0; i < 10 && i < m_textList.size(); ++i) 25 { 26 m_labels[i].setLabel(m_textList[i]); 27 } 28 } 29} 30 31void UIComponent_DebugUIConsole::addText(const string &text) 32{ 33 if(!text.empty() && text.compare("\n") != 0) 34 { 35 if(m_textList.size() >= 10) m_textList.pop_front(); 36 m_textList.push_back(text); 37 m_bTextChanged = true; 38 } 39}