void CGameObject::ProcessEvent(const CEvent &AEvent) { if (Created && Enabled) { CLuaFunctionCall fc(GetName(), "On" + AEvent.GetName()); LuaVirtualMachine->PushEventTable(AEvent); fc.SetArgumentsCount(1); fc.Call(); } }
void CLogViewer::ProcessEvent(const CEvent &AEvent) { if (AEvent.GetName() != "LogOutput") return; string text = AEvent.GetData<string>("Text"); // bool scrollNeeded = Display->verticalScrollBar()->value() == Display->verticalScrollBar()->maximum(); //Display->appendPlainText(QString::fromStdString(text)); Display->appendPlainText(QString::fromStdString(text)); //Display->centerCursor(); // if (scrollNeeded) // Display->verticalScrollBar()->setValue(Display->verticalScrollBar()->maximum()); // Display->update(); }