Skip to content

Commit fae9252

Browse files
authored
Merge pull request #6333 from sam52796/Hyperdrive_UI_and_sound
Hyperdrive UI and sound
2 parents 6d74787 + ab11e81 commit fae9252

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

data/lang/core/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,11 @@
601601
},
602602
"HYPERSPACE_ARRIVAL_CLOUD": {
603603
"description": "",
604-
"message": "Hyperspace arrival cloud"
604+
"message": "Arrival"
605605
},
606606
"HYPERSPACE_ARRIVAL_CLOUD_REMNANT": {
607607
"description": "",
608-
"message": "Hyperspace arrival cloud remnant"
608+
"message": "Arrival (Remnant)"
609609
},
610610
"HYPERSPACE_CLOUDS_DISPLAY_MODE": {
611611
"description": "Label for hyperspace cloud display modes.",
@@ -629,7 +629,7 @@
629629
},
630630
"HYPERSPACE_DEPARTURE_CLOUD": {
631631
"description": "",
632-
"message": "Hyperspace departure cloud"
632+
"message": "Departure"
633633
},
634634
"HYPERSPACE_JUMP_ABORT": {
635635
"description": "Mouse over text for hyperdrive button on ship control panel",

data/pigui/views/map-sector-view.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,12 +830,29 @@ local function drawEdgeButtons()
830830

831831
end
832832

833+
local function hasActiveExclusiveLeftModule()
834+
for _, module in ipairs(leftSidebar.modules) do
835+
if module.exclusive and module.active and not module.closing then
836+
return true
837+
end
838+
end
839+
return false
840+
end
841+
833842
ui.registerModule("game", { id = 'map-sector-view', draw = function()
834843
player = Game.player
835844
if Game.CurrentView() == "SectorView" then
836845

837846
if shouldRefresh then
838847
shouldRefresh = false
848+
849+
-- Always show system info when entering SectorView, if we can. This helps the player find the hyperspace routing.
850+
if not hasActiveExclusiveLeftModule() and not infoView.active then
851+
infoView.active = true
852+
infoView.closing = false
853+
infoView.alpha = nil
854+
end
855+
839856
leftSidebar:Refresh()
840857
rightSidebar:Refresh()
841858
hyperJumpPlanner.updateRouteList()

src/Game.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,10 +929,12 @@ void Game::EmitPauseState(bool paused)
929929
// Notify UI that time is paused.
930930
LuaEvent::Queue("onGamePaused");
931931
LuaEvent::Queue(PiGui::GetEventQueue(), "onGamePaused");
932+
Sound::Pause(1);
932933
} else {
933934
// Notify the UI that time is running again.
934935
LuaEvent::Queue("onGameResumed");
935936
LuaEvent::Queue(PiGui::GetEventQueue(), "onGameResumed");
937+
Sound::Pause(0);
936938
}
937939
LuaEvent::Emit();
938940
}

0 commit comments

Comments
 (0)