VehicleAI::VehicleAI(Creature *c) : CreatureAI(c), m_vehicle(c->GetVehicleKit()), m_IsVehicleInUse(false), m_ConditionsTimer( VEHICLE_CONDITION_CHECK_TIME) { LoadConditions(); m_DoDismiss = false; m_DismissTimer = VEHICLE_DISMISS_TIME; }
bool CSearchDialog::Load() { if (!wxDialogEx::Load(m_parent, _T("ID_SEARCH"))) return false; /* XRCed complains if adding a status bar to a dialog, so do it here instead */ CFilelistStatusBar* pStatusBar = new CFilelistStatusBar(this); pStatusBar->SetEmptyString(_("No search results")); GetSizer()->Add(pStatusBar, 0, wxGROW); if (!CreateListControl(filter_name | filter_size | filter_path | filter_date)) return false; m_results = new CSearchDialogFileList(this, m_pState, 0); ReplaceControl(XRCCTRL(*this, "ID_RESULTS", wxWindow), m_results); m_results->SetFilelistStatusBar(pStatusBar); const CServerPath path = m_pState->GetRemotePath(); if (!path.IsEmpty()) XRCCTRL(*this, "ID_PATH", wxTextCtrl)->ChangeValue(path.GetPath()); SetCtrlState(); m_pWindowStateManager = new CWindowStateManager(this); m_pWindowStateManager->Restore(OPTION_SEARCH_SIZE, wxSize(750, 500)); Layout(); LoadConditions(); EditFilter(m_search_filter); XRCCTRL(*this, "ID_CASE", wxCheckBox)->SetValue(m_search_filter.matchCase); return true; }
VehicleAI::VehicleAI(Creature* creature) : CreatureAI(creature), m_HasConditions(false), m_ConditionsTimer(VEHICLE_CONDITION_CHECK_TIME) { LoadConditions(); m_DoDismiss = false; m_DismissTimer = VEHICLE_DISMISS_TIME; }
GUIObject::GUIObject(xml_node<>* node) { mConditionsResult = true; if (node) LoadConditions(node, mConditions); }