aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.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_Ctrl_ProgressCtrlBase.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.cpp')
-rw-r--r--Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.cpp
new file mode 100644
index 00000000..6d1c4ce7
--- /dev/null
+++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.cpp
@@ -0,0 +1,22 @@
+#include "stdafx.h"
+
+#include "XUI_Ctrl_ProgressCtrlBase.h"
+
+HRESULT CXuiCtrlProgressCtrlBase::OnGetSourceDataText(XUIMessageGetSourceText *pGetSourceTextData, BOOL& bHandled)
+{
+ // The Xui backend calls GetSourceDataText every frame to get the text for the indexed label
+ // We don't want to change the label, but take this opportunity to send out a message to ourself
+ // to update the value of the progress bar
+ this->SetValue( GetValue() );
+
+ int min, max;
+ this->GetRange( &min, &max );
+ this->SetRange( min, max );
+
+ pGetSourceTextData->szText = L"";
+ pGetSourceTextData->bDisplay = FALSE;
+
+ bHandled = TRUE;
+
+ return S_OK;
+} \ No newline at end of file