Changes to Scribbler interface
parent
0691460682
commit
8f379e5cf1
|
@ -1944,9 +1944,7 @@ bool CBrain::CreateInterface(bool bSelect)
|
|||
void CBrain::UpdateInterface(float rTime)
|
||||
{
|
||||
Ui::CWindow* pw;
|
||||
/* TODO: #if _TEEN
|
||||
Ui::CButton* pb;
|
||||
#endif*/
|
||||
Ui::CGauge* pg;
|
||||
Ui::CCompass* pc;
|
||||
Ui::CGroup* pgr;
|
||||
|
@ -2058,8 +2056,7 @@ void CBrain::UpdateInterface(float rTime)
|
|||
pc->SetState(Ui::STATE_VISIBLE, m_main->GetShowMap());
|
||||
}
|
||||
|
||||
#if _TEEN
|
||||
pb = (CButton*)pw->SearchControl(EVENT_OBJECT_REC);
|
||||
pb = (Ui::CButton*)pw->SearchControl(EVENT_OBJECT_REC);
|
||||
if ( pb != 0 )
|
||||
{
|
||||
if ( m_bTraceRecord && Math::Mod(m_time, 0.4f) >= 0.2f )
|
||||
|
@ -2071,7 +2068,6 @@ void CBrain::UpdateInterface(float rTime)
|
|||
pb->ClearState(Ui::STATE_CHECK);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bOnBoard = m_camera->GetType() == Gfx::CAM_TYPE_ONBOARD;
|
||||
|
||||
|
@ -2151,10 +2147,8 @@ void CBrain::UpdateInterface()
|
|||
Ui::CWindow* pw;
|
||||
Ui::CButton* pb;
|
||||
Ui::CSlider* ps;
|
||||
#if _TEEN
|
||||
CColor* pc;
|
||||
Ui::CColor* pc;
|
||||
int color;
|
||||
#endif
|
||||
bool bEnable, bFly, bRun;
|
||||
char title[100];
|
||||
|
||||
|
@ -2189,7 +2183,6 @@ void CBrain::UpdateInterface()
|
|||
EnableInterface(pw, EVENT_OBJECT_FIRE, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_SPIDEREXPLO, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_RESET, bEnable);
|
||||
#if _TEEN
|
||||
EnableInterface(pw, EVENT_OBJECT_PEN0, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_PEN1, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_PEN2, bEnable);
|
||||
|
@ -2201,7 +2194,6 @@ void CBrain::UpdateInterface()
|
|||
EnableInterface(pw, EVENT_OBJECT_PEN8, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_REC, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_STOP, bEnable);
|
||||
#endif
|
||||
|
||||
if ( type == OBJECT_HUMAN ) // builder?
|
||||
{
|
||||
|
@ -2352,7 +2344,6 @@ void CBrain::UpdateInterface()
|
|||
CheckInterface(pw, EVENT_OBJECT_MFRONT, m_manipStyle==EVENT_OBJECT_MFRONT);
|
||||
}
|
||||
|
||||
#if _TEEN
|
||||
if ( m_object->GetTraceDown() )
|
||||
{
|
||||
pb = static_cast< Ui::CButton* >(pw->SearchControl(EVENT_OBJECT_PEN0));
|
||||
|
@ -2452,7 +2443,6 @@ void CBrain::UpdateInterface()
|
|||
pc->ClearState(Ui::STATE_CHECK);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Updates the list of programs.
|
||||
|
|
|
@ -4328,12 +4328,13 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
Math::Vector pos = OpPos(line, "pos")*g_unit;
|
||||
float dir = OpFloat(line, "dir", 0.0f)*Math::PI;
|
||||
bool trainer = OpInt(line, "trainer", 0);
|
||||
CObject* obj = CreateObject(pos, dir,
|
||||
OpFloat(line, "z", 1.0f),
|
||||
OpFloat(line, "h", 0.0f),
|
||||
type,
|
||||
OpFloat(line, "power", 1.0f),
|
||||
OpInt(line, "trainer", 0),
|
||||
trainer,
|
||||
OpInt(line, "toy", 0),
|
||||
OpInt(line, "option", 0));
|
||||
|
||||
|
@ -4395,12 +4396,14 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
obj->SetShield(OpFloat(line, "shield", 1.0f));
|
||||
obj->SetMagnifyDamage(OpFloat(line, "magnifyDamage", 1.0f));
|
||||
obj->SetClip(OpInt(line, "clip", 1));
|
||||
obj->SetCheckToken(OpInt(line, "checkToken", 1));
|
||||
obj->SetManual(OpInt(line, "manual", 0));
|
||||
obj->SetCheckToken(m_version >= 2 ? trainer : OpInt(line, "manual", 1));
|
||||
obj->SetManual(m_version >= 2 ? !trainer : OpInt(line, "manual", 0));
|
||||
|
||||
Math::Vector zoom = OpDir(line, "zoom");
|
||||
if (zoom.x != 0.0f || zoom.y != 0.0f || zoom.z != 0.0f)
|
||||
obj->SetZoom(0, zoom);
|
||||
if(m_version >= 2) {
|
||||
Math::Vector zoom = OpDir(line, "zoom");
|
||||
if (zoom.x != 0.0f || zoom.y != 0.0f || zoom.z != 0.0f)
|
||||
obj->SetZoom(0, zoom);
|
||||
}
|
||||
|
||||
CMotion* motion = obj->GetMotion();
|
||||
if (motion != nullptr)
|
||||
|
|
|
@ -1210,6 +1210,7 @@ bool CScript::rProduce(CBotVar* var, CBotVar* result, int& exception, void* user
|
|||
physics->SetFreeze(false); // can move
|
||||
}
|
||||
object->SetLock(false); // vehicle useable
|
||||
object->SetManual(true);
|
||||
object->SetActivity(true);
|
||||
script->m_main->CreateShortcuts();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue