void CAuto::UpdateInterface(float rTime) { Ui::CWindow* pw; Ui::CGauge* pg; if ( m_time < m_lastUpdateTime+0.1f ) return; m_lastUpdateTime = m_time; if ( !m_object->GetSelect() ) return; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == nullptr ) return; pg = static_cast<Ui::CGauge*>(pw->SearchControl(EVENT_OBJECT_GSHIELD)); if ( pg != nullptr ) { pg->SetLevel(m_object->GetShield()); } pg = static_cast<Ui::CGauge*>(pw->SearchControl(EVENT_OBJECT_GPROGRESS)); if ( pg != nullptr ) { pg->SetLevel(m_progressTime); } }
void CDisplayText::HideText(bool bHide) { Ui::CWindow* pw; Ui::CGroup* pg; Ui::CLabel* pl; Ui::CButton* pb; int i; m_bHide = bHide; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return; for ( i=0 ; i<MAXDTLINE ; i++ ) { pg = static_cast<Ui::CGroup*>(pw->SearchControl(EventType(EVENT_DT_GROUP0+i))); if ( pg != 0 ) { pg->SetState(STATE_VISIBLE, !bHide); } pl = static_cast<Ui::CLabel*>(pw->SearchControl(EventType(EVENT_DT_LABEL0+i))); if ( pl != 0 ) { pl->SetState(STATE_VISIBLE, !bHide); } pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb != 0 ) { pb->SetState(STATE_VISIBLE, !bHide); } } }
void CDisplayInfo::HyperUpdate() { Ui::CWindow* pw; Ui::CEdit* edit; Ui::CButton* button; bool bEnable; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_HYPER_HOME)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_HOME); button->SetState(STATE_ENABLE, bEnable); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_HYPER_PREV)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_PREV); button->SetState(STATE_ENABLE, bEnable); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_HYPER_NEXT)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_NEXT); button->SetState(STATE_ENABLE, bEnable); } }
void CDisplayInfo::ChangeIndexButton(int index) { Ui::CWindow* pw; Ui::CEdit* edit; char* filename; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; if ( m_index != -1 ) { m_main->SetDisplayInfoPosition(m_index, GetPosition()); } m_index = index; edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { filename = m_main->GetDisplayInfoName(m_index); edit->ReadText(filename); edit->HyperHome(std::string(filename)); SetPosition(m_main->GetDisplayInfoPosition(m_index)); } UpdateIndexButton(); }
void CAutoInfo::UpdateList() { Ui::CWindow* pw; Ui::CList* pl; Info info; int total, i; char text[100]; pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == nullptr ) return; pl = static_cast< Ui::CList* >(pw->SearchControl(EVENT_OBJECT_GINFO)); if ( pl == nullptr ) return; pl->Flush(); total = m_object->GetInfoTotal(); if ( total == 0 ) { pl->ClearState(Ui::STATE_ENABLE); } else { pl->SetState(Ui::STATE_ENABLE); for ( i=0 ; i<total ; i++ ) { info = m_object->GetInfo(i); sprintf(text, "%s = %.2f", info.name, info.value); pl->SetItemName(i, text); } } m_object->SetInfoUpdate(false); }
void CAutoInfo::UpdateList() { CExchangePost* object = static_cast<CExchangePost*>(m_object); Ui::CWindow* pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if (pw == nullptr) return; Ui::CList* pl = static_cast< Ui::CList* >(pw->SearchControl(EVENT_OBJECT_GINFO)); if (pl == nullptr) return; pl->Flush(); const auto& infoList = object->GetInfoList(); if (infoList.empty()) { pl->ClearState(Ui::STATE_ENABLE); } else { pl->SetState(Ui::STATE_ENABLE); for (int i = 0; i < static_cast<int>(infoList.size()); i++) { char text[100]; sprintf(text, "%s = %.2f", infoList[i].name.c_str(), infoList[i].value); pl->SetItemName(i, text); } } object->SetInfoUpdate(false); }
void CAutoTower::UpdateInterface(float rTime) { Ui::CWindow* pw; Ui::CGauge* pg; CObject* power; float energy; CAuto::UpdateInterface(rTime); if ( m_time < m_lastUpdateTime+0.1f ) return; m_lastUpdateTime = m_time; if ( !m_object->GetSelect() ) return; pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == 0 ) return; pg = static_cast< Ui::CGauge* >(pw->SearchControl(EVENT_OBJECT_GENERGY)); if ( pg != 0 ) { energy = 0.0f; power = m_object->GetPower(); if ( power != 0 ) { energy = power->GetEnergy(); } pg->SetLevel(energy); } }
void CAutoInfo::UpdateListVirus() { Ui::CWindow* pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if (pw == nullptr) return; Ui::CList* pl = static_cast< Ui::CList* >(pw->SearchControl(EVENT_OBJECT_GINFO)); if (pl == nullptr) return; pl->SetState(Ui::STATE_ENABLE); pl->Flush(); for (int i = 0; i < 4; ++i) { char text[100]; int max = static_cast< int >(2.0f+Math::Rand()*10.0f); for (int j = 0; j < max; ++j) { do { text[j] = ' '+static_cast<int>(Math::Rand()*94.0f); } while (text[j] == '\\'); } text[max] = 0; pl->SetItemName(i, text); } }
void CDisplayInfo::UpdateCopyButton() { Ui::CWindow* pw; Ui::CButton* button; Ui::CEdit* edit; int c1, c2; //? if ( m_index != SATCOM_LOADING ) return; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_HYPER_COPY)); if ( button == 0 ) return; edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; edit->GetCursor(c1, c2); button->SetState(STATE_ENABLE, c1!=c2); }
int CDisplayInfo::GetPosition() { Ui::CWindow* pw; Ui::CEdit* edit; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return 0; edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return 0; return edit->GetFirstLine(); }
void CDisplayInfo::SetPosition(int pos) { Ui::CWindow* pw; Ui::CEdit* edit; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == nullptr ) return; edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit == nullptr ) return; edit->SetFirstLine(pos); }
void CDisplayText::SetVisit(EventType event) { Ui::CWindow* pw; Ui::CButton* pb; int i; i = event-EVENT_DT_VISIT0; if ( i < 0 || i >= MAXDTLINE ) return; pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == nullptr ) return; pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb == nullptr ) return; pb->SetIcon(48); // > }
bool CDisplayText::IsVisit(EventType event) { Ui::CWindow* pw; Ui::CButton* pb; int i; i = event-EVENT_DT_VISIT0; if ( i < 0 || i >= MAXDTLINE ) return false; pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return false; pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb == 0 ) return false; return (pb->GetIcon() == 48); // > ? }
void CDisplayInfo::ViewDisplayInfo() { Ui::CWindow* pw; Ui::CEdit* edit; Math::IntPoint dim; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; dim = m_engine->GetWindowSize(); edit->SetFontSize(m_main->GetFontSize()/(dim.x / 640.0f)); }
void CDisplayText::ClearVisit() { Ui::CWindow* pw; Ui::CButton* pb; int i; pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return; for ( i=0 ; i<MAXDTLINE ; i++ ) { pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i))); if ( pb == 0 ) break; pb->SetIcon(14); // eyes } }
void CAutoTower::UpdateInterface(float rTime) { CAuto::UpdateInterface(rTime); if ( m_time < m_lastUpdateTime+0.1f ) return; m_lastUpdateTime = m_time; if ( !m_object->GetSelect() ) return; Ui::CWindow* pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == nullptr ) return; Ui::CGauge* pg = static_cast< Ui::CGauge* >(pw->SearchControl(EVENT_OBJECT_GENERGY)); if ( pg != nullptr ) { float energy = GetObjectEnergy(m_object); pg->SetLevel(energy); } }
bool CDisplayText::ClearLastText() { Ui::CWindow *pw; Ui::CButton *pb1, *pb2; Ui::CGroup *pg1, *pg2; Ui::CLabel *pl1, *pl2; int i; pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) return false; pb2 = static_cast<CButton*>(pw->SearchControl(EVENT_DT_VISIT0)); if ( pb2 == 0 ) return false; // same not of first-line pg2 = static_cast<CGroup*>(pw->SearchControl(EVENT_DT_GROUP0)); if ( pg2 == 0 ) return false; pl2 = static_cast<CLabel*>(pw->SearchControl(EVENT_DT_LABEL0)); if ( pl2 == 0 ) return false; for ( i=0 ; i<MAXDTLINE-1 ; i++ ) { pb1 = pb2; pg1 = pg2; pl1 = pl2; pb2 = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i+1))); if ( pb2 == 0 ) break; pg2 = static_cast<CGroup*>(pw->SearchControl(EventType(EVENT_DT_GROUP0+i+1))); if ( pg2 == 0 ) break; pl2 = static_cast<CLabel*>(pw->SearchControl(EventType(EVENT_DT_LABEL0+i+1))); if ( pl2 == 0 ) break; pb1->SetState(STATE_ENABLE, pb2->TestState(STATE_ENABLE)); pg1->SetIcon(pg2->GetIcon()); pl1->SetName(pl2->GetName()); m_time[i] = m_time[i+1]; m_visitGoal[i] = m_visitGoal[i+1]; m_visitDist[i] = m_visitDist[i+1]; m_visitHeight[i] = m_visitHeight[i+1]; // shift } pw->DeleteControl(EventType(EVENT_DT_VISIT0+i)); pw->DeleteControl(EventType(EVENT_DT_GROUP0+i)); pw->DeleteControl(EventType(EVENT_DT_LABEL0+i)); m_bExist[i] = false; return true; }
void CAutoStation::UpdateInterface(float rTime) { Ui::CWindow* pw; Ui::CGauge* pg; CAuto::UpdateInterface(rTime); if ( m_time < m_lastUpdateTime+0.1f ) return; m_lastUpdateTime = m_time; if ( !m_object->GetSelect() ) return; pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == 0 ) return; pg = static_cast< Ui::CGauge* >(pw->SearchControl(EVENT_OBJECT_GENERGY)); if ( pg != 0 ) { pg->SetLevel(m_object->GetEnergy()); } }
void CAutoRadar::UpdateInterface() { Ui::CWindow* pw; Ui::CGauge* pg; float level; if ( !m_object->GetSelect() ) return; CAuto::UpdateInterface(); pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == 0 ) return; pg = static_cast< Ui::CGauge* >(pw->SearchControl(EVENT_OBJECT_GRADAR)); if ( pg != 0 ) { level = static_cast< float >(m_totalDetect*(1.0f/8.0f)); if ( level > 1.0f ) level = 1.0f; pg->SetLevel(level); } }
void CDisplayInfo::UpdateIndexButton() { Ui::CWindow* pw; Ui::CButton* button; Ui::CGroup* group; Ui::CEdit* edit; Math::Point pos, dim; char* filename; static int table[SATCOM_MAX] = { 0, // SATCOM_HUSTON 1, // SATCOM_SAT -1, // SATCOM_OBJECT 2, // SATCOM_LOADING 3, // SATCOM_PROG 4, // SATCOM_SOLUCE }; pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_HUSTON)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_HUSTON); filename = m_main->GetDisplayInfoName(SATCOM_HUSTON); button->SetState(STATE_VISIBLE, filename[0]!=0); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_SAT)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SAT); filename = m_main->GetDisplayInfoName(SATCOM_SAT); button->SetState(STATE_VISIBLE, filename[0]!=0); } //? button = (CButton*)pw->SearchControl(EVENT_SATCOM_OBJECT); //? if ( button != 0 ) //? { //? button->SetState(STATE_CHECK, m_index==SATCOM_OBJECT); //? filename = m_main->GetDisplayInfoName(SATCOM_OBJECT); //? button->SetState(STATE_VISIBLE, filename[0]!=0); //? } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_LOADING)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_LOADING); filename = m_main->GetDisplayInfoName(SATCOM_LOADING); button->SetState(STATE_VISIBLE, filename[0]!=0); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_PROG)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_PROG); filename = m_main->GetDisplayInfoName(SATCOM_PROG); button->SetState(STATE_VISIBLE, filename[0]!=0); } button = static_cast<Ui::CButton*>(pw->SearchControl(EVENT_SATCOM_SOLUCE)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SOLUCE); filename = m_main->GetDisplayInfoName(SATCOM_SOLUCE); button->SetState(STATE_VISIBLE, filename[0]!=0 && m_bSoluce); } group = static_cast<Ui::CGroup*>(pw->SearchControl(EVENT_LABEL1)); if ( group != 0 ) { if ( m_index == -1 ) { group->ClearState(STATE_VISIBLE); } else { group->SetState(STATE_VISIBLE); pos.x = (50.0f+10.0f+48.0f-3.0f)/640.0f; pos.y = (30.0f+10.0f+24.0f+10.0f+324.0f-48.0f-1.0f)/480.0f; pos.y -= (48.0f+4.0f)/480.0f*table[m_index]; dim.x = 15.0f/640.0f; dim.y = 48.0f/480.0f; group->SetPos(pos); group->SetDim(dim); } } #if 0 button = (CButton*)pw->SearchControl(EVENT_HYPER_COPY); if ( button != 0 ) { button->SetState(STATE_VISIBLE, m_index==SATCOM_LOADING); } #endif edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { //? edit->SetHiliteCap(m_index==SATCOM_LOADING); edit->SetHighlightCap(true); } UpdateCopyButton(); }
void CDisplayText::DisplayText(const char *text, Math::Vector goal, float height, float dist, float time, TextType type) { CObject* toto; CMotion* motion; Ui::CWindow* pw; Ui::CButton* button; Ui::CGroup* group; Ui::CLabel* label; Math::Point pos, ppos, dim; Sound sound; float hLine, hBox; int nLine, icon, i; if ( !m_bEnable ) return; pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2)); if ( pw == 0 ) { pos.x = 0.0f; pos.y = 0.0f; dim.x = 0.0f; dim.y = 0.0f; pw = m_interface->CreateWindows(pos, dim, 10, EVENT_WINDOW2); } hBox = 0.045f; hLine = m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, FONTSIZE); nLine = 0; for ( i=0 ; i<MAXDTLINE ; i++ ) { group = static_cast<CGroup*>(pw->SearchControl(EventType(EVENT_DT_GROUP0+i))); if ( group == 0 ) break; nLine ++; } if ( nLine == MAXDTLINE ) { ClearLastText(); nLine --; } pos.x = 0.10f; pos.y = 0.92f-hBox-hBox*nLine; dim.x = 0.80f; dim.y = hBox; icon = 1; // yellow if ( type == TT_ERROR ) icon = 9; // red if ( type == TT_WARNING ) icon = 10; // blue if ( type == TT_INFO ) icon = 8; // green if ( type == TT_MESSAGE ) icon = 11; // yellow pw->CreateGroup(pos, dim, icon, EventType(EVENT_DT_GROUP0+nLine)); pw->SetTrashEvent(false); ppos = pos; ppos.y -= hLine/2.0f; label = pw->CreateLabel(ppos, dim, -1, EventType(EVENT_DT_LABEL0+nLine), text); if ( label != 0 ) { label->SetFontSize(FONTSIZE); } dim.x = dim.y*0.75f; pos.x -= dim.x; button = pw->CreateButton(pos, dim, 14, EventType(EVENT_DT_VISIT0+nLine)); if ( goal.x == 0.0f && goal.y == 0.0f && goal.z == 0.0f ) { button->ClearState(STATE_ENABLE); } m_bExist[nLine] = true; m_visitGoal[nLine] = goal; m_visitDist[nLine] = dist; m_visitHeight[nLine] = height; m_time[nLine] = time*m_delayFactor; toto = SearchToto(); if ( toto != 0 ) { motion = toto->GetMotion(); if ( motion != 0 ) { if ( type == TT_ERROR ) { motion->SetAction(MT_ERROR, 4.0f); } if ( type == TT_WARNING ) { motion->SetAction(MT_WARNING, 4.0f); } if ( type == TT_INFO ) { motion->SetAction(MT_INFO, 4.0f); } if ( type == TT_MESSAGE ) { motion->SetAction(MT_MESSAGE, 4.0f); } } } if ( m_bHide ) { HideText(m_bHide); // hide all } else { sound = SOUND_CLICK; if ( type == TT_ERROR ) sound = SOUND_ERROR; if ( type == TT_WARNING ) sound = SOUND_WARNING; if ( type == TT_INFO ) sound = SOUND_INFO; if ( type == TT_MESSAGE ) sound = SOUND_MESSAGE; if ( sound != SOUND_CLICK ) { m_sound->Play(sound); } } }
bool CDisplayInfo::EventProcess(const Event &event) { Ui::CWindow* pw; Ui::CEdit* edit; Ui::CSlider* slider; CMotionToto* toto; if ( event.type == EVENT_FRAME ) { EventFrame(event); HyperUpdate(); } if ( event.type == EVENT_MOUSE_MOVE ) { if ( m_toto != 0 ) { toto = static_cast<CMotionToto*>(m_toto->GetMotion()); if ( toto != 0 ) { toto->SetMousePos(event.mousePos); } } } pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { if ( event.type == pw->GetEventTypeClose() ) { Event newEvent = event; newEvent.type = EVENT_OBJECT_INFOOK; m_event->AddEvent(newEvent); } if ( event.type == EVENT_SATCOM_HUSTON ) { ChangeIndexButton(SATCOM_HUSTON); } if ( event.type == EVENT_SATCOM_SAT ) { ChangeIndexButton(SATCOM_SAT); } //? if ( event.event == EVENT_SATCOM_OBJECT ) //? { //? ChangeIndexButton(SATCOM_OBJECT); //? } if ( event.type == EVENT_SATCOM_LOADING ) { ChangeIndexButton(SATCOM_LOADING); } if ( event.type == EVENT_SATCOM_PROG ) { ChangeIndexButton(SATCOM_PROG); } if ( event.type == EVENT_SATCOM_SOLUCE ) { ChangeIndexButton(SATCOM_SOLUCE); } if ( event.type == EVENT_HYPER_HOME || event.type == EVENT_HYPER_PREV || event.type == EVENT_HYPER_NEXT ) { edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { edit->HyperGo(event.type); HyperUpdate(); } } if ( event.type == EVENT_HYPER_SIZE1 ) // size 1? { m_main->SetFontSize(9.0f); slider = static_cast<Ui::CSlider*>(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/15.0f); ViewDisplayInfo(); } if ( event.type == EVENT_HYPER_SIZE2 ) // size 2? { m_main->SetFontSize(14.0f); slider = static_cast<Ui::CSlider*>(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/15.0f); ViewDisplayInfo(); } if ( event.type == EVENT_HYPER_SIZE3 ) // size 3? { m_main->SetFontSize(19.0f); slider = static_cast<Ui::CSlider*>(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/15.0f); ViewDisplayInfo(); } if ( event.type == EVENT_HYPER_SIZE4 ) // size 4? { m_main->SetFontSize(24.0f); slider = static_cast<Ui::CSlider*>(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/15.0f); ViewDisplayInfo(); } if ( event.type == EVENT_STUDIO_SIZE ) // size? { slider = static_cast<Ui::CSlider*>(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider == 0 ) return false; m_main->SetFontSize(9.0f+slider->GetVisibleValue()*15.0f); ViewDisplayInfo(); } if ( event.type == EVENT_HYPER_COPY ) // copy ? { edit = static_cast<Ui::CEdit*>(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { edit->Copy(); } } if ( ( event.type == EVENT_MOUSE_BUTTON_DOWN && event.mouseButton.button == MOUSE_BUTTON_LEFT )|| ( event.type == EVENT_MOUSE_BUTTON_UP && event.mouseButton.button == MOUSE_BUTTON_LEFT )) { UpdateCopyButton(); } if ( event.type == EVENT_WINDOW4 ) // window moved? { m_infoNormalPos = m_infoActualPos = m_infoFinalPos = pw->GetPos(); m_infoNormalDim = m_infoActualDim = m_infoFinalDim = pw->GetDim(); AdjustDisplayInfo(m_infoActualPos, m_infoActualDim); } if ( event.type == pw->GetEventTypeReduce() ) { if ( m_bInfoMinimized ) { m_infoFinalPos = m_infoNormalPos; m_infoFinalDim = m_infoNormalDim; m_bInfoMinimized = false; m_bInfoMaximized = false; } else { m_infoFinalPos.x = 0.00f; m_infoFinalPos.y = -0.34f; m_infoFinalDim.x = 1.00f; m_infoFinalDim.y = 0.40f; m_bInfoMinimized = true; m_bInfoMaximized = false; } //? m_main->SetEditFull(m_bInfoMaximized); pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetMaximized(m_bInfoMaximized); pw->SetMinimized(m_bInfoMinimized); } } if ( event.type == pw->GetEventTypeFull() ) { if ( m_bInfoMaximized ) { m_infoFinalPos = m_infoNormalPos; m_infoFinalDim = m_infoNormalDim; m_bInfoMinimized = false; m_bInfoMaximized = false; } else { m_infoFinalPos.x = 0.00f; m_infoFinalPos.y = 0.00f; m_infoFinalDim.x = 1.00f; m_infoFinalDim.y = 1.00f; m_bInfoMinimized = false; m_bInfoMaximized = true; } //? m_main->SetEditFull(m_bInfoMaximized); pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetMaximized(m_bInfoMaximized); pw->SetMinimized(m_bInfoMinimized); } } } return true; }