generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Tablets

Previous Thread :: Next Thread 
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 07:19 PM
Hello. I am working with GUIs but need to find out if a player is using a tablet so I change the GUIs to better suit it (Change all the mouse over buttons to double tap ones)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 07:24 PM
For now I will just make it double-tap

But if anyone knows can they please tell me? It would make it so much better :P
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
04 Apr 2013 07:31 PM
if game:GetService("UserInputService").TouchEnabled then
print("Player is on touch device.")
end
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 07:32 PM
Thanks! That's just what I needed!
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 07:34 PM
Although would that work with people with touchscreen PCs?

Would it be better to use:

if not game:GetService("UserInputService").MouseEnabled then
--Your player cannot afford a mouse and stuff
end
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
04 Apr 2013 07:35 PM
I am not sure if that would work.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
04 Apr 2013 07:40 PM
A touchscreen enabled PC can also have a mouse with it, so your idea wouldn't work. You could check that they're on a touch enabled device, but aren't mouse or keyboard enabled. Perhaps?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 07:50 PM
It works (Now people who have a mouse and touchscreen will still use mouse input in oppose to touchscreen input)
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
04 Apr 2013 07:51 PM
:)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 07:56 PM
Now for a second question:

Is it actually better to do this:

if mouse then

function1 = function(stuff)
--do stuff that needs mouse input
end

function2 = function(stuff)
--do stuff that needs mouse input
end

else

function1 = function(stuff)
--do stuff that needs touch input
end

function2 = function(stuff)
--do stuff that needs touch input
end

end

Than to use the if statement within the functions?

Less typing, but is there less lag?
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
04 Apr 2013 08:45 PM
There will be no difference.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
04 Apr 2013 10:01 PM
Could you just like.. Have a button when people joined to choose between touch controls and mouse controls?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
04 Apr 2013 10:17 PM
What if a tablet user clicks the wrong button? The GUI will be totally messed up D:
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image