#28 Need to also save when using hotkeys.

Открыто
3 лет назад открыта ayyzee · комментариев: 1
ayyzee прокомментировал 3 лет назад

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.
Jeison Yehuda Amihud (Blender Dumbass) прокомментировал 3 лет назад
Соавтор

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.
Войдите, чтобы присоединиться к обсуждению.
Нет этапа
Нет ответственного
2 участников
Загрузка...
Отмена
Сохранить
Пока нет содержимого.