#28 Need to also save when using hotkeys.

Open
opened 3 years ago by ayyzee · 1 comments
ayyzee commented 3 years ago

When changing a setting in the setting screen, the settings, are retained. But when changing them through hotkeys like [CTRL] + [F], they are not loaded back in the next session.

How do you save from another module?

in engine.py line 202 - 232

#      [CTRL]                             [+]
    if 65507 in game.current["keys"] and 65451 in game.current["keys"]:
        game.settings["pixels"] += 1
        #save_settings(game) <---
        game.current["keys"] = [] # Wiping the press

#      [CTRL]                             [-]
    if 65507 in game.current["keys"] and 65453 in game.current["keys"] and game.settings["pixels"] >1:
        game.settings["pixels"] -= 1
        #save_settings(game) <---
        game.current["keys"] = [] # Wiping the press

Can't use this save_settings(game) from this module.

When changing a setting in the setting screen, the settings, are retained. But when changing them through hotkeys like [CTRL] + [F], they are not loaded back in the next session. How do you save from another module? in `engine.py` line 202 - 232 ```python # [CTRL] [+] if 65507 in game.current["keys"] and 65451 in game.current["keys"]: game.settings["pixels"] += 1 #save_settings(game) <--- game.current["keys"] = [] # Wiping the press # [CTRL] [-] if 65507 in game.current["keys"] and 65453 in game.current["keys"] and game.settings["pixels"] >1: game.settings["pixels"] -= 1 #save_settings(game) <--- game.current["keys"] = [] # Wiping the press ``` Can't use this `save_settings(game)` from this module.

In settings there is a saver function. Look it up. You just need to run it I guess.

In settings there is a saver function. Look it up. You just need to run it I guess.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.