Skip to content

Commit

Permalink
Deactivated game saving while within a scenario for the Grand Strateg…
Browse files Browse the repository at this point in the history
…y mode
  • Loading branch information
Andrettin committed Jul 11, 2015
1 parent ffa40de commit e5092c4
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 37 deletions.
45 changes: 26 additions & 19 deletions scripts/menus/endscenario.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
function RunEndScenarioMenu()
local menu = WarGameMenu(panel(1))
local menu = WarGameMenu(panel(1))

menu:addLabel("End Mission", 128, 11)
local b = menu:addFullButton("~!Restart Mission", "r", 16, 40 + (36 * 0),
function()
if not (IsNetworkGame() or GrandStrategy) then
RunRestartConfirmMenu()
menu:addLabel("End Mission", 128, 11)
local b = menu:addFullButton("~!Restart Mission", "r", 16, 40 + (36 * 0),
function()
if not (IsNetworkGame() or GrandStrategy) then
RunRestartConfirmMenu()
end
end
end)
if (IsNetworkGame() or GrandStrategy) then
b:setEnabled(false)
end
-- menu:addFullButton("~!Resign", "r", 16, 40 + (36 * 1),
-- function() RunSurrenderConfirmMenu() end)
menu:addFullButton("~!Quit Mission", "q", 16, 40 + (36 * 1),
function() RunQuitToMenuConfirmMenu() end)
menu:addFullButton("E~!xit to Desktop", "x", 16, 40 + (36 * 2),
function() RunExitConfirmMenu() end)
menu:addFullButton("Previous Menu (~<Esc~>)", "escape", 16, 248,
function() menu:stop() end)
)
if (IsNetworkGame() or GrandStrategy) then
b:setEnabled(false)
end
-- menu:addFullButton("~!Resign", "r", 16, 40 + (36 * 1),
-- function() RunSurrenderConfirmMenu() end)
b = menu:addFullButton("~!Quit Mission", "q", 16, 40 + (36 * 1),
function() RunQuitToMenuConfirmMenu() end)
if (GrandStrategy) then
b:setEnabled(false)
end

menu:addFullButton("E~!xit to Desktop", "x", 16, 40 + (36 * 2),
function() RunExitConfirmMenu() end
)
menu:addFullButton("Previous Menu (~<Esc~>)", "escape", 16, 248,
function() menu:stop() end
)

menu:run(false)
menu:run(false)
end

function RunRestartConfirmMenu()
Expand Down
47 changes: 29 additions & 18 deletions scripts/menus/game.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,38 @@ end


function RunGameMenu()
local menu = WarGameMenu(panel(1))
local menu = WarGameMenu(panel(1))

menu:addLabel("Game Menu", 128, 11)
menu:addLabel("Game Menu", 128, 11)

menu:addFullButton("Options (~<F5~>)", "f5", 16, 40,
function()
menu:addFullButton("Options (~<F5~>)", "f5", 16, 40,
function()
RunGameOptionsMenu(menu)
end)
menu:addFullButton("Help (~<F1~>)", "f1", 16, 40 + 34*1,
function() RunHelpMenu() end)
menu:addFullButton("~!Objectives", "o", 16, 40 + 34*2,
function() RunObjectivesMenu() end)
menu:addFullButton("Save (~<F11~>)", "f11", 16, 40 + 34*3,
function() RunSaveMenu() end)
menu:addFullButton("Load (~<F12~>)", "f12", 16, 40 + 34*4,
function() RunGameLoadGameMenu() end)
menu:addFullButton("~!End Mission", "e", 16, 40 + 34*5,
function() RunEndScenarioMenu() end)
menu:addFullButton("Return to Game (~<Esc~>)", "escape", 16, 40 + 34*6,
function() menu:stop() end)

menu:run(false)
menu:addFullButton("Help (~<F1~>)", "f1", 16, 40 + 34*1,
function() RunHelpMenu() end)
menu:addFullButton("~!Objectives", "o", 16, 40 + 34*2,
function() RunObjectivesMenu() end)

local b = menu:addFullButton("Save (~<F11~>)", "f11", 16, 40 + 34*3,
function() RunSaveMenu() end
)
if (GrandStrategy) then
b:setEnabled(false)
end

b = menu:addFullButton("Load (~<F12~>)", "f12", 16, 40 + 34*4,
function() RunGameLoadGameMenu() end
)
if (GrandStrategy) then
b:setEnabled(false)
end

menu:addFullButton("~!End Mission", "e", 16, 40 + 34*5,
function() RunEndScenarioMenu() end)
menu:addFullButton("Return to Game (~<Esc~>)", "escape", 16, 40 + 34*6,
function() menu:stop() end)

menu:run(false)
end

Binary file modified wyrmsun.exe
Binary file not shown.

0 comments on commit e5092c4

Please sign in to comment.