[Gcblue-commits] gcb_wx/src/graphics tcPopupControl.cpp,1.16,1.17
Status: Alpha
Brought to you by:
ddcforge
From: Dewitt C. <ddc...@us...> - 2006-09-13 23:49:39
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv3651/src/graphics Modified Files: tcPopupControl.cpp Log Message: Index: tcPopupControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPopupControl.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcPopupControl.cpp 17 Aug 2006 01:28:04 -0000 1.16 --- tcPopupControl.cpp 13 Sep 2006 23:49:35 -0000 1.17 *************** *** 41,46 **** void tcPopupControl::Draw() { - static int drawCount = 0; - if (!mbActive) return; --- 41,44 ---- *************** *** 67,75 **** - void tcPopupControl::UpdateRegions() - { - - } - void tcPopupControl::InitMenu() --- 65,68 ---- *************** *** 123,126 **** --- 116,130 ---- } + void tcPopupControl::SetActive(bool abActive) + { + if (abActive == false) + { + if (mpMenu != 0) mpMenu->ClearSelected(); + if (mpPanel != 0) mpPanel->ClearSelected(); + } + + tc3DWindow::SetActive(abActive); + } + void tcPopupControl::SetBaseRenderBin(int n) { *************** *** 201,212 **** return true; } SetActive(true); wxWindow::Raise(); mpointUpperLeft = point; ! // MoveWindow(point.x,point.y - (mpMenu->GetSize()-1)*mnItemHeight); // adjust mrectWindow to new popup menu location MoveWindow(point.x, point.y); - mbActive = true; SetMenu(); ! UpdateRegions(); return true; } --- 205,219 ---- return true; } + + drawCount = -1; // so draw occurs next frame + SetActive(true); wxWindow::Raise(); mpointUpperLeft = point; ! mpointMouse = point; ! MoveWindow(point.x, point.y); SetMenu(); ! return true; } *************** *** 321,325 **** const wxPoint& pos, const wxSize& size, const wxString& name) : ! tc3DWindow(parent, pos, size, name) { mpointUpperLeft.x = 250; --- 328,333 ---- const wxPoint& pos, const wxSize& size, const wxString& name) : ! tc3DWindow(parent, pos, size, name), ! drawCount(0) { mpointUpperLeft.x = 250; |