Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(radar): add manual zoom mode to scanner #5958

Merged
merged 8 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/fonts/UIFont.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"svgFile": "icons/icons.svg",
"rangeBase": "0xF000",
"grid": [ 16, 20 ]
"grid": [ 16, 21 ]
}
]
}
2 changes: 1 addition & 1 deletion data/fonts/UIHeadingFont.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"svgFile": "icons/icons.svg",
"rangeBase": "0xF000",
"grid": [ 16, 20 ]
"grid": [ 16, 21 ]
}
]
}
2 changes: 1 addition & 1 deletion data/fonts/UIIconFont.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"svgFile": "icons/icons.svg",
"rangeBase": "0xF000",
"grid": [ 16, 20 ]
"grid": [ 16, 21 ]
}
]
}
2 changes: 1 addition & 1 deletion data/fonts/UIMonoFont.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"svgFile": "icons/icons.svg",
"rangeBase": "0xF000",
"grid": [ 16, 20 ]
"grid": [ 16, 21 ]
}
]
}
24,904 changes: 12,435 additions & 12,469 deletions data/icons/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions data/lang/input-core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,22 @@
"description": "Descriptive name for the PrimaryFire action.",
"message": "Primary Fire"
},
"BIND_RADAR_TOGGLE_MODE": {
"description": "Descriptive name for the RadarToggle action.",
"message": "Toggle Radar Display Mode"
},
"BIND_RADAR_ZOOM_IN": {
"description": "Descriptive name for the RadarZoomIn action.",
"message": "Manual Zoom Radar In"
},
"BIND_RADAR_ZOOM_OUT": {
"description": "Descriptive name for the RadarZoomOut action.",
"message": "Manual Zoom Radar Out"
},
"BIND_RADAR_ZOOM_RESET": {
"description": "Descriptive name for the RadarZoomReset action.",
"message": "Reset Radar Zoom"
},
"BIND_RADIAL_HORIZONTAL_SELECTION": {
"description": "Input axis name to select in the radial menu.",
"message": "Radial Menu Left/Right"
Expand Down Expand Up @@ -163,6 +179,10 @@
"description": "Descriptive name for the SpeedControl axis.",
"message": "Set Target Speed"
},
"BIND_TARGET_RADIAL": {
"description": "Descriptive name for opening the TargetRadial popup.",
"message": "Open Target Radial Menu"
},
"BIND_TARGET_OBJECT": {
"description": "Descriptive name for the TargetObject action.",
"message": "Target Object"
Expand Down Expand Up @@ -231,6 +251,10 @@
"description": "Header for the GeneralViewControls input group.",
"message": "General View Controls"
},
"GROUP_RADAR_CONTROL": {
"description": "Group label for radar-related inputs",
"message": "Radar Control"
},
"GROUP_LANDING_CONTROL": {
"description": "Group label for landing-related inputs",
"message": "Landing Control"
Expand Down Expand Up @@ -318,6 +342,10 @@
"description": "Header for the ShipControls input page.",
"message": "Ship - Controls"
},
"PAGE_SHIP_HUD": {
"description": "Header for the ShipHUD input page.",
"message": "Ship - HUD"
},
"PAGE_SHIP_VIEW": {
"description": "Header for the ShipView input page.",
"message": "Ship - View"
Expand Down
12 changes: 12 additions & 0 deletions data/lang/ui-core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,18 @@
"description": "Tooltip: Current distance of the radar.",
"message": "Active radar distance"
},
"HUD_RADAR_ZOOM_MODE_AUTOMATIC": {
"description": "Tooltip: Current radar zoom mode.",
"message": "Automatic zoom"
},
"HUD_RADAR_ZOOM_MODE_MANUAL": {
"description": "Tooltip: Current radar zoom mode.",
"message": "Manual zoom"
},
"HUD_RADAR_TOGGLE_MODE": {
"description": "Tooltip: Toggle radar mode.",
"message": "Toggle radar between 2D and 3D modes"
},
"HUD_REQUEST_TIME_ACCEL": {
"description": "Tooltip: Request time acceleration {time}",
"message": "Request time acceleration: {time}"
Expand Down
2 changes: 1 addition & 1 deletion data/pigui/libs/icons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local function encode_icon(idx)
end

local iconsX = 16
local iconsY = 20
local iconsY = 21

local icons_texture_small = pigui:LoadTextureFromSVG(pigui.DataDirPath({"icons", "icons.svg"}), iconsX * 24, iconsY * 24)
local icons_texture_med = pigui:LoadTextureFromSVG(pigui.DataDirPath({"icons", "icons.svg"}), iconsX * 32, iconsY * 32)
Expand Down
3 changes: 2 additions & 1 deletion data/pigui/modules/autopilot-window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ local function displayAutoPilotWindow()
local current_view = Game.CurrentView()
local window_h = mainButtonSize.y + smallButtonSize.y + ui.getWindowPadding().y * 2
local shift = smallButtonSize.y
local window_posx = ui.screenWidth/2 + ui.reticuleCircleRadius / 4 * 3
-- X starting position is the edge of the scanner display.
local window_posx = ui.screenWidth/2 + ui.reticuleCircleRadius
local window_posy = ui.screenHeight - window_h
ui.setNextWindowPos(Vector2(window_posx, window_posy) , "Always")
ui.window("AutoPilot", {"NoTitleBar", "NoResize", "NoFocusOnAppearing", "NoBringToFrontOnFocus", "NoSavedSettings", "AlwaysAutoResize"},
Expand Down
Loading