playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Lock The Mouse Buttons
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Lock The Mouse Buttons (Read 1487 times)
Rabagast
Hero Member
Posts: 683
Lock The Mouse Buttons
«
on:
April 10, 2017, 07:32:16 AM »
Hi!
Is it possible to lock the mouse button to prevent to send an event when I click outside the inputfield with the mouse button? To be more specific.
When the game is over, I can write my name to get a place on the highscore list, but if I click with the mouse button outside the inputfield, it submit the name. I don't want that. I want the cursor to be in the inputfield until I click enter. Is it a way to do that?
Logged
Check out our homepage.
http://www.walsberg.no
Or my personal game blog for news about my games.
http://retro-tetro.walsberg.no
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Lock The Mouse Buttons
«
Reply #1 on:
April 11, 2017, 01:39:09 AM »
Hi,
It's because you need to catch inputFields event differently, for this case, you need as you said it watch for the enter Key so when you get the InputField Event you ask if the enter key was pressed and if not you don't do anything.
Bye,
Jean
Logged
Rabagast
Hero Member
Posts: 683
Re: Lock The Mouse Buttons
«
Reply #2 on:
April 11, 2017, 03:41:31 AM »
Hi, Jean!
The problem is when I use "U Gui Input Field On Submit Event". It will also submit when I click with the mouse button outside the inputfield. I think, when I'm in the state where I can write my name, it's better to just use "Get Key Down" Or what do you think?
Logged
Check out our homepage.
http://www.walsberg.no
Or my personal game blog for news about my games.
http://retro-tetro.walsberg.no
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Lock The Mouse Buttons
«
Reply #3 on:
April 12, 2017, 02:39:05 AM »
Hi,
yes, OnSubmit works for both enter and esc ( which is really odd I give you that...)
yes you can catch the enter key being pressed, that's a good approach.
Bye,
Jean
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Lock The Mouse Buttons