Amos Professional Manual  Contents  Index

Menus


ELLIPSE
embedded command: draw an ellipse
ELlipse radius1 ,radius2

ELlipse draws an ellipse centred on the current coordinates, with the chosen radii. To draw a circle centred at the current coordinates, simply make radius1 equal to radius2.

PROC
embedded command: call a procedure
PRoc NAME

PRoc allows you to call any AMOS Professional procedure directly within a menu line. The called procedure cannot include any parameters, otherwise a syntax error will be generated.

This is the command that allows you to customise your menu to your own needs and ignore the limitations of the available menu commands.

At the start of your procedure, the following values are held in the Amiga's 68000 processor registers:

DREG(0) holds the graphical x-coordinate of the top left-hand corner of the current menu item. Do not draw graphics to the left of this point on the screen unless you want to confuse the menu re-drawing process and generate bizarre effects.

DREG(1) holds the y-coordinate of your menu item. Avoid drawing below this point on the screen to minimalise possible errors.

DREG(2) holds the current status of your menu drawing operations. It contains a value of 0 (false) while the menu item is being drawn, in which case you must load DREG(0) and DREG(1) with the x,y-coordinates of the bottom right-hand corner of your menu zone, and return from the procedure immediately. If DREG(2) is -1 (true), you are free to perform the graphics operations used by the procedure. After completion, you should return the coordinates of the bottom right-hand corner of your item in DREG(0) and DREG(1) as above.

DREG(3) holds a value of -1 if the menu is selected and the first menu string is on display, otherwise it will contain a value of 0.

DREG(4) is set to TRUE when the menu branch is initially opened.

AREG(1) holds the address of the zone created with RESERVE. It is used to allow different procedures to communicate with one another.

Back    Next
06.05.16