Commit Graph

3 Commits (f18dcf9c2c8e776e3e28f209fe8a57b57d17a647)

Author SHA1 Message Date
Noah 2e36d9ca85 WIP Labels 2018-07-31 17:18:13 -07:00
Noah 11df6cbda9 Move most properties from Button to parent Widget
These properties will be globally useful to all sorts of Widgets and
have been moved from the Button up into the Common widget, and its
interface extended to configure these:
* Padding int32
* Background color
* Foreground color
* Border size, color and style (default solid; raised; sunken)
* Outline size and color

The button adjusts its border style from "raised" to "sunken" for
MouseDown events and its Background color for MouseOver events. Other
widgets such as Labels and Frames will be able to have borders, paddings
and outlines too, but they will be off by default.
2018-07-25 21:24:37 -07:00
Noah 94c1df050b Add initial User Interface Toolkit
With Labels and Buttons so far.

* Labels are pretty much complete, they wrap a render.Text and have a
  Compute() method that returns their Width and Height when rendered
  onto an SDL Surface.
* Buttons wrap a Label widget and Compute() its size and takes that into
  consideration when rendering itself. Buttons render themselves from
  scratch in a "Windows 95" themed way, with configurable colors, border
  widths and outline.
2018-07-25 09:03:49 -07:00