aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIControl_DLCList.cpp
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Common/UI/UIControl_DLCList.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/UI/UIControl_DLCList.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIControl_DLCList.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/UI/UIControl_DLCList.cpp b/Minecraft.Client/Common/UI/UIControl_DLCList.cpp
new file mode 100644
index 00000000..35e6b08a
--- /dev/null
+++ b/Minecraft.Client/Common/UI/UIControl_DLCList.cpp
@@ -0,0 +1,69 @@
+#include "stdafx.h"
+#include "UI.h"
+#include "UIControl_DLCList.h"
+
+bool UIControl_DLCList::setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName)
+{
+ UIControl::setControlType(UIControl::eDLCList);
+ bool success = UIControl_ButtonList::setupControl(scene,parent,controlName);
+
+ //SlotList specific initialisers
+ m_funcShowTick = registerFastName(L"ShowTick");
+
+ return success;
+}
+
+void UIControl_DLCList::addItem(const string &label, bool showTick, int iId)
+{
+ IggyDataValue result;
+ IggyDataValue value[3];
+
+ IggyStringUTF8 stringVal;
+ stringVal.string = (char*)label.c_str();
+ stringVal.length = (S32)label.length();
+ value[0].type = IGGY_DATATYPE_string_UTF8;
+ value[0].string8 = stringVal;
+
+ value[1].type = IGGY_DATATYPE_number;
+ value[1].number = iId;
+
+ value[2].type = IGGY_DATATYPE_boolean;
+ value[2].boolval = showTick;
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_addNewItemFunc , 3 , value );
+
+ ++m_itemCount;
+}
+
+void UIControl_DLCList::addItem(const wstring &label, bool showTick, int iId)
+{
+ IggyDataValue result;
+ IggyDataValue value[3];
+
+ IggyStringUTF16 stringVal;
+ stringVal.string = (IggyUTF16 *)label.c_str();
+ stringVal.length = (S32)label.length();
+ value[0].type = IGGY_DATATYPE_string_UTF16;
+ value[0].string16 = stringVal;
+
+ value[1].type = IGGY_DATATYPE_number;
+ value[1].number = iId;
+
+ value[2].type = IGGY_DATATYPE_boolean;
+ value[2].boolval = showTick;
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_addNewItemFunc , 3 , value );
+
+ ++m_itemCount;
+}
+
+void UIControl_DLCList::showTick(int iId, bool showTick)
+{
+ IggyDataValue result;
+ IggyDataValue value[2];
+
+ value[0].type = IGGY_DATATYPE_number;
+ value[0].number = iId;
+
+ value[1].type = IGGY_DATATYPE_boolean;
+ value[1].boolval = showTick;
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_funcShowTick , 2 , value );
+}