Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
void CheckForSlash() { u8 LastStylusX = 0; u8 LastStylusY = 0; u8 NewStylusX = 0; u8 NewStylusY = 0; //aktuelle stylus position speichern if(Stylus.Newpress) { LastStylusX = Stylus.X; LastStylusY = Stylus.Y; PA_OutputText(1,1,6,"LastX: %d LastY: %d",LastStylusX, LastStylusY); } if(Stylus.Released) { NewStylusX = Stylus.X; NewStylusY = Stylus.Y; PA_OutputText(1,1,8,"NewX: %d NewY: %d",NewStylusX, NewStylusY); if(LastStylusX != NewStylusX) { PA_OutputText(0,9,11,"SLUUUUUSH!!"); } if(LastStylusY != NewStylusY) { PA_OutputText(0,9,11,"SWISSSSSH!!"); } } else { //PA_ClearTextBg(0); } } |
Anonymous
unregistriert
Zitat
Ich will eine nachricht ausgeben nachdem der stylus über den touchscreen bewegt wurde
Quellcode |
|
1 2 3 4 5 6 7 8 |
if(LastStylusX != NewStylusX) { PA_OutputText(0,9,11,"SLUUUUUSH!!"); } if(LastStylusY != NewStylusY) { PA_OutputText(0,9,11,"SWISSSSSH!!"); } |
Anonymous
unregistriert
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
void CheckForSlash() { u8 LastStylusX,LastStylusY,NewStylusX,NewStylusY ; LastStylusX=Stylus.X; LastStylusY=Stylus.Y; NewStylusX=Stylus.X; NewStylusY=Stylus.Y; PA_OutputText(1,1,6,"LastX: %d LastY: %d",LastStylusX, LastStylusY); if(Stylus.Released) { NewStylusX = Stylus.X; NewStylusY = Stylus.Y; PA_OutputText(1,1,8,"NewX: %d NewY: %d",NewStylusX, NewStylusY); if(LastStylusX != NewStylusX) { PA_OutputText(0,9,11,"SLUUUUUSH!!"); } if(LastStylusY != NewStylusY) { PA_OutputText(0,9,11,"SWISSSSSH!!"); } } else { //PA_ClearTextBg(0); } } |
Werbeanzeige