@@ -70,7 +70,7 @@ public:
|
|||||||
virtual RString GetPageName() const { return "Main"; }
|
virtual RString GetPageName() const { return "Main"; }
|
||||||
virtual bool ForceOffAfterUse() const { return false; }
|
virtual bool ForceOffAfterUse() const { return false; }
|
||||||
virtual bool IsEnabled() const = 0;
|
virtual bool IsEnabled() const = 0;
|
||||||
virtual void DoAndLog( RString &sMessageOut ) const
|
virtual void DoAndLog( RString &sMessageOut )
|
||||||
{
|
{
|
||||||
RString s1 = GetDisplayTitle();
|
RString s1 = GetDisplayTitle();
|
||||||
RString s2 = GetDisplayValue();
|
RString s2 = GetDisplayValue();
|
||||||
@@ -454,16 +454,15 @@ bool ScreenDebugOverlay::Input( const InputEventPlus &input )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicitly be tricky to keep the values aligned.
|
FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p )
|
||||||
int i = -1;
|
|
||||||
for (IDebugLine const *p : *g_pvpSubscribers)
|
|
||||||
{
|
{
|
||||||
RString sPageName = p->GetPageName();
|
RString sPageName = (*p)->GetPageName();
|
||||||
++i;
|
|
||||||
|
int i = p-g_pvpSubscribers->begin();
|
||||||
|
|
||||||
// Gameplay buttons are available only in gameplay. Non-gameplay buttons
|
// Gameplay buttons are available only in gameplay. Non-gameplay buttons
|
||||||
// are only available when the screen is displayed.
|
// are only available when the screen is displayed.
|
||||||
IDebugLine::Type type = p->GetType();
|
IDebugLine::Type type = (*p)->GetType();
|
||||||
switch( type )
|
switch( type )
|
||||||
{
|
{
|
||||||
case IDebugLine::all_screens:
|
case IDebugLine::all_screens:
|
||||||
@@ -480,17 +479,17 @@ bool ScreenDebugOverlay::Input( const InputEventPlus &input )
|
|||||||
FAIL_M(ssprintf("Invalid debug line type: %i", type));
|
FAIL_M(ssprintf("Invalid debug line type: %i", type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if( input.DeviceI == p->m_Button )
|
if( input.DeviceI == (*p)->m_Button )
|
||||||
{
|
{
|
||||||
if( input.type != IET_FIRST_PRESS )
|
if( input.type != IET_FIRST_PRESS )
|
||||||
return true; // eat the input but do nothing
|
return true; // eat the input but do nothing
|
||||||
|
|
||||||
// do the action
|
// do the action
|
||||||
RString sMessage;
|
RString sMessage;
|
||||||
p->DoAndLog( sMessage );
|
(*p)->DoAndLog( sMessage );
|
||||||
if( !sMessage.empty() )
|
if( !sMessage.empty() )
|
||||||
LOG->Trace("DEBUG: %s", sMessage.c_str() );
|
LOG->Trace("DEBUG: %s", sMessage.c_str() );
|
||||||
if( p->ForceOffAfterUse() )
|
if( (*p)->ForceOffAfterUse() )
|
||||||
m_bForcedHidden = true;
|
m_bForcedHidden = true;
|
||||||
|
|
||||||
// update text to show the effect of what changed above
|
// update text to show the effect of what changed above
|
||||||
|
|||||||
Reference in New Issue
Block a user