aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/XUI/XUI_DebugTips.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/XUI/XUI_DebugTips.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/XUI/XUI_DebugTips.cpp')
-rw-r--r--Minecraft.Client/Common/XUI/XUI_DebugTips.cpp73
1 files changed, 73 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/XUI/XUI_DebugTips.cpp b/Minecraft.Client/Common/XUI/XUI_DebugTips.cpp
new file mode 100644
index 00000000..aaa3b06f
--- /dev/null
+++ b/Minecraft.Client/Common/XUI/XUI_DebugTips.cpp
@@ -0,0 +1,73 @@
+#include "stdafx.h"
+
+#include <assert.h>
+#include "XUI_DebugTips.h"
+#include "..\..\..\Minecraft.World\StringHelpers.h"
+
+//----------------------------------------------------------------------------------
+// Performs initialization tasks - retrieves controls.
+//----------------------------------------------------------------------------------
+HRESULT CScene_DebugTips::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
+{
+ m_iPad = *(int *)pInitData->pvInitData;
+
+ m_bIgnoreInput = false;
+
+ MapChildControls();
+
+ // Display the tooltips
+ //ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT);
+ // display the next tip
+ wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip()));
+ wchar_t startTags[64];
+ swprintf(startTags,64,L"<font color=\"#%08x\" size=14><DIV ALIGN=CENTER>",app.GetHTMLColour(eHTMLColor_White));
+ wsText= startTags + wsText + L"</DIV>";
+ XuiControlSetText(m_tip,wsText.c_str());
+
+ return S_OK;
+}
+
+
+HRESULT CScene_DebugTips::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
+{
+ //ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);
+
+
+ switch(pInputData->dwKeyCode)
+ {
+ case VK_PAD_A:
+ {
+
+
+ // next tip
+ // display the next tip
+ wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip()));
+ wchar_t startTags[64];
+ swprintf(startTags,64,L"<font color=\"#%08x\" size=14><DIV ALIGN=CENTER>",app.GetHTMLColour(eHTMLColor_White));
+ wsText= startTags + wsText + L"</DIV>";
+ XuiControlSetText(m_tip,wsText.c_str());
+
+ rfHandled = TRUE;
+ }
+ break;
+
+ case VK_PAD_B:
+ case VK_PAD_START:
+ case VK_ESCAPE:
+
+ app.NavigateBack(m_iPad);
+
+ rfHandled = TRUE;
+
+ break;
+#ifndef _CONTENT_PACKAGE
+ case VK_PAD_LTHUMB_PRESS:
+#ifdef _XBOX
+ app.OverrideFontRenderer(true);
+#endif
+ break;
+#endif
+ }
+
+ return S_OK;
+} \ No newline at end of file