*=============================================================================  
*           Sample uniVerse Program to using images as menu icons
*
*           
*        Shows use of the IMAGE HOTSPOT attribute and the Listbox macro.
*           
*=============================================================================  

EQU MAGIC TO CHAR(127)
EQU QU TO CHAR(34)


* Clear the screen

PRINT @(-1)


* Show two images using the IMAGE HOTSPOT attribute

PRINT MAGIC:"UWsdk\report.bmp, 5,15,24,35,44,1^M":MAGIC:
PRINT MAGIC:"UWsdk\file.bmp  , 5,40,24,75,44,2^M":MAGIC:


* Prompt the user

PRINT @(22,30):"Click on selection: ":
INPUT STRING


* When the user clicks on a hotspot image we will
* create a listbox that contains sub-menu options.
* One will be a Report menu, the other a Maintenance
* menu.


IF STRING = "1" THEN
  PRINT @(1,1) : MAGIC:
  PRINT @(1,1) : "UWSCRIPTsdk\listbox.scr,4,List of Reports,1,":
  PRINT @(1,1) : "8,25,24,60,Courier New,20":MAGIC:
  PRINT @(1,1) : "1) Quarterly Report,quarter.rpt,":
  PRINT @(1,1) : "2) Period Report   ,period.rpt,":
  PRINT @(1,1) : "3) Year End Report ,yearend.rpt,":
  PRINT @(1,1) : "4) Budget Report   ,budget.rpt,":
  PRINT @(1,1) : "5) Return to Menu  ,menu,":
  PRINT MAGIC:
END

IF STRING = "2" THEN
  PRINT @(1,1) : MAGIC:
  PRINT @(1,1) : "UWSCRIPTsdk\listbox.scr,4,Maintenance Programs,1,":
  PRINT @(1,1) : " 8,25,24,60,Courier New,20":MAGIC:
  PRINT @(1,1) : "1) Chart of Accts ,chart.prg,":
  PRINT @(1,1) : "2) Year End       ,yearend.prg,":
  PRINT @(1,1) : "3) General Ledger ,genleder.prg,":
  PRINT @(1,1) : "4) Accounting     ,account.prg,":
  PRINT @(1,1) : "5) Return to Menu ,menu,":
  PRINT @(1,1) : MAGIC
END


* Prompt the user again and wait for a selection from the listbox
* Display the program name to run

PRINT @(22,30):"Enter selection: ":
INPUT STRING
PRINT @(-1)
PRINT @(12,20):"User selected menu option -- ":STRING

END

