android-native: auto hunt, in-client account registration, mobile UI polish
- Auto hunt (client-only): PythonPlayerAutoHunt.cpp + AutoHuntScript.inc as the embedded mt_autohunt module, AUTO touch button, F9/F8. - Account registration: tools/40250/register_server.py (rc.d mt_register, :11080) inserts into account.account; net.RegisterAccount/GetRegisterAccountResult (PythonAccountRegister.cpp) and the mt_register login-window dialog (RegisterScript.inc). - --py-exec also runs in --login-screen mode for scripted login-screen tests. - Touch controller, window manager and render command updates for the Android native client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
53d06c3c26
commit
3e3708ef06
@@ -176,7 +176,7 @@ bool CPythonApplication::Create(PyObject*, const char*, int, int, int)
|
||||
|
||||
if (IsNativeTerrainRenderEnabled())
|
||||
{
|
||||
const bool use_hardware_cursor = PythonBoot::HostHardwareCursorEnabled();
|
||||
const bool use_hardware_cursor = PythonBoot::HostHardwareCursorEnabled() || PythonBoot::TouchInput();
|
||||
if (CPythonSystem::InstancePtr() && CPythonSystem::Instance().GetConfig())
|
||||
CPythonSystem::Instance().GetConfig()->is_software_cursor = !use_hardware_cursor;
|
||||
SetCursorMode(use_hardware_cursor ? CURSOR_MODE_HARDWARE : CURSOR_MODE_SOFTWARE);
|
||||
@@ -214,6 +214,8 @@ void CPythonApplication::RenderGame()
|
||||
{
|
||||
long lx, ly;
|
||||
UI::CWindowManager::Instance().GetMousePosition(lx, ly);
|
||||
// PORT: window coordinates -> the screen coordinates of the full-width 3D view.
|
||||
lx += UI::CWindowManager::Instance().GetScreenOffsetX();
|
||||
CPythonGraphic::Instance().SetCursorPosition(lx, ly);
|
||||
}
|
||||
|
||||
@@ -453,7 +455,8 @@ int s_iCursorMode = CPythonApplication::CURSOR_MODE_HARDWARE; // m_iCurs
|
||||
void CPythonApplication::SetCursorVisible(BOOL bFlag, bool bLiarCursorOn)
|
||||
{
|
||||
s_bCursorVisible = bFlag;
|
||||
s_bLiarCursorOn = bLiarCursorOn;
|
||||
// PORT: a touch screen has no cursor, not even the stand-in 40250 draws while the real one is hidden.
|
||||
s_bLiarCursorOn = bLiarCursorOn && !PythonBoot::TouchInput();
|
||||
// PORT: 40250 also counts ShowCursor up or down in hardware mode; the host has no OS cursor to hide.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user