Post Reply 
How Drawmenu work's?
11-12-2016, 09:05 PM (This post was last modified: 11-12-2016 09:19 PM by compsystems.)
Post: #13
RE: How Drawmenu work's?
ok Quit function works fine, a delay is required, so the menu does not print n times.

PHP Code:
callit(F)
BEGIN
  
IF F=="" THEN RETURN; END;
  
EXPR(F);
  
draw();
  
wait(0.2);
END

But unfortunately there is not function to return to the terminal view =(, I hope that some developer will incorporate a function to goto the terminal view (terminalView(); ), also it requires a vertical AutoScroll, otherwise the terminal view is not useful After the first screen. Do you agree with this?

please test Menu5 [choose] and menu4 [printScroll] n times
PHP Code:
//PHP for highlight
#pragma mode( separator(.,;) integer(h32) )
local stay;
EXPORT LibMenuTest()
BEGIN
  stay
:=1;
  print();
  print(
"test menu on terminal view"); freeze;
  
LibMenu.reset();
  
entry(1,"print1","tstLibM.f1()");
  
entry(2,"print2","tstLibM.f2()");
  
entry(3,"print3","tstLibM.f3()");
  
entry(4,"printScroll","tstLibM.f4()");
  
entry(5,"choose","tstLibM.f5()");
  
entry(6,"exit","tstLibM.quit()");
  
LibMenu.draw();
  WHILE 
stay DO
   
LibMenu.events();
  
END;
  return 
"Done";
END;

f1()
BEGIN
  
print("expr1: a/b"); LibMenu.draw(); 
END;

f2()
BEGIN
  
print("expr2: x^2"); LibMenu.draw(); 
END;

f3()
BEGIN
  
print("expr3: abs(-x)"); LibMenu.draw();
END;

f4()
BEGIN
  
print("string: 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz123​4567890abcdefghijklmnopqrstuvwxyz"); LibMenu.draw();
END;

f5()
BEGIN
 MSGBOX
("popup dialog box"); // terminalView();
 
LibMenu.draw();
END;

EXPORT quit()
BEGIN
 stay
:=0// you will quit nicely the WHILE loop
END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
How Drawmenu work's? - fabio.hdl - 11-03-2016, 05:02 PM
RE: How Drawmenu work's? - Han - 11-03-2016, 06:41 PM
RE: How Drawmenu work's? - Tyann - 11-03-2016, 07:02 PM
RE: How Drawmenu work's? - StephenG1CMZ - 11-03-2016, 08:58 PM
RE: How Drawmenu work's? - toml_12953 - 11-04-2016, 02:28 PM
RE: How Drawmenu work's? - primer - 11-11-2016, 07:31 PM
RE: How Drawmenu work's? - fabio.hdl - 11-05-2016, 08:22 PM
RE: How Drawmenu work's? - compsystems - 11-12-2016, 01:36 AM
RE: How Drawmenu work's? - primer - 11-12-2016, 10:41 AM
RE: How Drawmenu work's? - compsystems - 11-12-2016, 02:53 PM
RE: How Drawmenu work's? - primer - 11-12-2016, 08:36 PM
RE: How Drawmenu work's? - StephenG1CMZ - 11-12-2016, 08:23 AM
RE: How Drawmenu work's? - compsystems - 11-12-2016 09:05 PM
RE: How Drawmenu work's? - primer - 11-12-2016, 10:04 PM
RE: How Drawmenu work's? - compsystems - 11-14-2016, 04:03 AM
RE: How Drawmenu work's? - StephenG1CMZ - 11-14-2016, 09:03 AM
RE: How Drawmenu work's? - ggauny@live.fr - 01-25-2017, 12:11 PM
RE: How Drawmenu work's? - ggauny@live.fr - 01-25-2017, 05:06 PM
RE: How Drawmenu work's? - primer - 01-25-2017, 11:18 PM



User(s) browsing this thread: 1 Guest(s)