From 574c07e388dfd902b6565bc4a5ac9b915c73074e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Sat, 18 Aug 2012 22:56:42 +0200 Subject: Further improvements in UI porting --- src/ui/displayinfo.cpp | 413 +++++++++++++++++++++++++------------------------ 1 file changed, 209 insertions(+), 204 deletions(-) (limited to 'src/ui/displayinfo.cpp') diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index 39a4a14..bbd3740 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -17,21 +18,22 @@ // displayinfo.cpp -#include -#include -#include +//#include +//#include +//#include -#include "common/struct.h" -#include "old/d3dengine.h" -#include "old/d3dmath.h" +//#include "common/struct.h" +//#include "old/d3dengine.h" +//#include "old/d3dmath.h" +#include "graphics/engine/engine.h" #include "common/language.h" #include "common/event.h" #include "common/misc.h" #include "common/iman.h" #include "common/restext.h" -#include "old/math3d.h" +//#include "old/math3d.h" #include "object/robotmain.h" -#include "old/camera.h" +//#include "old/camera.h" #include "object/object.h" #include "object/motion/motion.h" #include "object/motion/motiontoto.h" @@ -41,29 +43,31 @@ #include "ui/edit.h" #include "ui/group.h" #include "ui/window.h" -#include "old/particule.h" -#include "old/light.h" -#include "old/text.h" +//#include "old/particule.h" +#include "graphics/engine/particle.h" +//#include "old/light.h" +//#include "old/text.h" #include "script/cbottoken.h" #include "ui/displayinfo.h" - +namespace Ui { // Object's constructor. -CDisplayInfo::CDisplayInfo(CInstanceManager* iMan) +//CDisplayInfo::CDisplayInfo(CInstanceManager* iMan) +CDisplayInfo::CDisplayInfo() { - m_iMan = iMan; + m_iMan = CInstanceManager::GetInstancePointer(); m_iMan->AddInstance(CLASS_STUDIO, this); - m_engine = (CD3DEngine*)m_iMan->SearchInstance(CLASS_ENGINE); - m_event = (CEvent*)m_iMan->SearchInstance(CLASS_EVENT); - m_interface = (CInterface*)m_iMan->SearchInstance(CLASS_INTERFACE); - m_main = (CRobotMain*)m_iMan->SearchInstance(CLASS_MAIN); - m_camera = (CCamera*)m_iMan->SearchInstance(CLASS_CAMERA); - m_particule = (CParticule*)m_iMan->SearchInstance(CLASS_PARTICULE); - m_light = (CLight*)m_iMan->SearchInstance(CLASS_LIGHT); + m_engine = static_cast (m_iMan->SearchInstance(CLASS_ENGINE)); + m_event = static_cast (m_iMan->SearchInstance(CLASS_EVENT)); + m_interface = static_cast (m_iMan->SearchInstance(CLASS_INTERFACE)); + m_main = static_cast (m_iMan->SearchInstance(CLASS_MAIN)); + m_camera = static_cast (m_iMan->SearchInstance(CLASS_CAMERA)); + m_particle = static_cast (m_iMan->SearchInstance(CLASS_PARTICULE)); + m_light = static_cast (m_iMan->SearchInstance(CLASS_LIGHT)); m_bInfoMaximized = true; m_bInfoMinimized = false; @@ -87,22 +91,22 @@ CDisplayInfo::~CDisplayInfo() bool CDisplayInfo::EventProcess(const Event &event) { - CWindow* pw; - CEdit* edit; - CSlider* slider; + Ui::CWindow* pw; + Ui::CEdit* edit; + Ui::CSlider* slider; CMotionToto* toto; - if ( event.event == EVENT_FRAME ) + if ( event.type == EVENT_FRAME ) { EventFrame(event); HyperUpdate(); } - if ( event.event == EVENT_MOUSEMOVE ) + if ( event.type == EVENT_MOUSE_MOVE ) { if ( m_toto != 0 ) { - toto = (CMotionToto*)m_toto->RetMotion(); + toto = static_cast(m_toto->GetMotion()); if ( toto != 0 ) { toto->SetMousePos(event.pos); @@ -110,21 +114,21 @@ bool CDisplayInfo::EventProcess(const Event &event) } } - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { - if ( event.event == pw->RetEventMsgClose() ) + if ( event.type == pw->GetEventTypeClose() ) { Event newEvent = event; - newEvent.event = EVENT_OBJECT_INFOOK; + newEvent.type = EVENT_OBJECT_INFOOK; m_event->AddEvent(newEvent); } - if ( event.event == EVENT_SATCOM_HUSTON ) + if ( event.type == EVENT_SATCOM_HUSTON ) { ChangeIndexButton(SATCOM_HUSTON); } - if ( event.event == EVENT_SATCOM_SAT ) + if ( event.type == EVENT_SATCOM_SAT ) { ChangeIndexButton(SATCOM_SAT); } @@ -132,90 +136,90 @@ bool CDisplayInfo::EventProcess(const Event &event) //? { //? ChangeIndexButton(SATCOM_OBJECT); //? } - if ( event.event == EVENT_SATCOM_LOADING ) + if ( event.type == EVENT_SATCOM_LOADING ) { ChangeIndexButton(SATCOM_LOADING); } - if ( event.event == EVENT_SATCOM_PROG ) + if ( event.type == EVENT_SATCOM_PROG ) { ChangeIndexButton(SATCOM_PROG); } - if ( event.event == EVENT_SATCOM_SOLUCE ) + if ( event.type == EVENT_SATCOM_SOLUCE ) { ChangeIndexButton(SATCOM_SOLUCE); } - if ( event.event == EVENT_HYPER_HOME || - event.event == EVENT_HYPER_PREV || - event.event == EVENT_HYPER_NEXT ) + if ( event.type == EVENT_HYPER_HOME || + event.type == EVENT_HYPER_PREV || + event.type == EVENT_HYPER_NEXT ) { - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { - edit->HyperGo(event.event); + edit->HyperGo(event.type); HyperUpdate(); } } - if ( event.event == EVENT_HYPER_SIZE1 ) // size 1? + if ( event.type == EVENT_HYPER_SIZE1 ) // size 1? { m_main->SetFontSize(9.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_SIZE2 ) // size 2? + if ( event.type == EVENT_HYPER_SIZE2 ) // size 2? { m_main->SetFontSize(10.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_SIZE3 ) // size 3? + if ( event.type == EVENT_HYPER_SIZE3 ) // size 3? { m_main->SetFontSize(12.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_SIZE4 ) // size 4? + if ( event.type == EVENT_HYPER_SIZE4 ) // size 4? { m_main->SetFontSize(15.0f); - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); - if ( slider != 0 ) slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); + if ( slider != 0 ) slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_STUDIO_SIZE ) // size? + if ( event.type == EVENT_STUDIO_SIZE ) // size? { - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider == 0 ) return false; - m_main->SetFontSize(9.0f+slider->RetVisibleValue()*6.0f); + m_main->SetFontSize(9.0f+slider->GetVisibleValue()*6.0f); ViewDisplayInfo(); } - if ( event.event == EVENT_HYPER_COPY ) // copy ? + if ( event.type == EVENT_HYPER_COPY ) // copy ? { - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { edit->Copy(); } } - if ( event.event == EVENT_LBUTTONDOWN || - event.event == EVENT_LBUTTONUP ) + if ( ( event.type == EVENT_MOUSE_BUTTON_DOWN && event.mouseButton.button == 1 )|| + ( event.type == EVENT_MOUSE_BUTTON_UP && event.mouseButton.button == 1 )) { UpdateCopyButton(); } - if ( event.event == EVENT_WINDOW4 ) // window moved? + if ( event.type == EVENT_WINDOW4 ) // window moved? { - m_infoNormalPos = m_infoActualPos = m_infoFinalPos = pw->RetPos(); - m_infoNormalDim = m_infoActualDim = m_infoFinalDim = pw->RetDim(); + m_infoNormalPos = m_infoActualPos = m_infoFinalPos = pw->GetPos(); + m_infoNormalDim = m_infoActualDim = m_infoFinalDim = pw->GetDim(); AdjustDisplayInfo(m_infoActualPos, m_infoActualDim); } - if ( event.event == pw->RetEventMsgReduce() ) + if ( event.type == pw->GetEventTypeReduce() ) { if ( m_bInfoMinimized ) { @@ -241,7 +245,7 @@ bool CDisplayInfo::EventProcess(const Event &event) pw->SetMinimized(m_bInfoMinimized); } } - if ( event.event == pw->RetEventMsgFull() ) + if ( event.type == pw->GetEventTypeFull() ) { if ( m_bInfoMaximized ) { @@ -260,7 +264,7 @@ bool CDisplayInfo::EventProcess(const Event &event) m_bInfoMaximized = true; } //? m_main->SetEditFull(m_bInfoMaximized); - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetMaximized(m_bInfoMaximized); @@ -299,31 +303,31 @@ bool CDisplayInfo::EventFrame(const Event &event) void CDisplayInfo::HyperUpdate() { - CWindow* pw; - CEdit* edit; - CButton* button; - bool bEnable; + Ui::CWindow* pw; + Ui::CEdit* edit; + Ui::CButton* button; + bool bEnable; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; - button = (CButton*)pw->SearchControl(EVENT_HYPER_HOME); + button = static_cast(pw->SearchControl(EVENT_HYPER_HOME)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_HOME); button->SetState(STATE_ENABLE, bEnable); } - button = (CButton*)pw->SearchControl(EVENT_HYPER_PREV); + button = static_cast(pw->SearchControl(EVENT_HYPER_PREV)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_PREV); button->SetState(STATE_ENABLE, bEnable); } - button = (CButton*)pw->SearchControl(EVENT_HYPER_NEXT); + button = static_cast(pw->SearchControl(EVENT_HYPER_NEXT)); if ( button != 0 ) { bEnable = edit->HyperTest(EVENT_HYPER_NEXT); @@ -336,12 +340,12 @@ void CDisplayInfo::HyperUpdate() void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) { - D3DLIGHT7 light; + Gfx::CLight light; Math::Point pos, dim; - CWindow* pw; - CEdit* edit; - CButton* button; - CSlider* slider; + Ui::CWindow* pw; + Ui::CEdit* edit; + Ui::CButton* button; + Ui::CSlider* slider; CMotionToto* toto; m_index = index; @@ -349,10 +353,10 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) //? CreateObjectsFile(); - m_bEditLock = m_main->RetEditLock(); + m_bEditLock = m_main->GetEditLock(); if ( m_bEditLock ) // edition running program? { - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW3); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW3)); if ( pw != 0 ) { pw->ClearState(STATE_ENABLE); // CStudio inactive @@ -361,10 +365,10 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) m_main->SetEditLock(true, false); m_main->SetEditFull(false); - m_bInitPause = m_engine->RetPause(); + m_bInitPause = m_engine->GetPause(); m_engine->SetPause(true); - m_infoCamera = m_camera->RetType(); - m_camera->SetType(CAMERA_INFO); + m_infoCamera = m_camera->GetType(); + m_camera->SetType(Gfx::CAM_TYPE_INFO); pos = m_infoActualPos = m_infoFinalPos; dim = m_infoActualDim = m_infoFinalDim; @@ -383,7 +387,7 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) edit->SetState(STATE_SHADOW); edit->SetMultiFont(true); edit->SetMaxChar(10000); - edit->SetFontType(FONT_COLOBOT); + edit->SetFontType(Gfx::FONT_COLOBOT); edit->SetSoluceMode(bSoluce); edit->ReadText(filename); edit->HyperHome(filename); @@ -447,20 +451,20 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) m_engine->SetDrawWorld(false); // doesn't draw anything in the interface m_engine->SetDrawFront(true); // toto draws on the interface - m_particule->SetFrameUpdate(SH_WORLD, false); // particles break into world + m_particle->SetFrameUpdate(Gfx::SH_WORLD, false); // particles break into world m_toto = SearchToto(); if ( m_toto != 0 ) { m_toto->SetDrawFront(true); - toto = (CMotionToto*)m_toto->RetMotion(); + toto = static_cast(m_toto->GetMotion()); if ( toto != 0 ) { toto->StartDisplayInfo(); } } - +// TODO ZeroMemory(&light, sizeof(light)); light.dltType = D3DLIGHT_DIRECTIONAL; light.dcvDiffuse.r = 1.0f; @@ -483,31 +487,31 @@ void CDisplayInfo::AdjustDisplayInfo(Math::Point wpos, Math::Point wdim) CGroup* group; Math::Point pos, dim; - wpos.x = 50.0f/640.0f; - wpos.y = 30.0f/480.0f; - wdim.x = 540.0f/640.0f; - wdim.y = 420.0f/480.0f; + wpos.x = 50.0f / 640.0f; + wpos.y = 30.0f / 480.0f; + wdim.x = 540.0f / 640.0f; + wdim.y = 420.0f / 480.0f; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetPos(wpos); pw->SetDim(wdim); - wdim = pw->RetDim(); + wdim = pw->GetDim(); } - pos.x = (50.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f+24.0f+10.0f+324.0f-48.0f)/480.0f; - dim.x = 48.0f/640.0f; - dim.y = 48.0f/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_HUSTON); + pos.x = (50.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 24.0f + 10.0f + 324.0f - 48.0f) / 480.0f; + dim.x = 48.0f / 640.0f; + dim.y = 48.0f / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_HUSTON)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SAT); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_SAT)); if ( button != 0 ) { button->SetPos(pos); @@ -520,136 +524,136 @@ void CDisplayInfo::AdjustDisplayInfo(Math::Point wpos, Math::Point wdim) //? button->SetPos(pos); //? button->SetDim(dim); //? } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_LOADING); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_LOADING)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_PROG); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_PROG)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.y -= (48.0f+4.0f)/480.0f; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SOLUCE); + pos.y -= (48.0f + 4.0f) / 480.0f; + button = static_cast(pw->SearchControl(EVENT_SATCOM_SOLUCE)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x = (50.0f+10.0f+5.0f)/640.0f; - pos.y = (30.0f+10.0f+4.0f)/480.0f; - dim.x = (48.0f-10.0f)/640.0f; - dim.y = 24.0f/480.0f; - button = (CButton*)pw->SearchControl(EVENT_OBJECT_INFOOK); + pos.x = (50.0f + 10.0f + 5.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 4.0f) / 480.0f; + dim.x = (48.0f - 10.0f) / 640.0f; + dim.y = 24.0f / 480.0f; + button = static_cast(pw->SearchControl(EVENT_OBJECT_INFOOK)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x = (50.0f+10.0f+48.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f)/480.0f; - dim.x = 462.0f/640.0f; - dim.y = 358.0f/480.0f; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + pos.x = (50.0f + 10.0f + 48.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f) / 480.0f; + dim.x = 462.0f / 640.0f; + dim.y = 358.0f / 480.0f; + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { edit->SetPos(pos); edit->SetDim(dim); } - pos.x = (50.0f+10.0f+48.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f+358.0f+10.0f)/480.0f; - dim.x = 32.0f/640.0f; - dim.y = 32.0f/480.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_PREV); + pos.x = (50.0f + 10.0f + 48.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 358.0f + 10.0f) / 480.0f; + dim.x = 32.0f / 640.0f; + dim.y = 32.0f / 480.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_PREV)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_NEXT); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_NEXT)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_HOME); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_HOME)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 50.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE1); + pos.x += 50.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE1)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE2); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE2)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE3); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE3)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_SIZE4); + pos.x += 35.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_SIZE4)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x += 35.0f/640.0f; - dim.x = 18.0f/640.0f; - slider = (CSlider*)pw->SearchControl(EVENT_STUDIO_SIZE); + pos.x += 35.0f / 640.0f; + dim.x = 18.0f / 640.0f; + slider = static_cast(pw->SearchControl(EVENT_STUDIO_SIZE)); if ( slider != 0 ) { slider->SetPos(pos); slider->SetDim(dim); } - pos.x += 50.0f/640.0f; - dim.x = 32.0f/640.0f; - button = (CButton*)pw->SearchControl(EVENT_HYPER_COPY); + pos.x += 50.0f / 640.0f; + dim.x = 32.0f / 640.0f; + button = static_cast(pw->SearchControl(EVENT_HYPER_COPY)); if ( button != 0 ) { button->SetPos(pos); button->SetDim(dim); } - pos.x = (50.0f+10.0f)/640.0f; - pos.y = (30.0f+10.0f+24.0f+10.0f+324.0f+6.0f)/480.0f; - dim.x = 48.0f/640.0f; - dim.y = 40.0f/480.0f; - group = (CGroup*)pw->SearchControl(EVENT_LABEL2); // symbol SatCom + pos.x = (50.0f + 10.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 24.0f + 10.0f + 324.0f + 6.0f) / 480.0f; + dim.x = 48.0f / 640.0f; + dim.y = 40.0f / 480.0f; + group = static_cast(pw->SearchControl(EVENT_LABEL2)); // symbol SatCom if ( group != 0 ) { group->SetPos(pos); group->SetDim(dim); } - pos.x = (50.0f+10.0f+14.0f)/640.0f; - pos.y = (30.0f+10.0f+6.0f)/480.0f; - dim.x = 20.0f/640.0f; - dim.y = 20.0f/480.0f; - group = (CGroup*)pw->SearchControl(EVENT_LABEL3); // symbol stand-by + pos.x = (50.0f + 10.0f + 14.0f) / 640.0f; + pos.y = (30.0f + 10.0f + 6.0f) / 480.0f; + dim.x = 20.0f / 640.0f; + dim.y = 20.0f / 480.0f; + group = static_cast(pw->SearchControl(EVENT_LABEL3)); // symbol stand-by if ( group != 0 ) { group->SetPos(pos); @@ -661,26 +665,26 @@ void CDisplayInfo::AdjustDisplayInfo(Math::Point wpos, Math::Point wdim) void CDisplayInfo::ChangeIndexButton(int index) { - CWindow* pw; - CEdit* edit; + Ui::CWindow* pw; + Ui::CEdit* edit; char* filename; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; if ( m_index != -1 ) { - m_main->SetDisplayInfoPosition(m_index, RetPosition()); + m_main->SetDisplayInfoPosition(m_index, GetPosition()); } m_index = index; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { - filename = m_main->RetDisplayInfoName(m_index); + filename = m_main->GetDisplayInfoName(m_index); edit->ReadText(filename); edit->HyperHome(filename); - SetPosition(m_main->RetDisplayInfoPosition(m_index)); + SetPosition(m_main->GetDisplayInfoPosition(m_index)); } UpdateIndexButton(); @@ -690,10 +694,10 @@ void CDisplayInfo::ChangeIndexButton(int index) void CDisplayInfo::UpdateIndexButton() { - CWindow* pw; - CButton* button; - CGroup* group; - CEdit* edit; + Ui::CWindow* pw; + Ui::CButton* button; + Ui::CGroup* group; + Ui::CEdit* edit; Math::Point pos, dim; char* filename; char* loading; @@ -708,10 +712,10 @@ void CDisplayInfo::UpdateIndexButton() 4, // SATCOM_SOLUCE }; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_HUSTON); + button = static_cast(pw->SearchControl(EVENT_SATCOM_HUSTON)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_HUSTON); @@ -719,7 +723,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, filename[0]!=0); } - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SAT); + button = static_cast(pw->SearchControl(EVENT_SATCOM_SAT)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SAT); @@ -736,7 +740,7 @@ void CDisplayInfo::UpdateIndexButton() //? } loading = 0; - button = (CButton*)pw->SearchControl(EVENT_SATCOM_LOADING); + button = static_cast(pw->SearchControl(EVENT_SATCOM_LOADING)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_LOADING); @@ -744,7 +748,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, loading[0]!=0); } - button = (CButton*)pw->SearchControl(EVENT_SATCOM_PROG); + button = static_cast(pw->SearchControl(EVENT_SATCOM_PROG)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_PROG); @@ -752,7 +756,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, filename[0]!=0 && (m_index==SATCOM_LOADING||m_index==SATCOM_PROG||(loading!=0&&loading[0]==0))); } - button = (CButton*)pw->SearchControl(EVENT_SATCOM_SOLUCE); + button = static_cast(pw->SearchControl(EVENT_SATCOM_SOLUCE)); if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SOLUCE); @@ -760,7 +764,7 @@ void CDisplayInfo::UpdateIndexButton() button->SetState(STATE_VISIBLE, filename[0]!=0 && m_bSoluce); } - group = (CGroup*)pw->SearchControl(EVENT_LABEL1); + group = static_cast(pw->SearchControl(EVENT_LABEL1)); if ( group != 0 ) { if ( m_index == -1 ) @@ -789,7 +793,7 @@ void CDisplayInfo::UpdateIndexButton() } #endif - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit != 0 ) { //? edit->SetHiliteCap(m_index==SATCOM_LOADING); @@ -803,20 +807,20 @@ void CDisplayInfo::UpdateIndexButton() void CDisplayInfo::UpdateCopyButton() { - CWindow* pw; - CButton* button; - CEdit* edit; + Ui::CWindow* pw; + Ui::CButton* button; + Ui::CEdit* edit; int c1, c2; //? if ( m_index != SATCOM_LOADING ) return; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - button = (CButton*)pw->SearchControl(EVENT_HYPER_COPY); + button = static_cast(pw->SearchControl(EVENT_HYPER_COPY)); if ( button == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; edit->GetCursor(c1, c2); @@ -828,10 +832,10 @@ void CDisplayInfo::UpdateCopyButton() void CDisplayInfo::StopDisplayInfo() { - CWindow* pw; + Ui::CWindow* pw; CMotionToto* toto; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; m_interface->DeleteControl(EVENT_WINDOW4); @@ -853,13 +857,13 @@ void CDisplayInfo::StopDisplayInfo() m_engine->SetDrawWorld(true); // draws all on the interface m_engine->SetDrawFront(false); // draws nothing on the interface - m_particule->SetFrameUpdate(SH_WORLD, true); - m_particule->FlushParticule(SH_FRONT); - m_particule->FlushParticule(SH_INTERFACE); + m_particle->SetFrameUpdate(Gfx::SH_WORLD, true); + m_particle->FlushParticule(Gfx::SH_FRONT); + m_particle->FlushParticule(Gfx::SH_INTERFACE); if ( m_toto != 0 ) { - toto = (CMotionToto*)m_toto->RetMotion(); + toto = (CMotionToto*)m_toto->GetMotion(); if ( toto != 0 ) { toto->StopDisplayInfo(); @@ -875,13 +879,13 @@ void CDisplayInfo::StopDisplayInfo() void CDisplayInfo::SetPosition(int pos) { - CWindow* pw; - CEdit* edit; + Ui::CWindow* pw; + Ui::CEdit* edit; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; edit->SetFirstLine(pos); @@ -889,18 +893,18 @@ void CDisplayInfo::SetPosition(int pos) // Returns the position. -int CDisplayInfo::RetPosition() +int CDisplayInfo::GetPosition() { - CWindow* pw; - CEdit* edit; + Ui::CWindow* pw; + Ui::CEdit* edit; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return 0; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return 0; - return edit->RetFirstLine(); + return edit->GetFirstLine(); } @@ -909,18 +913,18 @@ int CDisplayInfo::RetPosition() void CDisplayInfo::ViewDisplayInfo() { - CWindow* pw; - CEdit* edit; - POINT dim; + Ui::CWindow* pw; + Ui::CEdit* edit; + Math::Point dim; - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; - edit = (CEdit*)pw->SearchControl(EVENT_EDIT1); + edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; - dim = m_engine->RetDim(); - edit->SetFontSize(m_main->RetFontSize()/(dim.x/640.0f)); + dim = m_engine->GetDim(); + edit->SetFontSize(m_main->GetFontSize()/(dim.x / 640.0f)); } // Returns the object human. @@ -936,7 +940,7 @@ CObject* CDisplayInfo::SearchToto() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_TOTO ) { return pObj; @@ -995,7 +999,7 @@ void ObjectWrite(FILE* file, ObjectList list[], int i) strcat(line, res); strcat(line, "\\u "); - p = RetHelpFilename(list[i].type); + p = GetHelpFilename(list[i].type); if ( p[0] == 0 ) return; strcat(line, p+5); // skip "help\" p = strstr(line, ".txt"); @@ -1026,11 +1030,11 @@ void CDisplayInfo::CreateObjectsFile() pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); if ( pObj == 0 ) break; - if ( !pObj->RetActif() ) continue; - if ( !pObj->RetSelectable() ) continue; - if ( pObj->RetProxyActivate() ) continue; + if ( !pObj->GetActif() ) continue; + if ( !pObj->GetSelectable() ) continue; + if ( pObj->GetProxyActivate() ) continue; - type = pObj->RetType(); + type = pObj->GetType(); if ( type == OBJECT_NULL ) continue; if ( type == OBJECT_FIX ) continue; @@ -1217,3 +1221,4 @@ void CDisplayInfo::CreateObjectsFile() } +} -- cgit v1.2.3-1-g7c22 From 01cc0fbc49696a19a56dfdd8359d4bb77e868925 Mon Sep 17 00:00:00 2001 From: erihel Date: Tue, 11 Sep 2012 12:49:41 +0200 Subject: * latest changes * all files except studio, map and maindialog should compile * did some code cleanup --- src/ui/displayinfo.cpp | 89 +++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 48 deletions(-) (limited to 'src/ui/displayinfo.cpp') diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index bbd3740..2cba9e3 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -18,37 +18,32 @@ // displayinfo.cpp -//#include -//#include -//#include +#include "displayinfo.h" -//#include "common/struct.h" -//#include "old/d3dengine.h" -//#include "old/d3dmath.h" -#include "graphics/engine/engine.h" +#include "interface.h" +#include "button.h" +#include "slider.h" +#include "edit.h" +#include "group.h" +#include "window.h" + +#include "common/iman.h" #include "common/language.h" -#include "common/event.h" #include "common/misc.h" -#include "common/iman.h" #include "common/restext.h" -//#include "old/math3d.h" -#include "object/robotmain.h" -//#include "old/camera.h" + +#include "graphics/core/light.h" +#include "graphics/engine/engine.h" +#include "graphics/engine/lightman.h" +#include "graphics/engine/particle.h" + #include "object/object.h" +#include "object/robotmain.h" #include "object/motion/motion.h" #include "object/motion/motiontoto.h" -#include "ui/interface.h" -#include "ui/button.h" -#include "ui/slider.h" -#include "ui/edit.h" -#include "ui/group.h" -#include "ui/window.h" -//#include "old/particule.h" -#include "graphics/engine/particle.h" -//#include "old/light.h" -//#include "old/text.h" + #include "script/cbottoken.h" -#include "ui/displayinfo.h" + @@ -67,7 +62,7 @@ CDisplayInfo::CDisplayInfo() m_main = static_cast (m_iMan->SearchInstance(CLASS_MAIN)); m_camera = static_cast (m_iMan->SearchInstance(CLASS_CAMERA)); m_particle = static_cast (m_iMan->SearchInstance(CLASS_PARTICULE)); - m_light = static_cast (m_iMan->SearchInstance(CLASS_LIGHT)); + m_light = static_cast (m_iMan->SearchInstance(CLASS_LIGHT)); m_bInfoMaximized = true; m_bInfoMinimized = false; @@ -338,9 +333,9 @@ void CDisplayInfo::HyperUpdate() // Beginning of the display of information. -void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) +void CDisplayInfo::StartDisplayInfo(std::string filename, int index, bool bSoluce) { - Gfx::CLight light; + Gfx::Light light; Math::Point pos, dim; Ui::CWindow* pw; Ui::CEdit* edit; @@ -389,8 +384,8 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) edit->SetMaxChar(10000); edit->SetFontType(Gfx::FONT_COLOBOT); edit->SetSoluceMode(bSoluce); - edit->ReadText(filename); - edit->HyperHome(filename); + edit->ReadText(filename.c_str()); + edit->HyperHome(filename.c_str()); edit->SetEditCap(false); // just to see! edit->SetHiliteCap(false); edit->SetFocus(true); @@ -435,7 +430,7 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) button->SetState(STATE_SHADOW); slider = pw->CreateSlider(pos, dim, 0, EVENT_STUDIO_SIZE); slider->SetState(STATE_SHADOW); - slider->SetVisibleValue((m_main->RetFontSize()-9.0f)/6.0f); + slider->SetVisibleValue((m_main->GetFontSize()-9.0f)/6.0f); button = pw->CreateButton(pos, dim, 61, EVENT_HYPER_COPY); button->SetState(STATE_SHADOW); HyperUpdate(); @@ -464,16 +459,14 @@ void CDisplayInfo::StartDisplayInfo(char *filename, int index, bool bSoluce) toto->StartDisplayInfo(); } } -// TODO - ZeroMemory(&light, sizeof(light)); - light.dltType = D3DLIGHT_DIRECTIONAL; - light.dcvDiffuse.r = 1.0f; - light.dcvDiffuse.g = 1.0f; - light.dcvDiffuse.b = 1.0f; - light.dvDirection = D3DVECTOR(1.0f, 0.0f, 1.0f); + + light.type = Gfx::LIGHT_DIRECTIONAL; + light.diffuse = Gfx::Color(1.0f, 0.1f, 0.1f); + light.direction = Math::Vector(1.0f, 0.0f, 1.0f); + m_lightSuppl = m_light->CreateLight(); m_light->SetLight(m_lightSuppl, light); - m_light->SetLightExcluType(m_lightSuppl, TYPETERRAIN); + m_light->SetLightExcludeType(m_lightSuppl, Gfx::ENG_OBJTYPE_TERRAIN); } // Repositions all controls editing. @@ -719,7 +712,7 @@ void CDisplayInfo::UpdateIndexButton() if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_HUSTON); - filename = m_main->RetDisplayInfoName(SATCOM_HUSTON); + filename = m_main->GetDisplayInfoName(SATCOM_HUSTON); button->SetState(STATE_VISIBLE, filename[0]!=0); } @@ -727,7 +720,7 @@ void CDisplayInfo::UpdateIndexButton() if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SAT); - filename = m_main->RetDisplayInfoName(SATCOM_SAT); + filename = m_main->GetDisplayInfoName(SATCOM_SAT); button->SetState(STATE_VISIBLE, filename[0]!=0); } @@ -735,7 +728,7 @@ void CDisplayInfo::UpdateIndexButton() //? if ( button != 0 ) //? { //? button->SetState(STATE_CHECK, m_index==SATCOM_OBJECT); -//? filename = m_main->RetDisplayInfoName(SATCOM_OBJECT); +//? filename = m_main->GetDisplayInfoName(SATCOM_OBJECT); //? button->SetState(STATE_VISIBLE, filename[0]!=0); //? } @@ -744,7 +737,7 @@ void CDisplayInfo::UpdateIndexButton() if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_LOADING); - loading = m_main->RetDisplayInfoName(SATCOM_LOADING); + loading = m_main->GetDisplayInfoName(SATCOM_LOADING); button->SetState(STATE_VISIBLE, loading[0]!=0); } @@ -752,7 +745,7 @@ void CDisplayInfo::UpdateIndexButton() if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_PROG); - filename = m_main->RetDisplayInfoName(SATCOM_PROG); + filename = m_main->GetDisplayInfoName(SATCOM_PROG); button->SetState(STATE_VISIBLE, filename[0]!=0 && (m_index==SATCOM_LOADING||m_index==SATCOM_PROG||(loading!=0&&loading[0]==0))); } @@ -760,7 +753,7 @@ void CDisplayInfo::UpdateIndexButton() if ( button != 0 ) { button->SetState(STATE_CHECK, m_index==SATCOM_SOLUCE); - filename = m_main->RetDisplayInfoName(SATCOM_SOLUCE); + filename = m_main->GetDisplayInfoName(SATCOM_SOLUCE); button->SetState(STATE_VISIBLE, filename[0]!=0 && m_bSoluce); } @@ -858,12 +851,12 @@ void CDisplayInfo::StopDisplayInfo() m_engine->SetDrawWorld(true); // draws all on the interface m_engine->SetDrawFront(false); // draws nothing on the interface m_particle->SetFrameUpdate(Gfx::SH_WORLD, true); - m_particle->FlushParticule(Gfx::SH_FRONT); - m_particle->FlushParticule(Gfx::SH_INTERFACE); + m_particle->FlushParticle(Gfx::SH_FRONT); + m_particle->FlushParticle(Gfx::SH_INTERFACE); if ( m_toto != 0 ) { - toto = (CMotionToto*)m_toto->GetMotion(); + toto = static_cast(m_toto->GetMotion()); if ( toto != 0 ) { toto->StopDisplayInfo(); @@ -915,7 +908,7 @@ void CDisplayInfo::ViewDisplayInfo() { Ui::CWindow* pw; Ui::CEdit* edit; - Math::Point dim; + Math::IntPoint dim; pw = static_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw == 0 ) return; @@ -923,7 +916,7 @@ void CDisplayInfo::ViewDisplayInfo() edit = static_cast(pw->SearchControl(EVENT_EDIT1)); if ( edit == 0 ) return; - dim = m_engine->GetDim(); + dim = m_engine->GetWindowSize(); edit->SetFontSize(m_main->GetFontSize()/(dim.x / 640.0f)); } -- cgit v1.2.3-1-g7c22 From a397922e8d53c6f7ff469d38e5139fd003c705b5 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Tue, 18 Sep 2012 00:01:00 +0200 Subject: warnings fight in progress. --- src/ui/displayinfo.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/displayinfo.cpp') diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index 43909b2..e6e95a2 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -232,7 +232,7 @@ bool CDisplayInfo::EventProcess(const Event &event) m_bInfoMaximized = false; } //? m_main->SetEditFull(m_bInfoMaximized); - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW4); + pw = dynamic_cast(m_interface->SearchControl(EVENT_WINDOW4)); if ( pw != 0 ) { pw->SetMaximized(m_bInfoMaximized); @@ -834,7 +834,7 @@ void CDisplayInfo::StopDisplayInfo() if ( m_bEditLock ) // editing running program? { - pw = (CWindow*)m_interface->SearchControl(EVENT_WINDOW3); + pw = dynamic_cast(m_interface->SearchControl(EVENT_WINDOW3)); if ( pw != 0 ) { pw->SetState(STATE_ENABLE); // CStudio operating @@ -929,7 +929,7 @@ CObject* CDisplayInfo::SearchToto() for ( i=0 ; i<1000000 ; i++ ) { - pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); + pObj = static_cast(m_iMan->SearchInstance(CLASS_OBJECT, i)); if ( pObj == 0 ) break; type = pObj->GetType(); @@ -991,7 +991,7 @@ void ObjectWrite(FILE* file, ObjectList list[], int i) strcat(line, res); strcat(line, "\\u "); - p = GetHelpFilename(list[i].type); + p = const_cast(GetHelpFilename(list[i].type)); if ( p[0] == 0 ) return; strcat(line, p+5); // skip "help\" p = strstr(line, ".txt"); @@ -1019,7 +1019,7 @@ void CDisplayInfo::CreateObjectsFile() bRadar = false; for ( i=0 ; i<1000000 ; i++ ) { - pObj = (CObject*)m_iMan->SearchInstance(CLASS_OBJECT, i); + pObj = static_cast(m_iMan->SearchInstance(CLASS_OBJECT, i)); if ( pObj == 0 ) break; if ( !pObj->GetActif() ) continue; -- cgit v1.2.3-1-g7c22 From 4a639cf543c15d45a37674d7eadaf09c23c2203d Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Wed, 19 Sep 2012 00:04:21 +0200 Subject: Fixed includes in ui. --- src/ui/displayinfo.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ui/displayinfo.cpp') diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index e6e95a2..c58f2f8 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -18,14 +18,14 @@ // displayinfo.cpp -#include "displayinfo.h" - -#include "interface.h" -#include "button.h" -#include "slider.h" -#include "edit.h" -#include "group.h" -#include "window.h" +#include "ui/displayinfo.h" + +#include "ui/interface.h" +#include "ui/button.h" +#include "ui/slider.h" +#include "ui/edit.h" +#include "ui/group.h" +#include "ui/window.h" #include "common/iman.h" #include "common/misc.h" -- cgit v1.2.3-1-g7c22 From 57d33d79ea570773d84ad81d4a61f50e079979ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Wed, 19 Sep 2012 22:17:28 +0200 Subject: Changes in Ui, solves part of #47 --- src/ui/displayinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/displayinfo.cpp') diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index c58f2f8..173c100 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -103,7 +103,7 @@ bool CDisplayInfo::EventProcess(const Event &event) toto = static_cast(m_toto->GetMotion()); if ( toto != 0 ) { - toto->SetMousePos(event.pos); + toto->SetMousePos(event.mouseMove.pos); } } } -- cgit v1.2.3-1-g7c22