'// VQB Demos - Pt 1. The Dock \\
'// By John Onyon a.k.a Unseen Machine \\
CHDIR "VQB\Demo's\Dock\" '// Root file directory
REM $INCLUDE:
'VQB\VQB.bi' '// Include the base TYPE's and default constants
DIM HSI
AS LONG, WSI
AS LONG '// Variables to hold the Width and Height of the screen
VQB_Screen
0, 0, WSI
, HSI
, _RGB32(120, 110, 100), "VQB - Dock Demo" '// Create a screen
'// The dock requires three things, The mouseinfo array, a Dock and an array of however many items you want the dock to have.
DIM Mouse
(1) AS MouseInfo
, Dock
AS DOCK
, DockItem
(4) AS DOCK_ITEM
'// First is array ref then file name and finally helper text (not currently implemented)
VQB_DOCK_ITEM_NEW DockItem(0), "Internet_ICON.PNG", "Network and Internet"
VQB_DOCK_ITEM_NEW DockItem(1), "Music_ICON.PNG", "Music - DJ64"
VQB_DOCK_ITEM_NEW DockItem(2), "Paint_ICON.PNG", "QB Paint"
VQB_DOCK_ITEM_NEW DockItem(3), "Games_ICON.PNG", "Games"
VQB_DOCK_ITEM_NEW DockItem(4), "Computer_ICON.PNG", "File Explorer"
'// Once you've loaded the images for the dock items you can initialise the dock
'// First send the master dock type then number of items, max items and the colour
'// Next is Position : BOTTOM, LEFT, TOP or RIGHT
'// Then Reflections Either true or false
'// Finally the width and height of the screen
VQB_DOCK_NEW Dock
, 5, 5, _RGB32(150, 150, 180), BOTTOM
, TRUE
, FALSE
, WSI
, HSI
_LIMIT 30 '// Limit frame loops
VQB_Mouse_GetInfo Mouse(0) '// Get mouse data
'// If the return value is > -1 then thats the icon that the mouse is over
SELECT CASE VQB_DOCK_UPDATE
(Dock
, DockItem
(), Mouse
())
IconText$ = "Internet Icon"
IconText$ = "Music Icon"
IconText$ = "Paint Icon"
IconText$ = "Games Icon"
IconText$ = "Computer Icon"
IconText$ = "NO ICON SELECTED"
LOOP UNTIL Mouse
(0).R
'// Do this until the right mouse button is clicked
REM $INCLUDE:'VQB\VQB.bm' '// Include VQB Library