Amos Professional Manual  Contents  Index

Advanced Control Panels


Bit 1 is only active if the automatic numbering system has been turned on by setting Bit 0 to one.
      If this is the case, then the number count will start from one rather than zero, if Bit 1 is set
      to one.

Bit 2 changes the way the selector reacts to the mouse pointer. If it is set to zero, each line will
      react to the mouse immediately, with no need for a click of the mouse button. If Bit 2 is set
      to one, then items must be selected explicitly with the left mouse button.

The paper and pen parameters are the colour index numbers for the text in the item.

Finally, the square brackets hold an Interface routine that determines any changes to be executed every time one of the items is selected.

Note that the text is displayed using a normal AMOS Professional window defined by the number z+2000. Particular care should be taken if you are writing to the screen while reading a selector. Return to the normal screen before printing, with a WINDOW 0 command, then use a line like WINDOW Z+2000 to move the cursor back to the active window. If this is not done, text will be printed inside the selection area!

As with all of these techniques, there is a ready-made working example of an active window, available for examination:

LD> Load "AMOSPro_Tutorials:Tutorial/Interface/Sliders.AMOS"

InactiveList
Interface instruction: display an inactive list window
IL zone number,x,y,width,height,address,index,flag,paper,pen;

To display a window containing items in an array that are not for selection by the mouse, the InactiveList command is used in much the same way as an ActiveList instruction except that there is no [changes] parameter. Inactive windows are useful for generating simple lists on the screen.

Before using the AList or IList commands, some advance preparation should be carried out, using the following steps:

First of all, define a string array to hold the items in memory, using a line like this:

X> Dim ITEM$(100)

Next, load the items into the array. These items may be anything you wish, such as the commands for an adventure game, or a set of filenames on a disc. The one factor that must be ensured is that each item must have exactly the same number of characters. Use spaces to pad items as necessary.

The third step is to enter the Interface program into a string, and include an ActiveList command. The following example line would create zone 1 at coordinates 10,10, with 15 lines of 30 characters each, taking the address of the item array from 0 VA.

X> AL 1,10,10,30,15,0 VA,0,0,0,1;[]
Back    Next
09.03.11