[Gcblue-commits] gcb_wx/src/sim Game.cpp,1.71,1.72 tcGameView.cpp,1.8,1.9 tcMapView.cpp,1.21,1.22
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-04-03 20:36:54
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6167/src/sim Modified Files: Game.cpp tcGameView.cpp tcMapView.cpp Log Message: Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapView.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tcMapView.cpp 3 Apr 2004 15:39:31 -0000 1.21 --- tcMapView.cpp 3 Apr 2004 20:24:33 -0000 1.22 *************** *** 103,115 **** /* fprintf(stdout, "*** setting map view to L:%f R:%f T:%f B:%f\n", ! mrectCurrentView.left, mrectCurrentView.right, ! mrectCurrentView.top, mrectCurrentView.bottom); fprintf(stdout, " map window L:%d R:%d T:%d B:%d\n", ! mrectWindow.left, mrectWindow.right, mrectWindow.top, mrectWindow.bottom); tcPoint testPoint = GeoToScreen(mfGridBaseLon_rad, mfGridBaseLat_rad); fprintf(stdout, " base geo (%f,%f) screen(%f, %f)\n", ! mfGridBaseLon_rad,mfGridBaseLat_rad, ! testPoint.x, testPoint.y); ! */ } --- 103,115 ---- /* fprintf(stdout, "*** setting map view to L:%f R:%f T:%f B:%f\n", ! mrectCurrentView.left, mrectCurrentView.right, ! mrectCurrentView.top, mrectCurrentView.bottom); fprintf(stdout, " map window L:%d R:%d T:%d B:%d\n", ! mrectWindow.left, mrectWindow.right, mrectWindow.top, mrectWindow.bottom); tcPoint testPoint = GeoToScreen(mfGridBaseLon_rad, mfGridBaseLat_rad); fprintf(stdout, " base geo (%f,%f) screen(%f, %f)\n", ! mfGridBaseLon_rad,mfGridBaseLat_rad, ! testPoint.x, testPoint.y); ! */ } *************** *** 126,130 **** /***********************************************************************************/ ! tcPoint tcMapView::GeoToScreen(tcPoint pgeo) { tcPoint pscreen; pscreen.x = (pgeo.x - mfLonCenter)*mfScaleX_pelprad + mnXCenter; --- 126,131 ---- /***********************************************************************************/ ! tcPoint tcMapView::GeoToScreen(tcPoint pgeo) ! { tcPoint pscreen; pscreen.x = (pgeo.x - mfLonCenter)*mfScaleX_pelprad + mnXCenter; *************** *** 133,137 **** } /***********************************************************************************/ ! tcPoint tcMapView::GeoToScreen(float afLon, float afLat) { tcPoint pscreen; pscreen.x = (afLon - mfLonCenter)*mfScaleX_pelprad + mnXCenter; --- 134,139 ---- } /***********************************************************************************/ ! tcPoint tcMapView::GeoToScreen(float afLon, float afLat) ! { tcPoint pscreen; pscreen.x = (afLon - mfLonCenter)*mfScaleX_pelprad + mnXCenter; *************** *** 140,148 **** } /***********************************************************************************/ ! float tcMapView::GeoExtentToScreen(float afExtent_rad) { return afExtent_rad*mfScaleX_pelprad; } /***********************************************************************************/ ! tcPoint tcMapView::ScreenToGeo(wxPoint pscreen) { tcPoint pgeo; pgeo.x = ((float)pscreen.x - mnXCenter)*mfScaleX_radppel + mfLonCenter; --- 142,152 ---- } /***********************************************************************************/ ! float tcMapView::GeoExtentToScreen(float afExtent_rad) ! { return afExtent_rad*mfScaleX_pelprad; } /***********************************************************************************/ ! tcPoint tcMapView::ScreenToGeo(wxPoint pscreen) ! { tcPoint pgeo; pgeo.x = ((float)pscreen.x - mnXCenter)*mfScaleX_radppel + mfLonCenter; *************** *** 151,155 **** } /***********************************************************************************/ ! tcPoint tcMapView::ScreenToGeo(float x, float y) { tcPoint pgeo; pgeo.x = (x - mnXCenter)*mfScaleX_radppel + mfLonCenter; --- 155,160 ---- } /***********************************************************************************/ ! tcPoint tcMapView::ScreenToGeo(float x, float y) ! { tcPoint pgeo; pgeo.x = (x - mnXCenter)*mfScaleX_radppel + mfLonCenter; *************** *** 241,246 **** /* void tcMapView::SetWindow(RECT& r) { ! tcWindow::SetWindow(r); // call base class to set tcMapView's window ! terrainView->SetWindow(r); } */ --- 246,251 ---- /* void tcMapView::SetWindow(RECT& r) { ! tcWindow::SetWindow(r); // call base class to set tcMapView's window ! terrainView->SetWindow(r); } */ *************** *** 309,313 **** mpPen->SetColor(Color(0xFFFFFFFF)); ! int xLeft = min(buttonDownPoint.x, mpointMouse.x); int yTop = min(buttonDownPoint.y, mpointMouse.y); --- 314,318 ---- mpPen->SetColor(Color(0xFFFFFFFF)); ! int xLeft = min(buttonDownPoint.x, mpointMouse.x); int yTop = min(buttonDownPoint.y, mpointMouse.y); *************** *** 508,525 **** tcMapView::Thaw(); // unfreeze every Draw() call, works with Freeze() to stop resize flicker ! if (mnScrollState >= SCROLL_DELAY) { ScrollMap(mfScrollDirection); } else if (mnScrollState > 0) {mnScrollState++;} ! // done here to avoid artifacts from terrainview being out of sync with mapview terrainView->SetView(mrectCurrentView); - //terrainView->DrawTest(); - Erase(); ! // TODO: add terrain features ! // mpDDS_Offscreen->Blt(NULL,mpDDS_Terrain,NULL,DDBLT_WAIT,&sFX); ! if (!GetGraphics(pGraphics)) { ! //WriteToLog2("Failed to get Graphics in tcTacticalMapView::Draw()\n"); return 0; } --- 513,529 ---- tcMapView::Thaw(); // unfreeze every Draw() call, works with Freeze() to stop resize flicker ! if (mnScrollState >= SCROLL_DELAY) ! { ScrollMap(mfScrollDirection); } else if (mnScrollState > 0) {mnScrollState++;} ! ! // SetView called here to avoid artifacts from terrainview being out of sync with mapview terrainView->SetView(mrectCurrentView); ! Erase(); ! if (!GetGraphics(pGraphics)) ! { return 0; } *************** *** 576,580 **** pGraphics->DrawString(mzwchar, -1, mpFont, pointf, mpBrush); ! if ((mpOptions!=NULL)&&(mpOptions->mbShowMapDebug)) { tsTerrainViewParameters vp; terrainView->GetViewParameters(vp); --- 580,585 ---- pGraphics->DrawString(mzwchar, -1, mpFont, pointf, mpBrush); ! if ((mpOptions!=NULL)&&(mpOptions->mbShowMapDebug)) ! { tsTerrainViewParameters vp; terrainView->GetViewParameters(vp); *************** *** 587,597 **** } ! /**********************/ ! for(i=0;(i<(int)mnObjCount)&&(i<MAXMAPOBJ);i++) { ! if (maMapObj[i].mbExists) { ! //DrawSymbol(pGraphics,&maMapObj[i]); DrawSymbol2(pGraphics,&maMapObj[i]); if (meMapCmd != MC_NONE) { ! if ((maMapObj[i].mnID == mnHookID)&&(meMapCmd == MC_HEADING)&&(maMapObj[i].meSymbol != SYMBOL_SENSOR)) { DrawMapCmd(pGraphics,&maMapObj[i],meMapCmd); } --- 592,616 ---- } ! /*** Draw map command graphics ***/ ! long currentHook; ! if (GetHookCount()) ! { ! currentHook = GetHookID(); ! } ! else ! { ! currentHook = -1; ! } ! ! for(i=0;(i<(int)mnObjCount)&&(i<MAXMAPOBJ);i++) ! { ! if (maMapObj[i].mbExists) ! { DrawSymbol2(pGraphics,&maMapObj[i]); if (meMapCmd != MC_NONE) { ! if ((maMapObj[i].mnID == currentHook)&& ! (meMapCmd == MC_HEADING)&& ! (maMapObj[i].meSymbol != SYMBOL_SENSOR)) ! { DrawMapCmd(pGraphics,&maMapObj[i],meMapCmd); } *************** *** 600,604 **** } ! if ((meMapCmd != MC_NONE)&&(meMapCmd != MC_HEADING)) { DrawMapCmd(pGraphics,NULL,meMapCmd); } --- 619,624 ---- } ! if ((meMapCmd != MC_NONE)&&(meMapCmd != MC_HEADING)) ! { DrawMapCmd(pGraphics,NULL,meMapCmd); } *************** *** 646,650 **** } ! Graphics* tcTacticalMapView::GetGraphicsFromImage(Image* apImage) { Graphics *pGraphics = new Graphics(apImage); pGraphics->SetCompositingMode(CompositingModeSourceOver); // SourceCopy doesn't do blending --- 666,671 ---- } ! Graphics* tcTacticalMapView::GetGraphicsFromImage(Image* apImage) ! { Graphics *pGraphics = new Graphics(apImage); pGraphics->SetCompositingMode(CompositingModeSourceOver); // SourceCopy doesn't do blending *************** *** 655,658 **** --- 676,717 ---- } + /** + * @return number of hooked objects + */ + size_t tcTacticalMapView::GetHookCount() + { + return hookedId.size(); + } + + /** + * @return hook ID of hooked unit with index of idx, or -1 if invalid + */ + long tcTacticalMapView::GetHookID(size_t idx) + { + if (idx < GetHookCount()) + { + return hookedId[idx]; + } + else + { + return -1; + } + } + + /** + * Performs simple search for match by iterating through + * elements of hookedId vector. Could get slow for large sizes. + * @return true if id matches any elements in hookedId vector + */ + bool tcTacticalMapView::IsHooked(long id) + { + for(std::vector<long>::iterator iter = hookedId.begin() + ; iter != hookedId.end(); ++iter) + { + if ((*iter) == id) return true; + } + return false; + } + void tcTacticalMapView::DrawNTDSSurface(Graphics *apGraphics, teAffiliation affil) { float symbsize=15.0f; *************** *** 947,952 **** h = pMO->mfHeading; type = pMO->meSymbol; ! pMO->mbFocus = (pMO->mnID == mnHookID)&&(type != SYMBOL_SENSOR); ! if (pMO->mbFocus) { mfHookLat = pMO->mfLat; // move somewhere else and make this tighter mfHookLon = pMO->mfLon; --- 1006,1012 ---- h = pMO->mfHeading; type = pMO->meSymbol; ! pMO->mbFocus = (IsHooked(pMO->mnID))&&(type != SYMBOL_SENSOR); ! if (pMO->mbFocus) ! { mfHookLat = pMO->mfLat; // move somewhere else and make this tighter mfHookLon = pMO->mfLon; *************** *** 956,960 **** apGraphics->GetClipBounds(&rclipbounds); ! if (type == SYMBOL_SENSOR) { symbsize = 8.0f; vectsize = 10.0f; --- 1016,1021 ---- apGraphics->GetClipBounds(&rclipbounds); ! if (type == SYMBOL_SENSOR) ! { symbsize = 8.0f; vectsize = 10.0f; *************** *** 1129,1134 **** type = pMO->meSymbol; ! pMO->mbFocus = (pMO->mnID == mnHookID)&&(type != SYMBOL_SENSOR); ! if (pMO->mbFocus) { mfHookLat = pMO->mfLat; // move somewhere else and make this tighter mfHookLon = pMO->mfLon; --- 1190,1196 ---- type = pMO->meSymbol; ! pMO->mbFocus = (IsHooked(pMO->mnID))&&(type != SYMBOL_SENSOR); ! if (pMO->mbFocus) ! { mfHookLat = pMO->mfLat; // move somewhere else and make this tighter mfHookLon = pMO->mfLon; *************** *** 1297,1316 **** ! /***********************************************************************************/ ! int tcTacticalMapView::Hook(wxPoint pscreen) { long nMinID; nMinID = GetClosest(pscreen); ! if (nMinID != (long)mnHookID) { - mnHookID = nMinID; wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_NEWHOOK) ; command.SetEventObject(this); ! command.m_extraLong = mnHookID; AddPendingEvent(command); } ! return mnHookID; } --- 1359,1435 ---- ! /** ! * Single-unit hook. ! * Hooks a single object closest to pscreen ! */ ! long tcTacticalMapView::Hook(wxPoint pscreen) { long nMinID; + long currentHook; + + if (GetHookCount() == 1) + { + currentHook = GetHookID(); + } + else + { + currentHook = -1; + } nMinID = GetClosest(pscreen); ! if (nMinID != currentHook) { wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_NEWHOOK) ; command.SetEventObject(this); ! command.m_extraLong = nMinID; AddPendingEvent(command); } ! hookedId.clear(); ! if (nMinID != -1) ! { ! hookedId.push_back(nMinID); ! } ! return nMinID; ! } ! /** ! * Group hook. ! * Selects multiple friendly units. ! * If no units are selected, this clears the hookedId vector. ! */ ! void tcTacticalMapView::HookGroup(wxRect& region) ! { ! tcMapObj *pMO; ! tcPoint northWest, southEast; ! ! northWest = ScreenToGeo(region.GetLeft(), region.GetBottom()); ! southEast = ScreenToGeo(region.GetRight(), region.GetTop()); ! tcGeoRect geoRegion; ! geoRegion.Set(northWest.x, southEast.x, northWest.y, southEast.y); ! ! hookedId.clear(); ! ! // add all friendly units within region ! for(int i=0;i<MAXMAPOBJ;i++) ! { ! pMO = &maMapObj[i]; ! if ((pMO->mbExists)&& ! (geoRegion.ContainsPoint(pMO->mfLon, pMO->mfLat))) ! { ! if (pMO->meAffiliation == FRIENDLY) ! { ! hookedId.push_back(pMO->mnID); ! } ! } ! } ! ! // if single unit is hooked, post a single hook event ! if (GetHookCount()==1) ! { ! wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_NEWHOOK) ; ! command.SetEventObject(this); ! command.m_extraLong = GetHookID(); ! AddPendingEvent(command); ! } } *************** *** 1320,1328 **** long nMinID; ! if (mnHookID == NULL_INDEX) return -1; nMinID = GetClosest(pscreen); ! ! if ((nMinID != (long)mnHookID) && (nMinID != -1)) { wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_SECONDARYHOOK) ; --- 1439,1449 ---- long nMinID; ! if (GetHookCount()==0) return -1; ! ! long currentHook = GetHookID(); nMinID = GetClosest(pscreen); ! ! if ((nMinID != currentHook) && (nMinID != -1)) { wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_SECONDARYHOOK) ; *************** *** 1383,1387 **** dx = sinf(fDirection_rad)*dr; dy = cosf(fDirection_rad)*dr; ! tcPoint p; p.x = mrectCurrentView.XCenter() + dx; --- 1504,1508 ---- dx = sinf(fDirection_rad)*dr; dy = cosf(fDirection_rad)*dr; ! tcPoint p; p.x = mrectCurrentView.XCenter() + dx; *************** *** 1432,1487 **** if (mpCommandInterface == NULL) {return;} ! //TranslatePoint(point); ! switch (meMapCmd) { ! case MC_HEADING: ! meMapCmd = MC_NONE; ! p = ScreenToGeo(point); ! mfMapCmdHeading = atan2f(p.x-mfHookLon,p.y-mfHookLat); ! if (mbBypassPythonCallback) ! { ! mpCommandInterface->AddCommand(PC_CHANGEHEADING,mfMapCmdHeading,0); ! } ! else ! { ! mpCommandInterface->AddPythonCallback(mzMapCmdCallback,"Heading",callbackParam); ! } ! mbMapCmdActive = false; ! break; ! case MC_TARGET: ! mnID = GetClosest(mpointMouse); ! if ((mnID!=NULL_INDEX)&&(mnID!=(long)mnHookID)) ! { ! meMapCmd = MC_NONE; ! mbMapCmdActive = false; ! mnMapCmdTarget = mnID; ! if (mbBypassPythonCallback) ! { ! mpCommandInterface->AddCommand(PC_DESIGNATETARGET,0,mnID); ! } ! else ! { ! mpCommandInterface->AddPythonCallback(mzMapCmdCallback,"Target",callbackParam); ! } ! } ! else ! { ! } ! break; ! case MC_DATUM: ! meMapCmd = MC_NONE; ! mpointGeoDatum = ScreenToGeo(point); ! mbMapCmdActive = false; ! if (mbBypassPythonCallback) ! { ! mpCommandInterface->AddCommand(PC_DATUMSET,0,0); ! } ! else ! { ! mpCommandInterface->AddPythonCallback(mzMapCmdCallback,"Datum",callbackParam); ! } ! break; ! default: ! mbMapCmdActive = false; ! break; } } --- 1553,1609 ---- if (mpCommandInterface == NULL) {return;} ! ! switch (meMapCmd) ! { ! case MC_HEADING: ! meMapCmd = MC_NONE; ! p = ScreenToGeo(point); ! mfMapCmdHeading = atan2f(p.x-mfHookLon,p.y-mfHookLat); ! if (mbBypassPythonCallback) ! { ! mpCommandInterface->AddCommand(PC_CHANGEHEADING,mfMapCmdHeading,0); ! } ! else ! { ! mpCommandInterface->AddPythonCallback(mzMapCmdCallback,"Heading",callbackParam); ! } ! mbMapCmdActive = false; ! break; ! case MC_TARGET: ! mnID = GetClosest(mpointMouse); ! if ((mnID!=NULL_INDEX)&&(mnID!=GetHookID())) ! { ! meMapCmd = MC_NONE; ! mbMapCmdActive = false; ! mnMapCmdTarget = mnID; ! if (mbBypassPythonCallback) ! { ! mpCommandInterface->AddCommand(PC_DESIGNATETARGET,0,mnID); ! } ! else ! { ! mpCommandInterface->AddPythonCallback(mzMapCmdCallback,"Target",callbackParam); ! } ! } ! else ! { ! } ! break; ! case MC_DATUM: ! meMapCmd = MC_NONE; ! mpointGeoDatum = ScreenToGeo(point); ! mbMapCmdActive = false; ! if (mbBypassPythonCallback) ! { ! mpCommandInterface->AddCommand(PC_DATUMSET,0,0); ! } ! else ! { ! mpCommandInterface->AddPythonCallback(mzMapCmdCallback,"Datum",callbackParam); ! } ! break; ! default: ! mbMapCmdActive = false; ! break; } } *************** *** 1499,1505 **** bool isControlDown = event.ControlDown(); bool bFlagsSet = (isShiftDown || isControlDown); ! buttonDownPoint = event.GetPosition(); ! if ((mbMapCmdActive)&&(!bFlagsSet)) --- 1621,1627 ---- bool isControlDown = event.ControlDown(); bool bFlagsSet = (isShiftDown || isControlDown); ! buttonDownPoint = event.GetPosition(); ! if ((mbMapCmdActive)&&(!bFlagsSet)) *************** *** 1522,1526 **** } Hook(buttonDownPoint); ! if (mnHookID == -1) { isLButtonDown = true; --- 1644,1648 ---- } Hook(buttonDownPoint); ! if (GetHookCount()==0) { isLButtonDown = true; *************** *** 1536,1539 **** --- 1658,1667 ---- if (isLButtonDown) { + int xLeft = min(buttonDownPoint.x, mpointMouse.x); + int yTop = min(buttonDownPoint.y, mpointMouse.y); + int width = abs(mpointMouse.x - buttonDownPoint.x); + int height = abs(mpointMouse.y - buttonDownPoint.y); + HookGroup(wxRect(xLeft, yTop, width, height)); + isLButtonDown = false; } *************** *** 1564,1568 **** return; // old returned true } ! if ((mnHookID == NULL_INDEX)||(HookSecondary(point) == -1)) { tcWindow::SkipMouseEvent(event); --- 1692,1696 ---- return; // old returned true } ! if ((GetHookCount()==0)||(HookSecondary(point) == -1)) { tcWindow::SkipMouseEvent(event); *************** *** 1613,1617 **** wxPoint point = event.GetPosition(); int zDelta = event.GetWheelRotation(); ! if (zDelta > 0) { --- 1741,1745 ---- wxPoint point = event.GetPosition(); int zDelta = event.GetWheelRotation(); ! if (zDelta > 0) { *************** *** 1626,1629 **** --- 1754,1770 ---- } + /** + * If id != -1, sets hookedId to have one element equal to id, + * otherwise clears the hookedId vector + */ + void tcTacticalMapView::SetHookID(long id) + { + hookedId.clear(); + if (id != -1) + { + hookedId.push_back(id); + } + } + void tcTacticalMapView::UpdateNavPoints(vector<tcPoint> *mpPoints) { maNavPointGeo.clear(); *************** *** 1647,1652 **** /***********************************************************************************/ tcTacticalMapView::tcTacticalMapView(wxWindow *parent, ! const wxPoint& pos, const wxSize& size, ! const wxString& name) : tcMapView(parent, pos, size, name) --- 1788,1793 ---- /***********************************************************************************/ tcTacticalMapView::tcTacticalMapView(wxWindow *parent, ! const wxPoint& pos, const wxSize& size, ! const wxString& name) : tcMapView(parent, pos, size, name) *************** *** 1657,1661 **** wxMessageBox("terrainView init failed\n"); } ! tcWindow::MoveToTop(); // so that color elevation map is underneath --- 1798,1802 ---- wxMessageBox("terrainView init failed\n"); } ! tcWindow::MoveToTop(); // so that color elevation map is underneath *************** *** 1665,1669 **** mnGameMode = GAMEMODE_NORMAL; mbShowTrackID = true; ! mnHookID = NULL_INDEX; mbMapCmdActive = false; meMapCmd = MC_NONE; --- 1806,1810 ---- mnGameMode = GAMEMODE_NORMAL; mbShowTrackID = true; ! hookedId.clear(); mbMapCmdActive = false; meMapCmd = MC_NONE; *************** *** 1877,1882 **** /***********************************************************************************/ tcWorldMapView::tcWorldMapView(wxWindow *parent, ! const wxPoint& pos, const wxSize& size, ! const wxString& name) : tcMapView(parent, pos, size, name) { --- 2018,2023 ---- /***********************************************************************************/ tcWorldMapView::tcWorldMapView(wxWindow *parent, ! const wxPoint& pos, const wxSize& size, ! const wxString& name) : tcMapView(parent, pos, size, name) { Index: tcGameView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcGameView.cpp 16 Feb 2004 01:06:23 -0000 1.8 --- tcGameView.cpp 3 Apr 2004 20:24:33 -0000 1.9 *************** *** 115,123 **** void tcGameView::UpdateHookInfo(void) { ! mnHookID = mpMapView->mnHookID; ! if (mnHookID == NULL_INDEX) { mpHookedObj = NULL; } ! else { mpHookedObj = mpSS->GetObject(mnHookID); } --- 115,126 ---- void tcGameView::UpdateHookInfo(void) { ! // returns -1 if no hooks, first hooked unit otherwise ! mnHookID = mpMapView->GetHookID(); ! if (mnHookID == NULL_INDEX) ! { mpHookedObj = NULL; } ! else ! { mpHookedObj = mpSS->GetObject(mnHookID); } Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** Game.cpp 25 Mar 2004 01:33:39 -0000 1.71 --- Game.cpp 3 Apr 2004 20:24:33 -0000 1.72 *************** *** 1596,1601 **** } ! // pass key to python if object is hooked ! if (tacticalMap->mnHookID != NULL_INDEX) { pythonInterface->ProcessHotKey(nChar, 0); --- 1596,1601 ---- } ! // pass key to python if exactly one object is hooked (no group support yet) ! if (tacticalMap->GetHookCount() == 1) { pythonInterface->ProcessHotKey(nChar, 0); |