プレイ日記
Aaron pikamony
can somebody create a mouse/cursor program using either the circle pad OR touch?. i want to implement it in Basic OS. whoever can will be credited in my os as a developer
1そうだね
プレイ済み
返信[1]
親投稿
Oscar PwnageBlock
It's really simple, actually. You can draw the cursor using any method you want, although using a sprite is probably the simplest way. With the touchscreen: A simple TOUCH OUT TS,TX,TY will do. Just offset the cursor position to TX,TY.
1そうだね
プレイ済み
返信[2]
親投稿
Oscar PwnageBlock
With the Circle Pad: You can have two variables representing the position of the cursor, let's say, X and Y. All you have to do is increment X and Y using the values provided by STICK OUT SX,SY. Like this: INC X,SX DEC Y,SY 'Decrement since the Y-axis is inverted. After this, just offset the cursor to X,Y.
1そうだね
プレイ済み
返信[3]
親投稿
Oscar PwnageBlock
If you find the movement to be too slow you can provide a multiplier to SX and SY in the increments... INC X,SX*3 If you find the cursor going out of the visible screen, you can bound X and Y using the MIN and MAX functions. (I'll leave you to research them on your own.) I'd tell you how to program "clicks", but I think you can figure it out.
2そうだね
プレイ済み
返信[4]
親投稿
Aaron pikamony
yea im a noob can u type me out an example
0そうだね
プレイ済み
返信[5]
親投稿
Oscar PwnageBlock
Experience is earned through practice! You won't learn much if I just give you the code.
0そうだね
プレイ済み
返信[6]
親投稿
Aaron pikamony
my plan was to look at the code and lear from IT. i know how to make a sprite move. i can use this to learn how to do this.
1そうだね
プレイ済み