Mobile HUD: minimap radar in its frame, top row at the screen edge
Preview radar drew at the fixed PC spot; it now follows the uiminimap window (CPythonMiniMap::GetScreenPosition) and its open state. On Android the top safe inset came from the hidden status bar's gesture zone; Ava2Surface takes the top only from the cutout and visible bars. The preview keyboard-hint header is skipped in touch mode, and --game-script also runs with --preview-data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
15b2397b54
commit
c132891aef
@@ -293,13 +293,8 @@ void CPythonMiniMap::Update(float fCenterX, float fCenterY)
|
||||
|
||||
void CPythonMiniMap::Render(float fScreenX, float fScreenY)
|
||||
{
|
||||
// CPythonBackground::IsMapReady is implied by GetOutdoorMap (the terrain block loaded).
|
||||
if (!GetOutdoorMap())
|
||||
return;
|
||||
|
||||
if (!m_bShow)
|
||||
return;
|
||||
|
||||
// Record the window position even before a map is ready: the --preview-data radar
|
||||
// (app_loop) draws into the minimap frame through GetScreenPosition.
|
||||
if (m_fScreenX != fScreenX || m_fScreenY != fScreenY)
|
||||
{
|
||||
m_fScreenX = fScreenX;
|
||||
@@ -307,6 +302,13 @@ void CPythonMiniMap::Render(float fScreenX, float fScreenY)
|
||||
__SetPosition();
|
||||
}
|
||||
|
||||
// CPythonBackground::IsMapReady is implied by GetOutdoorMap (the terrain block loaded).
|
||||
if (!GetOutdoorMap())
|
||||
return;
|
||||
|
||||
if (!m_bShow)
|
||||
return;
|
||||
|
||||
// Draw the native terrain minimap tiles under the existing player/NPC marks.
|
||||
auto* device = CGraphicDevice::InstancePtr();
|
||||
if (auto* renderer = device ? device->GetRenderer() : nullptr) {
|
||||
@@ -1037,6 +1039,7 @@ void CPythonMiniMap::ShowAtlas() { m_bShowAtlas = true; }
|
||||
void CPythonMiniMap::HideAtlas() { m_bShowAtlas = false; }
|
||||
bool CPythonMiniMap::CanShowAtlas() { return m_bShowAtlas; }
|
||||
bool CPythonMiniMap::CanShow() { return m_bShow; }
|
||||
void CPythonMiniMap::GetScreenPosition(float* pfx, float* pfy) const { *pfx = m_fScreenX; *pfy = m_fScreenY; }
|
||||
void CPythonMiniMap::Show() { m_bShow = true; }
|
||||
void CPythonMiniMap::Hide() { m_bShow = false; }
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ public:
|
||||
|
||||
void Update(float fCenterX, float fCenterY);
|
||||
void Render(float fScreenX, float fScreenY);
|
||||
// Last position passed to Render (0,0 before the minimap window first rendered).
|
||||
void GetScreenPosition(float* pfx, float* pfy) const;
|
||||
|
||||
void Show();
|
||||
void Hide();
|
||||
|
||||
Reference in New Issue
Block a user