aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/XUI/XUI_Ctrl_ProgressCtrlBase.cpp
diff options
context:
space:
mode:
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