Skip to content

Commit

Permalink
Fixes open vehicle menu short cut
Browse files Browse the repository at this point in the history
  • Loading branch information
schwiti6190 committed Dec 9, 2024
1 parent f3856db commit a8765db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/gui/CpInGameMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,35 @@ function CpInGameMenu.new(target, customMt, messageCenter, l10n, inputManager, c
self.messageCenter:subscribe(MessageType.GUI_CP_INGAME_OPEN, function (menu)
g_gui:showGui("CpInGameMenu")
self:changeScreen(CpInGameMenu)
self:updatePages()
-- local index = self.pagingElement:getPageMappingIndexByElement(self.page)
-- self.pageSelector:setState(pageAIIndex, true)
end, self)
self.messageCenter:subscribe(MessageType.GUI_CP_INGAME_OPEN_GLOBAL_SETTINGS, function (menu)
g_gui:showGui("CpInGameMenu")
self:changeScreen(CpInGameMenu)
self:updatePages()
local index = self.pagingElement:getPageMappingIndexByElement(self.pageGlobalSettings)
self.pageSelector:setState(index, true)
end, self)
self.messageCenter:subscribe(MessageType.GUI_CP_INGAME_OPEN_VEHICLE_SETTINGS, function (menu)
g_gui:showGui("CpInGameMenu")
self:changeScreen(CpInGameMenu)
self:updatePages()
local index = self.pagingElement:getPageMappingIndexByElement(self.pageVehicleSettings)
self.pageSelector:setState(index, true)
end, self)
self.messageCenter:subscribe(MessageType.GUI_CP_INGAME_OPEN_COURSE_GENERATOR, function (menu)
g_gui:showGui("CpInGameMenu")
self:changeScreen(CpInGameMenu)
self:updatePages()
local index = self.pagingElement:getPageMappingIndexByElement(self.pageCourseGenerator)
self.pageSelector:setState(index, true)
end, self)
self.messageCenter:subscribe(MessageType.GUI_CP_INGAME_OPEN_COURSE_MANAGER, function (menu)
g_gui:showGui("CpInGameMenu")
self:changeScreen(CpInGameMenu)
self:updatePages()
local index = self.pagingElement:getPageMappingIndexByElement(self.pageCourseManager)
self.pageSelector:setState(index, true)
end, self)
Expand Down

0 comments on commit a8765db

Please sign in to comment.