This content is provided AS IS for archive purposes only. Content may be out of date with no guarantee of correctness.

Buttons - Elements - Hag GUI for Cobra - Static

Main Article

Buttons - Elements - Hag GUI for Cobra

A button from the XP theme with the hover state.

Buttons are rectangular GUI elements that, when clicked, perform an action.

Buttons expose the following read-only variables:

button.x: Integer - Button x position
button.y: Integer - Button y position
button.w: Integer - Button width
button.h: Integer - Button height
button.enabled: Boolean - If button is enabled
button.visible: Boolean - If button is visible
button.isImageButton: Boolean - If button is an Image Button



   form1 : ^forms
       button1a : ^buttons
   background: Element

   background = CreateSprite(800,600)
   CLS(ToRGBA(200,200,200), background)
   HagInit(800,600, 1)    

   form1 = CreateForm("frm1")
       button1a = CreateButton(form1, 10, 10, 100, "Hello")


   While Not KeyDown(VK_ESCAPE)




Stay Subscribed

@golightlyb, subscribe to the RSS feed or get updates by e-mail.

You can also contact me directly - I make an effort to reply to every e-mail.