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