Pausing mid-procedure for mouse click?

Advanced game related topics
sshults
New User
New User
Posts: 2
Joined: Sun Jan 26, 2020 6:50 pm

Pausing mid-procedure for mouse click?

Post by sshults »

I'm creating a simple game using a windowed screen with a basic event loop.

I'd like to run a procedure that changes out backgrounds and sprites and occasionally prompts for on-screen user input (like clicking on a choice prompt) or to just click to advance past a certain dialogue screen.

Is there any way to do that in the middle of a procedure? To display the background and some sprites and then wait for the user to click on the screen before continue in the same procedure?
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Pausing mid-procedure for mouse click?

Post by IdeasVacuum »

... have the User Click a Message Requester.
Last edited by IdeasVacuum on Mon Jan 27, 2020 12:32 am, edited 1 time in total.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
sshults
New User
New User
Posts: 2
Joined: Sun Jan 26, 2020 6:50 pm

Re: Pausing mid-procedure for mouse click?

Post by sshults »

Yes, I know about the message requesters but I don't want a pop-up. For example, if there's a scene in the game with dialogue that's paused and waiting for them to click on the game screen to continue before the next dialogue line is shown.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Pausing mid-procedure for mouse click?

Post by IdeasVacuum »

Well, you would have to write an event that detects the Screen being clicked - but wouldn't be easier to have a button on the dialog?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Pausing mid-procedure for mouse click?

Post by IdeasVacuum »

... or a continue button on the Window (instead of the windowed screen).
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply