The following warnings occurred:
Warning [2] Undefined array key 255512 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 255512 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





HP PRIME: TOUCHSCREEN



#2

Hi everyone !

The screen size is 320x240 pixels, so the touchscreen's limits are from pixel (0,0) to pixel (319,239). Right ?

Try this code please:

EXPORT TOUCHZONE()
BEGIN
LOCAL s,white:=#FFFFFFh,grey:=#707070h;
RECT_P(G0,0,0,319,219,grey);
WHILE GETKEY()<> 4 DO // Escape to quit
CASE
// +++++ one finger
IF (MOUSE(0)<>-1 AND MOUSE(1)<>-1) AND
(MOUSE(5)==-1 AND MOUSE(6)==-1)
THEN
s:="X: "+B->R(MOUSE(0));
TEXTOUT_P(s,G0,20,0,2,white,90,grey);
s:="Y: "+B->R(MOUSE(1));
TEXTOUT_P(s,G0,20,18,2,white,90,grey);
s:="Xo: "+B->R(MOUSE(2));
TEXTOUT_P(s,G0,20,36,2,white,90,grey);
s:="Yo: "+B->R(MOUSE(3));
TEXTOUT_P(s,G0,20,54,2,white,90,grey);
s:="Type: "+B->R(MOUSE(4));
TEXTOUT_P(s,G0,20,72,2,white,90,grey);
END;
// +++++ no finger
IF (MOUSE(0)==-1 AND MOUSE(1)==-1) AND
(MOUSE(5)==-1 AND MOUSE(6)==-1) THEN
RECT_P(G0,0,0,319,219,grey);
END;
// +++++ two fingers
IF MOUSE(0)<>-1 AND MOUSE(1)<>-1 AND
MOUSE(5)<>-1 AND MOUSE(6)<>-1
THEN
s:="X: "+B->R(MOUSE(5));
TEXTOUT_P(s,G0,170,0,2,white,90,grey);
s:="Y: "+B->R(MOUSE(6));
TEXTOUT_P(s,G0,170,18,2,white,90,grey);
s:="Xo: "+B->R(MOUSE(7));
TEXTOUT_P(s,G0,170,36,2,white,90,grey);
s:="Yo: "+B->R(MOUSE(8));
TEXTOUT_P(s,G0,170,54,2,white,90,grey);
s:="Type: "+B->R(MOUSE(9));
TEXTOUT_P(s,G0,170,72,2,white,90,grey);
END;
DEFAULT
END;
END;
END;

On my Prime X cannot be less than 2, the same for Y; touchscreen works from (2,2) to (319,239)...

And on yours ?

Dam.


Edited: 11 Nov 2013, 11:25 a.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  What was the Earliest Touchscreen Handheld? Jake Schwartz 8 2,376 04-20-2009, 06:14 AM
Last Post: Bill (Smithville, NJ)

Forum Jump: