I'm creating an external desktop application (if you're curious: using Wails) to serve as an Helper to play a 2D RPG Game.
The idea is to have some checkboxes and inputs for some numbers, each ui input element will activate/deactivate certain functionalities that helps in a different aspect of the game, for example:
- Checkbox that activates (in some way I don't know how it works best in go) a loop that sends a specific keyboard button press from time to time
- A Checkbox paired with an InputText that sets a number that is checked every second in the game and takes a screenshot whenever it reaches it
- etc...
My question is, as someone 1 day old to the language, how is the best way to go about creating such loops that I will be putting varying functionalities inside that can be "activated"/"deactivated" based on user input?
I understand that I'll have user input boolean and number states that I'll use to control the loops, but I don't know much about how Go works with loops like that.