Jump to content
  • entries
    2
  • comments
    12
  • views
    4,064

Input and render management done


Blitzbat

1,815 views

 Share

Today i've finished the input and render management of my gui system.

Focuses are working well.

 

Now i will get a bit deeper into other gui element like textboxes and buttons.

 

Here is a demonstration of how it works:

 

 Share

3 Comments


Recommended Comments

My advice is to make the routines based on their hierarchy. If there are ten windows onscreen, each with one button, you should only have to evaluate one button when the mouse is clicked. For both drawing and mouse input commands, the routines should be designed like this:

 

Method Update(x,y)

if not self.hidden()

if x>self.x and x<self.x+self.width and t>self.t and t<self.t+self.height

for child=eachin self.kids...

child.update(x,y)

next

endif

endif

endmethod

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...