Fix camera: remove invalid Canvas.getFirstResponder (BL has no such API)

This commit is contained in:
RallyBlock committed 2026-11-10 01:23:59 -05:00
1 parent bd43fa9aa9
commit c731f4ab15
1 file changed
+29 -17
+29 -17
View File
@@ -31,6 +31,7 @@ $RPGClient::HelloLast = "";
$RPGClient::TopDownWatchSched = 0;
$RPGClient::CamSched = 0;
$RPGClient::LastClickTime = 0;
$RPGClient::ChatOpen = 0;
function RPGClient_NormPos(%ctrl, %pos)
{
@@ -258,19 +259,16 @@ function RPGClient_InPlay()
function RPGClient_TextTyping()
{
if (isObject(Canvas))
return $RPGClient::ChatOpen;
}
function RPGClient_SetChatOpen(%open)
{
$RPGClient::ChatOpen = %open ? 1 : 0;
if ($RPGClient::Active)
{
%fg = Canvas.getFirstResponder();
if (isObject(%fg))
{
%cn = %fg.getClassName();
if (%cn $= "GuiTextEditCtrl" || %cn $= "GuiMLTextEditCtrl")
{
return 1;
}
}
schedule(0, 0, RPGClient_SyncInputStack);
}
return 0;
}
function RPGClient_RpgKeys()
@@ -1220,6 +1218,10 @@ package RPGClient_Cursor
return;
}
Canvas.pushDialog(%this);
if ($RPGClient::Active)
{
RPGClient_SetChatOpen(0);
}
}
};
activatePackage(RPGClient_Cursor);
@@ -1291,22 +1293,32 @@ package RPGClient_ChatKeys
function GlobalChat(%val)
{
Parent::GlobalChat(%val);
if ($RPGClient::Active)
if ($RPGClient::Active && %val)
{
schedule(0, 0, RPGClient_SyncInputStack);
schedule(50, 0, RPGClient_SyncInputStack);
RPGClient_SetChatOpen(1);
}
}
function TeamChat(%val)
{
Parent::TeamChat(%val);
if ($RPGClient::Active)
if ($RPGClient::Active && %val)
{
schedule(0, 0, RPGClient_SyncInputStack);
schedule(50, 0, RPGClient_SyncInputStack);
RPGClient_SetChatOpen(1);
}
}
function newChatText::onWake(%this)
{
Parent::onWake(%this);
RPGClient_SetChatOpen(1);
}
function newChatText::onSleep(%this)
{
Parent::onSleep(%this);
RPGClient_SetChatOpen(0);
}
};
activatePackage(RPGClient_ChatKeys);