Commit Graph

27 Commits

Author SHA1 Message Date
c0586c1d8f Added overridable text padding. 2021-07-19 07:58:46 +02:00
11e37af9c2 Added shorthand method for retrieving default font for the control. 2020-12-13 07:40:58 +01:00
b1cdbea90f Changed colors of button text a bit. 2020-12-13 07:40:58 +01:00
0f03760e66 Added Resize & SetIcon to Renderer.
Refactored Size (on Renderer) to return geom.Point instead of geom.PointF32.
Refactored Width and Height (on Texture) to return int instead of float32.

Refactored texture dimensions to be represented by ints instead of float32s.
2020-12-13 07:40:19 +01:00
e7ada7fea0 Using normal cursor when control is disabled. 2020-05-18 20:28:13 +02:00
ea5e1a4989 Added DisabledColor to button. 2020-05-18 12:37:42 +02:00
22cc3ce444 Added support for a fixed icon height on buttons. 2020-05-17 14:59:28 +02:00
c78c4052d0 Refactored DrawTexture on Renderer to favor rendering using destination rectangle instead of a point. 2020-05-17 11:12:45 +02:00
75fce53716 Added Paragraph control.
Extended DesiredSize method with extra arguments that tells the control how much space is available for the parent control (note: this might not be the actual given size when Arrange is called on the control).
2020-05-16 15:37:53 +02:00
ae46d2a1f2 Added Disabled to controls. 2020-05-16 13:46:07 +02:00
d742fba7e9 Added Events and changed event handlers of controls.
Removed EventHandlers from Control interface.
2020-05-15 19:00:43 +02:00
3591e22c97 Added Fonts() to context similarly as Textures().
- Fonts are now managed by context instead of the implementation specific renderers.
2020-05-15 15:42:24 +02:00
02ee819a99 Favoring Context.Textures() over direct texture assignment to controls. 2020-05-15 14:44:55 +02:00
cdfb863ab0 Added SDL backend.
Added Action{,s}. List of actions that can be used to defer cleanup code (see NewRenderer implementations).
Added TextInputEvent (replaces the old KeyPressEvent) and added to new events KeyDown & KeyUp.
Added VSync to NewRendererOptions.
Removed IconScale from button.
Added ImageSource interface that replaces the Image/Texture method on the Texture interface. This makes converting back a texture to an image optional (since this is atypical for a hardware texture for instance).
Added new KeyModifier: OSCommand (Windows/Command key).
Added KeyState that can keep the state of keys (pressed or not).
Added KeyEnter, representing the Enter key.
Changed signatures of CreateTexture methods in Renderer.
Changed signatures of icon related method (removed factories).
Basic example now depends on sdlgui.
2020-05-15 09:20:44 +02:00
48aaf30182 Renamed Image{,s} to Texture{,s}. 2020-05-12 23:03:43 +02:00
99c76545ef Added RenderOutline to ControlBase.
Added HoverColor to Button.
2019-04-11 23:27:25 +02:00
6bcab622ae Added support for Home and End buttons in TextBox.
Fixed scaling of icon in Button.
2019-04-11 22:22:23 +02:00
28af8aba06 Changed palette (added PrimaryDark color and changed PrimaryHighlight and PrimaryLight colors). 2019-04-11 20:02:15 +02:00
3390d46f34 Moved scaling by height to Images. 2019-04-11 20:00:26 +02:00
3acb3f09af Added scaled images to image cache. 2019-04-10 22:41:28 +02:00
552de0c748 Fixed padding of button. 2019-04-09 20:32:59 +02:00
4d518849e5 Added IconScale for Button. 2019-03-13 20:16:54 +01:00
ff51378aff Added button types.
Go image can be reconstructed from ui.Image/allg5.Bitmap.
Changed allg5.Scale from interface to struct.
2019-03-13 19:49:00 +01:00
3ea0d76efb Created unified spacing control.
Build control methods now accept nil as visitor method.
2019-03-12 21:11:43 +01:00
c83a6d5aad Added FontStyle on ControlBase.
Forced putting text on integer coordinates.
2019-03-12 19:43:52 +01:00
1d6587adbd Added changing the mouse cursor. 2019-03-11 17:30:41 +01:00
19daffd110 Added UI elements.
Reversed order of operands when comparing with nil/0 .
2019-03-05 21:52:18 +01:00