aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp')
-rw-r--r--Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp
index 576b7557..cc3afeca 100644
--- a/Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp
+++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_4JEdit.cpp
@@ -10,7 +10,7 @@ HRESULT CXuiCtrl4JEdit::OnInit(XUIMessageInit* pInitData, BOOL& rfHandled)
// set a limit for the text box
m_uTextLimit=XUI_4JEDIT_MAX_CHARS-1;
XuiEditSetTextLimit(m_hObj,m_uTextLimit);
- // Find the text limit. (Add one for nullptr terminator)
+ // Find the text limit. (Add one for NULL terminator)
//m_uTextLimit = min( XuiEditGetTextLimit(m_hObj) + 1, XUI_4JEDIT_MAX_CHARS);
ZeroMemory( wchText , sizeof(WCHAR)*(m_uTextLimit+1) );
@@ -127,7 +127,7 @@ HRESULT CXuiCtrl4JEdit::OnChar(XUIMessageChar* pInputData, BOOL& rfHandled)
XuiSendMessage( hBaseObj, &xuiMsg );
rfHandled = TRUE;
- SendNotifyValueChanged(static_cast<int>(pInputData->wch));
+ SendNotifyValueChanged((int)pInputData->wch);
return hr;
}
@@ -145,7 +145,7 @@ HRESULT CXuiCtrl4JEdit::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
if( pThis->m_bReadOnly ) return hr;
- // Find the text limit. (Add one for nullptr terminator)
+ // Find the text limit. (Add one for NULL terminator)
//m_uTextLimit = min( XuiEditGetTextLimit(m_hObj) + 1, XUI_4JEDIT_MAX_CHARS);
if((((pInputData->dwKeyCode == VK_PAD_A) && (pInputData->wch == 0)) || (pInputData->dwKeyCode == VK_PAD_START)) && !(pInputData->dwFlags & XUI_INPUT_FLAG_REPEAT))
@@ -185,14 +185,14 @@ HRESULT CXuiCtrl4JEdit::SendNotifyValueChanged(int iValue)
int CXuiCtrl4JEdit::KeyboardReturned(void *pParam,bool bSet)
{
- CXuiCtrl4JEdit* pClass = static_cast<CXuiCtrl4JEdit *>(pParam);
+ CXuiCtrl4JEdit* pClass = (CXuiCtrl4JEdit*)pParam;
HRESULT hr = S_OK;
if(bSet)
{
pClass->SetText(pClass->wchText);
// need to move the caret to the end of the newly set text
- XuiEditSetCaretPosition(pClass->m_hObj, static_cast<int>(wcsnlen(pClass->wchText, 50)));
+ XuiEditSetCaretPosition(pClass->m_hObj, (int)wcsnlen(pClass->wchText, 50));
pClass->SendNotifyValueChanged(10); // 10 for a return
}