-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
581 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
ScaleformUI_Lua/src/Menus/PauseMenus/LobbyMenu/Items/FakeBlip.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FakeBlip = setmetatable({}, FakeBlip) | ||
FakeBlip.__index = FakeBlip | ||
FakeBlip.__call = function() | ||
return "LobbyItem", "FakeBlip" | ||
end | ||
|
||
---@class FakeBlip | ||
---@field private New fun(sprite:number, position:vector3) | ||
---@field public Sprite number | ||
---@field public Position vector3 | ||
|
||
function FakeBlip.New(sprite, position) | ||
local _data = { | ||
Sprite = sprite, | ||
Position = position | ||
} | ||
return setmetatable(_data, FakeBlip) | ||
end |
18 changes: 18 additions & 0 deletions
18
ScaleformUI_Lua/src/Menus/PauseMenus/LobbyMenu/Items/MinimapRaceCheckpoint.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
MinimapRaceCheckpoint = setmetatable({}, MinimapRaceCheckpoint) | ||
MinimapRaceCheckpoint.__index = MinimapRaceCheckpoint | ||
MinimapRaceCheckpoint.__call = function() | ||
return "LobbyItem", "MinimapRaceCheckpoint" | ||
end | ||
|
||
---@class MinimapRaceCheckpoint | ||
---@field private New fun(sprite:number, position:vector3) | ||
---@field public Sprite number | ||
---@field public Position vector3 | ||
|
||
function MinimapRaceCheckpoint.New(sprite, position) | ||
local _data = { | ||
Sprite = sprite, | ||
Position = position | ||
} | ||
return setmetatable(_data, MinimapRaceCheckpoint) | ||
end |
53 changes: 53 additions & 0 deletions
53
ScaleformUI_Lua/src/Menus/PauseMenus/LobbyMenu/Items/MinimapRoute.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
MinimapRoute = setmetatable({}, MinimapRoute) | ||
MinimapRoute.__index = MinimapRoute | ||
MinimapRoute.__call = function() | ||
return "LobbyComponent", "MinimapRoute" | ||
end | ||
|
||
---@class MinimapRoute | ||
---@field private New fun() | ||
---@field public StartPoint MinimapRaceCheckpoint | ||
---@field public EndPoint MinimapRaceCheckpoint | ||
---@field public CheckPoints MinimapRaceCheckpoint[] | ||
---@field public RadarThickness number | ||
---@field public MapThickness number | ||
---@field public RouteColor HudColours | ||
---@field private SetupCustomRoute fun() | ||
|
||
function MinimapRoute.New() | ||
local _data = { | ||
StartPoint = MinimapRaceCheckpoint.New(0, vector3(0,0,0)), | ||
EndPoint = MinimapRaceCheckpoint.New(0, vector3(0,0,0)), | ||
CheckPoints = {}, | ||
RadarThickness = 18, | ||
MapThickness = 30, | ||
RouteColor = HudColours.HUD_COLOUR_FREEMODE | ||
} | ||
return setmetatable(_data, MinimapRoute) | ||
end | ||
|
||
function MinimapRoute:SetupCustomRoute() | ||
if self.StartPoint == nil or self.StartPoint.Position.x == 0 or self.StartPoint.Position.y == 0 or self.StartPoint.Position.z == 0 then | ||
return | ||
end | ||
|
||
StartGpsCustomRoute(self.RouteColor, true, true) | ||
|
||
RaceGalleryNextBlipSprite(self.StartPoint.Sprite) | ||
RaceGalleryAddBlip(self.StartPoint.Position.x, self.StartPoint.Position.y, self.StartPoint.Position.z) | ||
|
||
AddPointToGpsCustomRoute(self.StartPoint.Position.x, self.StartPoint.Position.y, self.StartPoint.Position.z) | ||
|
||
for i=1,#self.CheckPoints, 1 do | ||
local checkPoint = self.CheckPoints[i] | ||
RaceGalleryNextBlipSprite(checkPoint.Sprite) | ||
RaceGalleryAddBlip(checkPoint.Position.x, checkPoint.Position.y, checkPoint.Position.z) | ||
AddPointToGpsCustomRoute(checkPoint.Position.x, checkPoint.Position.y, checkPoint.Position.z) | ||
end | ||
|
||
RaceGalleryNextBlipSprite(self.EndPoint.Sprite) | ||
RaceGalleryAddBlip(self.EndPoint.Position.x, self.EndPoint.Position.y, self.EndPoint.Position.z) | ||
AddPointToGpsCustomRoute(self.EndPoint.Position.x, self.EndPoint.Position.y, self.EndPoint.Position.z) | ||
|
||
SetGpsCustomRouteRender(true, self.RadarThickness * 10, self.MapThickness * 10) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.