mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-12 07:54:15 +00:00
format XUI
This commit is contained in:
@@ -8,62 +8,59 @@
|
||||
//----------------------------------------------------------------------------------
|
||||
// Performs initialization tasks - retrieves controls.
|
||||
//----------------------------------------------------------------------------------
|
||||
HRESULT CScene_PartnernetPassword::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
|
||||
{
|
||||
MapChildControls();
|
||||
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT);
|
||||
HRESULT CScene_PartnernetPassword::OnInit(XUIMessageInit* pInitData,
|
||||
BOOL& bHandled) {
|
||||
MapChildControls();
|
||||
ui.SetTooltips(DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT);
|
||||
|
||||
m_PartnernetPassword.SetEnable(true);
|
||||
m_PartnernetPassword.SetEnable(true);
|
||||
|
||||
m_PartnernetPassword.SetTextLimit(XCONTENT_MAX_DISPLAYNAME_LENGTH);
|
||||
|
||||
// set the caret to the end of the default text
|
||||
m_PartnernetPassword.SetCaretPosition(0);
|
||||
m_PartnernetPassword.SetKeyboardType(C_4JInput::EKeyboardMode_Phone);
|
||||
m_PartnernetPassword.SetTextLimit(XCONTENT_MAX_DISPLAYNAME_LENGTH);
|
||||
|
||||
m_PartnernetPassword.SetTitleAndText(IDS_NAME_WORLD,IDS_NAME_WORLD_TEXT);
|
||||
// set the caret to the end of the default text
|
||||
m_PartnernetPassword.SetCaretPosition(0);
|
||||
m_PartnernetPassword.SetKeyboardType(C_4JInput::EKeyboardMode_Phone);
|
||||
|
||||
return S_OK;
|
||||
m_PartnernetPassword.SetTitleAndText(IDS_NAME_WORLD, IDS_NAME_WORLD_TEXT);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Handler for the button press message.
|
||||
//----------------------------------------------------------------------------------
|
||||
HRESULT CScene_PartnernetPassword::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled)
|
||||
{
|
||||
// This assumes all buttons can only be pressed with the A button
|
||||
ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A);
|
||||
HRESULT CScene_PartnernetPassword::OnNotifyPressEx(
|
||||
HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled) {
|
||||
// This assumes all buttons can only be pressed with the A button
|
||||
ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A);
|
||||
|
||||
if(hObjPressed==m_OK)
|
||||
{
|
||||
// create the world and launch
|
||||
std::wstring wPassword = m_PartnernetPassword.GetText();
|
||||
if(wPassword==L"5183")
|
||||
{
|
||||
app.NavigateBack(pNotifyPressData->UserIndex);
|
||||
app.SetPartnernetPasswordRunning(false);
|
||||
ui.SetTooltips( DEFAULT_XUI_MENU_USER, -1);
|
||||
}
|
||||
rfHandled = TRUE;
|
||||
}
|
||||
if (hObjPressed == m_OK) {
|
||||
// create the world and launch
|
||||
std::wstring wPassword = m_PartnernetPassword.GetText();
|
||||
if (wPassword == L"5183") {
|
||||
app.NavigateBack(pNotifyPressData->UserIndex);
|
||||
app.SetPartnernetPasswordRunning(false);
|
||||
ui.SetTooltips(DEFAULT_XUI_MENU_USER, -1);
|
||||
}
|
||||
rfHandled = TRUE;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CScene_PartnernetPassword::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
|
||||
{
|
||||
ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);
|
||||
HRESULT CScene_PartnernetPassword::OnKeyDown(XUIMessageInput* pInputData,
|
||||
BOOL& rfHandled) {
|
||||
ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);
|
||||
|
||||
// Explicitly handle B button presses
|
||||
switch(pInputData->dwKeyCode)
|
||||
{
|
||||
case VK_PAD_A:
|
||||
case VK_PAD_B:
|
||||
case VK_ESCAPE:
|
||||
rfHandled = TRUE;
|
||||
break;
|
||||
}
|
||||
return S_OK;
|
||||
// Explicitly handle B button presses
|
||||
switch (pInputData->dwKeyCode) {
|
||||
case VK_PAD_A:
|
||||
case VK_PAD_B:
|
||||
case VK_ESCAPE:
|
||||
rfHandled = TRUE;
|
||||
break;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user