HP Forums
Can you discover if a DRAWMENU is on-screen? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Can you discover if a DRAWMENU is on-screen? (/thread-6257.html)



Can you discover if a DRAWMENU is on-screen? - StephenG1CMZ - 05-16-2016 07:30 AM

In version 0.1 of my accessibility fingerspelling program, it would be useful if there were a way of discovering whether a DRAWMENU was on-screen or whether that area of the screen could be used for something else.

Also, how do you delete a drawmenu? This leaves a blank Drawmenu on screen.

Code:

EXPORT TRYD()
BEGIN
  LOCAL OKC;
  
  OKC:=DRAWMENU("");
  WAIT;//A BLANK MENU IS SHOWN:HOW TO ERASE?
  MSGBOX(OKC);//IS THERE A WAY OF ASKING IF A MENU IS ONSCREEN?
END;



RE: Can you discover if a DRAWMENU is on-screen? - DrD - 05-16-2016 10:07 AM

Something like this, perhaps? (You could do a GETPIX_P test to check for a menu presence, for a not-so-elegant means to an end ...)

DRAWMENU(""); // arguments empty,

RECT_P(); // clear the entire screen -or-
RECT_P(G0,0,220,330,240); // clear only the menu rectangular area.

-Dale-


RE: Can you discover if a DRAWMENU is on-screen? - StephenG1CMZ - 05-16-2016 10:39 AM

(05-16-2016 10:07 AM)DrD Wrote:  Something like this, perhaps? (You could do a GETPIX_P test to check for a menu presence, for a not-so-elegant means to an end ...)

DRAWMENU(""); // arguments empty,

RECT_P(); // clear the entire screen -or-
RECT_P(G0,0,220,330,240); // clear only the menu rectangular area.

-Dale-
I think you mean 320 not 330.
I didn't think you could ask if DRAWMENU was on-screen (ideally, by returning a list of its buttons), but I am surprised the DRAWMENU can't delete itself.


RE: Can you discover if a DRAWMENU is on-screen? - DrD - 05-16-2016 10:51 AM

Yes, it was a boo boo on that 330, I had it right, when I was messing with it, but wouldn't you just know ...

Maybe "they" could just use "DRAWMENU()," with no arguments, to do a menu erase trick, in their spare time, over at the house of cubes!

-Dale-