[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.148,1.149 tcObjectControl.cpp,1.48,1.49
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2006-01-02 15:41:04
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21272/src/sim Modified Files: Game.cpp tcObjectControl.cpp Log Message: Game windows use common window as parent Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** tcObjectControl.cpp 18 Dec 2005 04:10:33 -0000 1.48 --- tcObjectControl.cpp 2 Jan 2006 15:40:53 -0000 1.49 *************** *** 2038,2043 **** tcObjectControl::tcObjectControl(wxWindow *parent, const wxPoint& pos, const wxSize& size, ! const wxString& name) : ! tc3DWindow(parent, pos, size, name, 0), mnHookID(NULL_INDEX), mnPreviousHookID(NULL_INDEX), --- 2038,2044 ---- tcObjectControl::tcObjectControl(wxWindow *parent, const wxPoint& pos, const wxSize& size, ! const wxString& name, ! tc3DWindow* graphicsHost) : ! tc3DWindow(parent, pos, size, name, graphicsHost), mnHookID(NULL_INDEX), mnPreviousHookID(NULL_INDEX), Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** Game.cpp 26 Dec 2005 22:14:03 -0000 1.148 --- Game.cpp 2 Jan 2006 15:40:53 -0000 1.149 *************** *** 251,254 **** --- 251,255 ---- viewer->SetActive(false); worldMap->SetActive(false); + gameWindow->SetActive(false); briefingView->SetButtonCaption(ID_STARTVIEW, "Return"); *************** *** 514,517 **** --- 515,521 ---- tc3DWindow::Set3DViewer(viewer); + InitializeGameWindow(); + + /* test3DWindow = *************** *** 881,884 **** --- 885,904 ---- } + + void tcGame::InitializeGameWindow() + { + gameWindow = new tc3DWindow(glCanvas, wxPoint(0, 0), wxSize(mnWidth, mnHeight), + "GameWindow"); + gameWindow->SetBaseRenderBin(0); + + if (!gameWindow) + { + fprintf(stderr, "gameWindow init failed\n"); + throw "gameWindow init failed\n"; + } + } + + + /** * Initializes the Select Scenario View screen. *************** *** 906,911 **** mrectMap.right = mnWidth; //GetSystemMetrics(SM_CXFULLSCREEN); mrectMap.bottom = mnHeight - 0*200; //GetSystemMetrics(SM_CYFULLSCREEN); ! tacticalMap = new tcTacticalMapView(glCanvas, wxPoint(mrectMap.left,mrectMap.top), ! wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top)); tacticalMap->SetBaseRenderBin(10); tacticalMap->SetTextLeftMargin(200.0f); --- 926,932 ---- mrectMap.right = mnWidth; //GetSystemMetrics(SM_CXFULLSCREEN); mrectMap.bottom = mnHeight - 0*200; //GetSystemMetrics(SM_CYFULLSCREEN); ! ! tacticalMap = new tcTacticalMapView(gameWindow, wxPoint(mrectMap.left,mrectMap.top), ! wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top), gameWindow); tacticalMap->SetBaseRenderBin(10); tacticalMap->SetTextLeftMargin(200.0f); *************** *** 937,943 **** mrectWorldMap.top = mrectWorldMap.bottom - 129; ! worldMap = new tcWorldMapView(glCanvas, wxPoint(mrectWorldMap.left, mrectWorldMap.top), ! wxSize(mrectWorldMap.right - mrectWorldMap.left - 1, ! mrectWorldMap.bottom - mrectWorldMap.top - 1)); worldMap->SetBaseRenderBin(25); --- 958,964 ---- mrectWorldMap.top = mrectWorldMap.bottom - 129; ! worldMap = new tcWorldMapView(gameWindow, wxPoint(mrectWorldMap.left, mrectWorldMap.top), ! wxSize(mrectWorldMap.right - mrectWorldMap.left - 1, mrectWorldMap.bottom - mrectWorldMap.top - 1), ! gameWindow); worldMap->SetBaseRenderBin(25); *************** *** 970,974 **** wxPoint(mrectLowerLeft.left, mrectLowerLeft.top), wxSize(panelWidth, mrectLowerLeft.bottom - mrectLowerLeft.top), ! "xml/info_console.xml", "InfoConsole"); infoConsole->SetBaseRenderBin(30); infoConsole->LoadBackgroundImage("start_background.jpg"); --- 991,995 ---- wxPoint(mrectLowerLeft.left, mrectLowerLeft.top), wxSize(panelWidth, mrectLowerLeft.bottom - mrectLowerLeft.top), ! "xml/info_console.xml", "InfoConsole", gameWindow); infoConsole->SetBaseRenderBin(30); infoConsole->LoadBackgroundImage("start_background.jpg"); *************** *** 991,995 **** hookInfo = new tcHookInfo(glCanvas, wxPoint(mrectLowerLeft.right,mrectLowerLeft.top), ! wxSize(panelWidth, mrectLowerLeft.bottom - mrectLowerLeft.top)); hookInfo->SetBaseRenderBin(30); --- 1012,1018 ---- hookInfo = new tcHookInfo(glCanvas, wxPoint(mrectLowerLeft.right,mrectLowerLeft.top), ! wxSize(panelWidth, mrectLowerLeft.bottom - mrectLowerLeft.top), ! "HookInfo", ! gameWindow); hookInfo->SetBaseRenderBin(30); *************** *** 1009,1013 **** objectControl = new tcObjectControl(glCanvas, wxPoint(mrectLowerLeft.right+panelWidth, mrectLowerLeft.top), ! wxSize(mnWidth-2*panelWidth, 200)); //objectControl->SetBaseRenderBin(20); if (!objectControl) --- 1032,1037 ---- objectControl = new tcObjectControl(glCanvas, wxPoint(mrectLowerLeft.right+panelWidth, mrectLowerLeft.top), ! wxSize(mnWidth-2*panelWidth, 200), "ObjectControl", ! gameWindow); //objectControl->SetBaseRenderBin(20); if (!objectControl) *************** *** 1029,1033 **** mrectOOB.bottom = mnHeight-200; oobView = new tcOOBView(glCanvas, wxPoint(mrectOOB.left,mrectOOB.top), ! wxSize(mrectOOB.right-mrectOOB.left, mrectOOB.bottom-mrectOOB.top)); oobView->SetBaseRenderBin(20); oobView->MoveToTop(); --- 1053,1058 ---- mrectOOB.bottom = mnHeight-200; oobView = new tcOOBView(glCanvas, wxPoint(mrectOOB.left,mrectOOB.top), ! wxSize(mrectOOB.right-mrectOOB.left, mrectOOB.bottom-mrectOOB.top), ! "OrderOfBattle", gameWindow); oobView->SetBaseRenderBin(20); oobView->MoveToTop(); *************** *** 1072,1076 **** tcPopupMessage::SetParent(tacticalMap); tcLauncherPopup::SetParent(tacticalMap); ! tcContainerGui::SetParent(tacticalMap); tcTextEntryBox::SetParent(tacticalMap); --- 1097,1101 ---- tcPopupMessage::SetParent(tacticalMap); tcLauncherPopup::SetParent(tacticalMap); ! tcContainerGui::SetParent(gameWindow); tcTextEntryBox::SetParent(tacticalMap); *************** *** 1447,1450 **** --- 1472,1476 ---- chatBox->SetActive(false); briefingView->SetActive(false); + gameWindow->SetActive(false); } *************** *** 1617,1620 **** --- 1643,1647 ---- tcMessageInterface::Get()->SetPopupChatText(false); draggedIconDisplay->SetActive(false); + gameWindow->SetActive(false); } lastMode = meScreenMode; *************** *** 1627,1630 **** --- 1654,1658 ---- if (tacticalMapSize == TM_MEDIUM) SetTacticalMapSize(TM_LARGE); + gameWindow->SetActive(true); tacticalMap->SetActive(drawTacticalMap); worldMap->SetActive(drawTacticalMap); *************** *** 1634,1638 **** --- 1662,1669 ---- oobView->SetActive(drawEdgeWindows); viewer->SetActive(mb3DActive); + gameWindow->SetActive(true); + gameWindow->Draw(); + /* if (drawTacticalMap) { *************** *** 1647,1650 **** --- 1678,1683 ---- objectControl->Draw(); } + */ + if (popupControl->mbActive) popupControl->Draw(); if (chatBox->mbActive) *************** *** 1674,1677 **** --- 1707,1714 ---- worldMap->SetActive(drawTacticalMap); viewer->SetActive(mb3DActive); + gameWindow->SetActive(true); + + gameWindow->Draw(); + /* if (drawTacticalMap) { *************** *** 1679,1682 **** --- 1716,1720 ---- worldMap->Draw(); } + */ if (drawEdgeWindows) { *************** *** 2768,2777 **** tcGame::~tcGame() { - /* - if (pythonInterface) - { - delete pythonInterface; - } - */ messageConsole = 0; --- 2806,2809 ---- |