Retro GUI IDE and WeeGUI – Objects #3

In the last post the label and numberbox (spinner) control was added for how many numbers the user wanted to play.  We start this post with the addition of two more number boxes, one for number of games to play (1-999) and one that we will use in this session to select which numbers the user wants to play. Here’s what the updated screen looks like :

wgblog26

The default number of games to play is 10, and the starting point for selecting a number is 40, the middle of the keno board.  In review here is what the number box code looks like for the two new ones, labels in the first picture and the set up code for the numbboxes:

wgblog27

wgblog28

From the highlighted code block above then number of games numberbox value will be in variable VI, and we can see it set to the default value of 10 in line 60107.  Similarly VK =40 in line 60110 will be used for the selction of a number to play. Also the callback routine line numbers are 1800,1900  and 20000, 21000 for the games to play and selected numbers.  The code at 18000 is show below with min of 1 being tested in line 18000 and max of 999 tested in line 19000, for the number of games to play.

wgblog29

Moving on to selecting number to play, this will require a bit of user code to be written in the scratch pad.  First a button will be added to be used to select the number from the previously added number box.  To add the button let’s take a look at the RGI interface. A button object is added ast 22, 20 with width 5 and the caption “Add”.

wgblog31

The updated progam screen :

wgblog30

This is view number 12 for this program (and the 13th total since the count starts at 0).  So there are only 3 left for use.  The purpose of this button is to a. store off the number selected buy the user for checking later for a “hit” when the game is played, and also to mark on the board with ** the numbers the player has selected.  This will be accomplished it the callback subroutine for the Add button.  Looking the the automatically generated code we see the callback line number is 22000. We also know that RGI puts in a rem statement at 22000 and a return at 22999.

wgblog32wgblog33

In the next post the callback funtion code store and mark the board will be added.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s