Ticket #3018: saved-v2.diff

File saved-v2.diff, 2.6 KB (added by mimo, 9 years ago)

new version following leper's suggestion

  • binaries/data/config/default.cfg

     
    287287rotate.cw = RightBracket     ; Rotate building placement preview clockwise
    288288rotate.ccw = LeftBracket     ; Rotate building placement preview anticlockwise
    289289
     290[hotkey.session.savedgames]
     291delete = Delete               ; Delete the selected saved game asking confirmation
     292reallyDelete = "Shift+Delete" ; Delete the selected saved game without confirmation
     293
    290294[hotkey.session.queueunit]   ; > UNIT TRAINING
    2912951 = "Z"            ; add first unit type to queue
    2922962 = "X"            ; add second unit type to queue
  • binaries/data/mods/public/gui/savedgames/load.js

     
    110110    messageBox(500, 200, sprintf(translate("\"%(label)s\""), { label: gameLabel }) + "\n" + translate("Saved game will be permanently deleted, are you sure?"), translate("DELETE"), 0, btCaptions, btCode);
    111111}
    112112
     113function deleteGameWithoutConfirmation()
     114{
     115    var gameSelection = Engine.GetGUIObjectByName("gameSelection");
     116    var gameID = gameSelection.list_data[gameSelection.selected];
     117    reallyDeleteGame(gameID);
     118}
     119
    113120function reallyDeleteGame(gameID)
    114121{
    115122    if (!Engine.DeleteSavedGame(gameID))
  • binaries/data/mods/public/gui/savedgames/load.xml

     
    2626            <action on="Press">Engine.PopGuiPage();</action>
    2727        </object>
    2828
    29         <object name="deleteGameButton" type="button" size="33%+20 100%-60 66%-15 100%-32" style="StoneButton">
     29        <object name="deleteGameButton" type="button" size="33%+20 100%-60 66%-15 100%-32" style="StoneButton" hotkey="session.savedgames.delete">
    3030            <translatableAttribute id="caption">Delete</translatableAttribute>
    3131            <action on="Press">deleteGame();</action>
    3232        </object>
    3333
     34        <object hotkey="session.savedgames.reallyDelete">
     35            <action on="Press">deleteGameWithoutConfirmation();</action>
     36        </object>
     37
    3438        <object name="loadGameButton" type="button" style="StoneButton" size="66%-5 100%-60 100%-25 100%-32">
    3539            <translatableAttribute id="caption">Load</translatableAttribute>
    3640            <action on="Press">loadGame();</action>