graphics tablet

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

graphics tablet

Post by GVovkiv »

Soo, apparently love doesnt have support of graphics tablets?
Like detecting if tablet connected or pressure, etc?

P.S:
Well, as Alex said on GitHub, i guess there will no proper support for tablets unless SDL will have it
Sadly
Last edited by GVovkiv on Sun Mar 07, 2021 9:53 am, edited 1 time in total.
User avatar
darkfrei
Party member
Posts: 1169
Joined: Sat Feb 08, 2020 11:09 pm

Re: graphics tablet

Post by darkfrei »

GVovkiv wrote: Fri Mar 05, 2021 3:11 pm Soo, apparently love doesnt have support of graphics tablets?
Like detecting if tablet connected or pressure, etc?
Not sure, but
https://love2d.org/wiki/love.touch.getPressure
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: graphics tablet

Post by GVovkiv »

darkfrei wrote: Fri Mar 05, 2021 4:03 pm
GVovkiv wrote: Fri Mar 05, 2021 3:11 pm Soo, apparently love doesnt have support of graphics tablets?
Like detecting if tablet connected or pressure, etc?
Not sure, but
https://love2d.org/wiki/love.touch.getPressure
Well, seems like it only apply for touch-screen, not tablets
User avatar
darkfrei
Party member
Posts: 1169
Joined: Sat Feb 08, 2020 11:09 pm

Re: graphics tablet

Post by darkfrei »

GVovkiv wrote: Fri Mar 05, 2021 4:14 pm
darkfrei wrote: Fri Mar 05, 2021 4:03 pm
GVovkiv wrote: Fri Mar 05, 2021 3:11 pm Soo, apparently love doesnt have support of graphics tablets?
Like detecting if tablet connected or pressure, etc?
Not sure, but
https://love2d.org/wiki/love.touch.getPressure
Well, seems like it only apply for touch-screen, not tablets
It can be also for the tablets, you get some pen-touches here.

Code: Select all

function love.draw()
	local touches = love.touch.getTouches( )
	for i, id in pairs (touches) do
		local pressure = love.touch.getPressure( id )
		love.graphics.print('i: '..i..' pressure: '..pressure, 32, 32+20*i)
	end
end
Attachments
touch-pressure-01.love
(313 Bytes) Downloaded 242 times
Last edited by darkfrei on Fri Mar 05, 2021 7:34 pm, edited 1 time in total.
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: graphics tablet

Post by GVovkiv »

darkfrei wrote: Fri Mar 05, 2021 4:03 pm

Code: Select all

function love.draw()
	local touches = love.touch.getTouches( )
	for i, id in pairs (touches) do
		local pressure = love.touch.getPressure( id )
		love.graphics.print('i: '..i..' pressure: '..pressure, 32, 32+20*i)
	end
end
Well, for huion h430p it returns nothing
Xugro
Party member
Posts: 110
Joined: Wed Sep 29, 2010 8:14 pm

Re: graphics tablet

Post by Xugro »

GVovkiv wrote: Fri Mar 05, 2021 5:14 pm Well, for huion h430p it returns nothing
The Huion Inspiroy H430P looks like an alternative for a mouse input; so more like a graphics tablet than a tablet computer. Try https://love2d.org/wiki/love.mouse.isDown and https://love2d.org/wiki/love.mouse.getPosition.
MrFariator
Party member
Posts: 509
Joined: Wed Oct 05, 2016 11:53 am

Re: graphics tablet

Post by MrFariator »

It's an alternative for mouse input, yes, like all other graphics tablets. So while you can track them with love.mouse functions, I don't think there's any functionality in löve to detect pressure of the pen touches if love.touch.getPressure doesn't work. Not sure how you would go about it with Huion tablets, but Wacom tablets provide an API that you could hook up to with C, and then from where with luajit. Maybe Huion might have similar opportunity.
User avatar
darkfrei
Party member
Posts: 1169
Joined: Sat Feb 08, 2020 11:09 pm

Re: graphics tablet

Post by darkfrei »

I've tried this code (touch-pressure-01.love) with Wacom Bamboo Fun Pen & Touch, it feels like a mouse click, the pressure is always 1 (Wacom Bamboo Fun Pen & Touch supports pressure, the pen with 1024 levels of pressure sensitivity).
Attachments
2021-03-05T20_36_29-Untitled.png
2021-03-05T20_36_29-Untitled.png (6.66 KiB) Viewed 6867 times
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: graphics tablet

Post by GVovkiv »

MrFariator wrote: Fri Mar 05, 2021 6:43 pm It's an alternative for mouse input, yes, like all other graphics tablets. So while you can track them with love.mouse functions, I don't think there's any functionality in löve to detect pressure of the pen touches if love.touch.getPressure doesn't work. Not sure how you would go about it with Huion tablets, but Wacom tablets provide an API that you could hook up to with C, and then from where with luajit. Maybe Huion might have similar opportunity.
well, even if huion have one, i don't know C, so i can't do nothing about it
User avatar
GVovkiv
Party member
Posts: 668
Joined: Fri Jan 15, 2021 7:29 am

Re: graphics tablet

Post by GVovkiv »

Xugro wrote: Fri Mar 05, 2021 6:36 pm
GVovkiv wrote: Fri Mar 05, 2021 5:14 pm Well, for huion h430p it returns nothing
The Huion Inspiroy H430P looks like an alternative for a mouse input; so more like a graphics tablet than a tablet computer. Try https://love2d.org/wiki/love.mouse.isDown and https://love2d.org/wiki/love.mouse.getPosition.
i know, but i need more specific things
like checking if tablet connected to pc, or not
get pressure
get buttons of tablet (if it have one) and binding them
etc
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 47 guests