Commit Graph

157 Commits

Author SHA1 Message Date
15f02d4d0e Infinite margins should not be taken into account for DesiredSize. 2019-04-11 20:05:30 +02:00
70d9e23b0c Added shadow control. 2019-04-11 20:03:36 +02:00
8f17c02634 Fixed incorrect bounds being returned by Overflow control. 2019-04-11 20:03:26 +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
f550220120 Added (OS specific) clipboard implementation.
- Based on github.com/atotto/clipboard.
2019-04-11 08:44:38 +02:00
fcf31b381b Added TextBox.
Updated basic example.
2019-04-11 08:44:38 +02:00
eb0e8322ef Changed Length.Zero to return value instead of Length.
Spacing shorthand methods now returns Spacing object instead of Control interface.
2019-04-11 08:44:38 +02:00
04779d6588 Changed Buffer.Render signature.
Added BufferControl on top of Buffer.
2019-04-11 08:44:01 +02:00
67658d3bee Added key event.
Some small additions/changes.
2019-04-10 21:23:56 +02:00
71cdc234ee Added clipboard.
- Default implementation only copies to application memory. Is open for using external implementation.
2019-04-10 21:21:55 +02:00
fa7796a4ae Added support for animations. 2019-04-10 21:20:39 +02:00
552de0c748 Fixed padding of button. 2019-04-09 20:32:59 +02:00
2ffb579340 Factored out (render) buffer. 2019-04-09 20:32:42 +02:00
c024416702 Added ui.RefreshEvent.
- Refresh signal is now propagated to controls.
2019-03-13 21:20:31 +01:00
a6718e335d Fixed bug in StackPanel
- Children now get actual bounds, might be outside of the parent's bounds.
2019-03-13 20:18:15 +01: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
a3aa398909 Restructered spacing controls & added margin helpers. 2019-03-13 19:03:06 +01:00
3ea0d76efb Created unified spacing control.
Build control methods now accept nil as visitor method.
2019-03-12 21:11:43 +01:00
d14a9bd0e7 Fixed bugs in Overflow control.
- Tries to take as much space as possible.
- Draw buffer should be exactly size needed.
2019-03-12 20:08:47 +01:00
f31cd28771 Added color to palette.
Added comments to palette.
2019-03-12 19:50:34 +01:00
c83a6d5aad Added FontStyle on ControlBase.
Forced putting text on integer coordinates.
2019-03-12 19:43:52 +01:00
c973305b6d Cleanup of (font) resources on destroy. 2019-03-12 19:23:47 +01:00
1d6587adbd Added changing the mouse cursor. 2019-03-11 17:30:41 +01:00
0387e313de Added user events & possibility to 'refresh'.
- Refresh unblocks event loop for the next redraw.
2019-03-06 18:23:53 +01:00
c08474a01c Added display resize event. 2019-03-06 18:23:53 +01:00
ff2ece7d06 Added mouse wheel implementation (scrollbar & overflow).
Fixed bug in length of scrollbar handle.
2019-03-06 18:22:30 +01:00
19daffd110 Added UI elements.
Reversed order of operands when comparing with nil/0 .
2019-03-05 21:52:18 +01:00
89a3d49992 Renamed allegro5 package to allg5. 2018-11-21 14:35:14 +01:00
fd9be87470 Added -static flag to LDFLAGS for static build. 2018-11-21 14:30:33 +01:00
5a3818976a Added SetIcon to Display. 2018-11-21 14:30:32 +01:00
8bdf7d0b76 Various additions:
- Added sub-bitmaps.
- Color implements color.Color interface.
- Added methods to retrieve font dimensions and its rendered text.
- Added DrawPolyline method.
2018-11-21 14:30:31 +01:00
a761b21775 Added window handle (Windows specific) 2018-06-04 21:16:36 +02:00
5f031fdd20 Added primitives drawing functions. 2018-06-04 21:16:17 +02:00
dbcd09094f Added display & monitor functions 2018-06-04 21:15:53 +02:00
6bd3bad160 Added MouseButton type.
Added IsAny{MouseButton,Key}Down and IsMouseButtonDown methods.
2018-03-29 17:21:10 +02:00
499dff7a96 Added New{Memory,Video}Bitmap functions to create memory/video bitmap directly.
Added new bitmap flags to New{Memory,Bitmap,}Bitmap methods.
2018-02-26 19:46:53 +01:00
5f12bfe3ef Exposed new bitmap flag manipulation. 2018-02-26 07:51:58 +01:00
734d0db4b9 Locking OS thread in init method. 2018-02-17 15:01:58 +01:00
9a2fa3ab81 Renamed some keys. 2018-02-17 14:01:20 +01:00
47c6b131ea Changed the #cgo conditionals to build constraints.
- Build constraint for static building is called "static" now.
Reference: https://golang.org/pkg/go/build/#hdr-Build_Constraints.
2018-02-15 21:32:30 +01:00
ff60dcb236 Added Key and KeyMod consts.
Refactored events to use Key and KeyMod where applicable.
Added IsKeyDown method.
2018-02-15 21:06:04 +01:00
7d7bc43a80 Added flag to NewBitmapFromImage.
Bitmap is now created as a memory bitmap and converted to a video bitmap if the user requested that explicitly.
2018-02-15 20:28:53 +01:00
0652c02caf Lower case error strings.
Added Position and SetAsTarget method to Display.
Display resize is automatically acknowledged.
2018-02-15 20:28:51 +01:00
ca64417bb8 Made width & height required parameters for NewDisplay. 2018-02-12 21:47:30 +01:00
e8ff8c35fe Added Maximized flag to new display options.
Added display resize & orientation event.
2018-02-12 21:46:52 +01:00
ab5572018d Applied formatting & added GetWait().
- GetWait waits for an event in a blocking way.
2018-02-10 09:14:19 +01:00
4d98c63391 Added InitAll InitConfig that sets all flags to true. 2018-02-10 09:13:35 +01:00