Controlling GUI Menus Using Keyboard?

Started by Albert Boris, Mon 28/12/2020 11:07:30

Previous topic - Next topic

Albert Boris

How do you control the GUI menus using your keyboard, similarly to how you did in the early Sierra games in AGI or SCI?

Crimson Wizard

I don't know how Sierra did this in their games, could you elaborate please?

If it's about having some kind of cursor to move between options, you could e.g. create a separate button or even separate GUI to act like a cursor (separate GUI may be better, because then you could use it anywhere, unlike button that will only stay over one GUI), and then make that "cursor" move around using keyboard. Either react to single key presses in on_key_press, or continiously check IsKeyPressed in repeatedly_execute function. You may even make it snap to gui controls by calculating their center, for example.

I cannot say more without knowing what exactly you are trying to achieve.

eri0o

Hey @Albert Boris, I don't know if this is exactly what you want, but I have a module for using Keyboard Arrows.

Albert Boris

Yes! That's what I was looking for. Thanks!

SMF spam blocked by CleanTalk