Commit Graph

137 Commits

Author SHA1 Message Date
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
2fae8a5012 Native Go image is now loaded directly as Allegro bitmap.
- Previous implementation used a temporary file (PNG).
2018-02-10 09:12:42 +01:00
6dd358365e Added support for allegro_static flag (enables static linking of allegro). 2017-12-19 07:54:53 +01:00
67e2d4d788 Refactored bitmap API (partially)
- Made the scale option an interface (for easier use)
- Added rotation option
- Added utility function that converts Go bitmap to an Allegro bitmap (using a temporary file)
2017-10-23 11:21:02 +02:00
0aff140884 Added text width function for font 2017-10-23 11:18:48 +02:00
a24dc7ba30 Added rectangle primitives 2017-10-23 11:18:24 +02:00
27eae9dc8b Fixup
- bitmap.go format
- c.go cleanup
2017-10-03 20:41:45 +02:00
2924980035 Basic wrapper around allegro5 libraries
- Depends on optional allegro libraries font, image, primitives and ttf as well.
2017-10-03 20:38:09 +02:00