the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 69 lines 2.0 kB view raw
1#include "stdafx.h" 2#include "UI.h" 3#include "UIControl_DLCList.h" 4 5bool UIControl_DLCList::setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName) 6{ 7 UIControl::setControlType(UIControl::eDLCList); 8 bool success = UIControl_ButtonList::setupControl(scene,parent,controlName); 9 10 //SlotList specific initialisers 11 m_funcShowTick = registerFastName(L"ShowTick"); 12 13 return success; 14} 15 16void UIControl_DLCList::addItem(const string &label, bool showTick, int iId) 17{ 18 IggyDataValue result; 19 IggyDataValue value[3]; 20 21 IggyStringUTF8 stringVal; 22 stringVal.string = (char*)label.c_str(); 23 stringVal.length = (S32)label.length(); 24 value[0].type = IGGY_DATATYPE_string_UTF8; 25 value[0].string8 = stringVal; 26 27 value[1].type = IGGY_DATATYPE_number; 28 value[1].number = iId; 29 30 value[2].type = IGGY_DATATYPE_boolean; 31 value[2].boolval = showTick; 32 IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_addNewItemFunc , 3 , value ); 33 34 ++m_itemCount; 35} 36 37void UIControl_DLCList::addItem(const wstring &label, bool showTick, int iId) 38{ 39 IggyDataValue result; 40 IggyDataValue value[3]; 41 42 IggyStringUTF16 stringVal; 43 stringVal.string = (IggyUTF16 *)label.c_str(); 44 stringVal.length = (S32)label.length(); 45 value[0].type = IGGY_DATATYPE_string_UTF16; 46 value[0].string16 = stringVal; 47 48 value[1].type = IGGY_DATATYPE_number; 49 value[1].number = iId; 50 51 value[2].type = IGGY_DATATYPE_boolean; 52 value[2].boolval = showTick; 53 IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_addNewItemFunc , 3 , value ); 54 55 ++m_itemCount; 56} 57 58void UIControl_DLCList::showTick(int iId, bool showTick) 59{ 60 IggyDataValue result; 61 IggyDataValue value[2]; 62 63 value[0].type = IGGY_DATATYPE_number; 64 value[0].number = iId; 65 66 value[1].type = IGGY_DATATYPE_boolean; 67 value[1].boolval = showTick; 68 IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_funcShowTick , 2 , value ); 69}