FreeSpace Releases > Scripting Releases

Prompt Box: An easy way to get a user response

<< < (7/7)

m!m:
While debugging the cursor behavior in antipodes I noticed that this script never calls io.setCursorHidden(true) after closing the prompt box. You might want to fix that :P

Axem:
Actually because of the seemingly obtuse way that function worked (at least before), the variable it seemed to set would reset itself to true after the frame was done anyway. That's why io.setCursorHidden(false) had to be called every frame...

Is that going to change now?

m!m:
We discussed this on IRC but I'll add it here for completeness.

Previously the state was reset every frame because :v: probably didn't bother putting the right calls at the various places in the code so it was handled in one place which set the mouse to be hidden when we are currently in the game play state. The approach of this script worked because the mouse was always drawn at the end of the frame so it didn't matter that the state switched from shown to hidden and back. Now that the OS is drawing the cursor (at least in antipodes) this leads to some complications because the point at which the cursor is drawn isn't determined by FSO anymore.

The solution for this particular problem is to just add a io.setCursorHidden(true) call when the PromptBox is closed. That will still be compatible with current builds and will also work with future antipodes builds.

Axem:
I just made a large update to the Prompt Box. It now uses the same style used in JAD2.2 and WoD (using images instead of hud gauges) and as well, has the addition of SCRIPTED SEXPS. If you've used the prompt box in your campaign before, you'll know how much work it was to set up. Turn on all these hud gauges, set how many responses to do etc etc etc.

But now it's all just ONE SCRIPTED SEXP. JUST ONE. A MAZ ING.

You don't even need to keep track of questions through sexp variables, you just define a reference when calling it, and check to that same reference later!



(Note: nightly after Jan 19 2018 is needed!)

See original post for deets.

Navigation

[0] Message Index

[*] Previous page

Go to full version