- Joined
- Nov 24, 2014
- Messages
- 3,162
- Reaction score
- 3,513
- Trophies
- 2
- Age
- 31
- Location
- Bologna
- Website
- rinnegatamante.it
- XP
- 4,879
- Country

How does Lua read circle pad input? How would it be coded?
What do you mean?

How does Lua read circle pad input? How would it be coded?
http://rinnegatamante.netsons.org/lpp-3ds_doc.htmlHow does Lua read circle pad input? How would it be coded?
At rest, what are the x and y values. What are the min/max x y values. Does it take sensitivity/incorrectness/non calibratedness into account?What do you mean?
Is 0,0 the center, or does that go to one of the corners?int,int Controls.readCirclePad(void) - Get X,Y position of Circle Pad.
Sample usage: x,y = Controls.readCirclePad()
The x is probably higher, the farther right the pad is, for y it's the probably the lower it is.
Sensibility and non calibratedness are also probably not taken into account.

0 - 0 is the center.Is 0,0 the center, or does that go to one of the corners?
Is 0,0 the center, or does that go to one of the corners?
local x, y
Graphics.init()
while true do
Screen.refresh()
Screen.clear(TOP_SCREEN)
Screen.clear(BOTTOM_SCREEN)
x, y = Controls.readCirclePad() -- max for both is 156
x = math.floor(x / 4 + 0.5) -- to fit on screen
y = - math.floor(y / 4 + 0.5) -- to fit on screen, negative because input is inverted
Screen.fillRect(200 + x - 3, 200 + x + 3, 120 + y - 3, 120 + y + 3, Color.new(255,0,0), TOP_SCREEN) -- 200 is half of top screen width, 120 is half of top screen height
Screen.debugPrint(10, 10, 'x: ' .. x, Color.new(255,255,255), TOP_SCREEN)
Screen.debugPrint(10, 25, 'y: ' .. y, Color.new(255,255,255), TOP_SCREEN)
Screen.waitVblankStart()
Screen.flip()
if Controls.check(Controls.read(), KEY_B) then
System.exit()
end
end

Yes, 0 - 0 is the center, here's an example:
Code:local x, y Graphics.init() while true do Screen.refresh() Screen.clear(TOP_SCREEN) Screen.clear(BOTTOM_SCREEN) x, y = Controls.readCirclePad() -- max for both is 156 x = math.floor(x / 4 + 0.5) -- to fit on screen y = - math.floor(y / 4 + 0.5) -- to fit on screen, negative because input is inverted Screen.fillRect(200 + x - 3, 200 + x + 3, 120 + y - 3, 120 + y + 3, Color.new(255,0,0), TOP_SCREEN) -- 200 is half of top screen width, 120 is half of top screen height Screen.debugPrint(10, 10, 'x: ' .. x, Color.new(255,255,255), TOP_SCREEN) Screen.debugPrint(10, 25, 'y: ' .. y, Color.new(255,255,255), TOP_SCREEN) Screen.waitVblankStart() Screen.flip() if Controls.check(Controls.read(), KEY_B) then System.exit() end end
Edit:
Also, Rinnegatamante, the Graphics.drawCircle function doesn't seem to work properly. Citra and an actual 3DS just tell me that more arguments are required, even though I use the 4 from the documentation...
You right, my fault, just use another argument as stub (like nil).

Okay
Edit: Also, is it possible to use CPU and GPU rendering at the same time?
Yeah, you have to use FIRST GPU rendering.
how do i install this?




the final question (i hope) howto get wordwraps? i define some text="overly long text" per an outside file and want to add automaticaly an wordwrap when it reaches the end of the scree so that its not writing over the screen end but at the begining of the next row

I think it was usin \n when you want to jump, not sure.[/QUOTE
You have to write your own function to do this or you have to use Console module (but they will take the entirety of the screen).

Nothing like an Text Module that Do this automaticaly? Cant this be builded in The responsable modules?



