Commit Graph

7 Commits (49f108f3027fb54a308cdaf8fc98b762fc8b53c1)

Author SHA1 Message Date
Noah 911585ea4d Update README 2020-03-09 17:32:28 -07:00
Noah f9b305679a Tooltip Widget and Event Refactor
* Tooltip can be added to any target widget (e.g. Button) and pop up on
  mouse over.
* Refactor the event system. Instead of passing a render.Point to all
  event handlers, pass an EventData struct which can hold the Point or
  the render.Engine.
* Add event types Computed and Present, so a widget can set a handler on
  whenever its Computed or Present method is called.
2020-03-09 17:13:33 -07:00
Noah 4ba563d48d Supervisor, Frame Pack and Misc Fixes
* Button: do not call MoveTo inside of Compute().
* Label: do not call MoveTo inside of Compute().
* MainWindow: add OnLoop callback function support so you can run custom code
  each loop and react to the event.State before the UI updates.
* Supervisor: locate widgets using AbsolutePosition() instead of w.Point()
  to play nice with Frame and Window packed widgets.
* Widget interface: rename Adopt() to SetParent() which makes more sense for
  what the function actually does.
* Window: set itself as the parent of the body Frame so that the Supervisor
  can locate widgets anywhere inside a window's frames.

Frame packing fixes:

* Widgets with Expand:true grow their space with ResizeAuto to preserve the
  FixedSize() boolean, instead of being hard-resized to fill the Frame.
* Widgets that Fill their space are resized with ResizeAuto too.

Outstanding bugs:

* Labels don't expand (window title bars, etc.)
2019-12-29 00:00:03 -08:00
Noah 9d6b172878 Rename Anchor to Side in Frame.Pack() config 2019-12-28 21:47:46 -08:00
Noah 70f8e5b02a Add GoDoc link to README 2019-12-27 16:23:19 -08:00
Noah 40e451814e Add GitHub mirror information to README 2019-12-27 16:09:13 -08:00
Noah 2f5b498ca1 Add README, LICENSE and Examples 2019-12-27 16:06:24 -08:00