Skip to content

Commit

Permalink
Moved course display to the background behind the course generator se…
Browse files Browse the repository at this point in the history
…ttings fixes #343
  • Loading branch information
schwiti6190 committed Jan 5, 2022
1 parent 23130fd commit 5b521d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/gui/CpAIFrameExtended.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ function CpInGameMenuAIFrameExtended:onAIFrameLoadMapFinished()
pageAI.currentHotspot = nil
end
g_currentMission.onToggleMenu = Utils.prependedFunction(g_currentMission.onToggleMenu,onOpenInGameMenu)

self.ingameMapBase.drawHotspotsOnly = Utils.appendedFunction(self.ingameMapBase.drawHotspotsOnly , CpInGameMenuAIFrameExtended.draw)
end
InGameMenuAIFrame.onLoadMapFinished = Utils.appendedFunction(InGameMenuAIFrame.onLoadMapFinished,CpInGameMenuAIFrameExtended.onAIFrameLoadMapFinished)

Expand Down Expand Up @@ -211,15 +213,13 @@ InGameMenuAIFrame.onStartGoToJob = Utils.appendedFunction(InGameMenuAIFrame.onSt

function CpInGameMenuAIFrameExtended:draw()
local CoursePlotAlwaysVisible = g_Courseplay.globalSettings:getSettings().showsAllActiveCourses:getValue()
local vehicle = InGameMenuMapUtil.getHotspotVehicle(self.currentHotspot)
local vehicle = InGameMenuMapUtil.getHotspotVehicle(self.selectedHotspot)
if CoursePlotAlwaysVisible then
local vehicles = CpCourseManager.getValidVehicles()
for i,v in pairs(vehicles) do
v:drawCpCoursePlot(self.ingameMapBase)
v:drawCpCoursePlot(self)
end
elseif vehicle and vehicle.drawCpCoursePlot then
vehicle:drawCpCoursePlot(self.ingameMapBase)
vehicle:drawCpCoursePlot(self)
end
end
InGameMenuAIFrame.draw = Utils.appendedFunction(InGameMenuAIFrame.draw, CpInGameMenuAIFrameExtended.draw)

0 comments on commit 5b521d8

Please sign in to comment.