Commit graph

126 commits

Author SHA1 Message Date
Matthias Richter
727c925f1b Merge pull request #47 from codecat/force-focus-input
Add a force focus input option to text inputs
2017-03-16 20:22:35 +01:00
Matthias Richter
3899e6435f Merge pull request #46 from Alloyed/fix-up-left-cells
Fix up/left() cells
2017-03-16 20:21:53 +01:00
Angelo Geels
2830edc52e Rename to forcefocus 2016-10-23 13:36:50 +02:00
Angelo Geels
1b67db0487 Add force bool to input to force focus on first draw 2016-10-23 13:34:31 +02:00
Kyle McLamb
ef317657ca Document layout:up/down/left/right()
Consolation prize.
2016-10-04 17:41:35 -07:00
Kyle McLamb
0084ccba2e Remove nextUp() and nextLeft()
We need the expected size of the new cell to do it correctly, and that
would introduce an inconsistency between up/left and the existing row/col
functions.
2016-10-04 17:41:35 -07:00
Kyle McLamb
a4ebbc2679 Fix bug with layout left()/up()
When moving down/right, we use the old cell size because we are moving
the start point outside of the existing cell. When we go up/right, we
are doing actually doing the inverse operation, moving backwards using
the new cell size. We still check to see if there's an old cell because
up()/down()/left()/right() should behave the same for the first cell.
2016-10-04 17:41:35 -07:00
Matthias Richter
549693dd38 Document new GUI state getters 2016-08-28 19:20:49 +02:00
Matthias Richter
c66bbe9065 Fix #34: Add [is,any][Hit,Active,Hovered]() 2016-08-28 19:16:29 +02:00
Matthias Richter
1d6626e6f4 Fix #43 by enforcing minimum size on box drawing 2016-08-28 18:33:40 +02:00
vrld
046233fc5f Merge pull request #45 from Alloyed/fix-layout-pop
Fix layout:pop() to actually pop off of the stack
2016-08-28 18:13:52 +02:00
vrld
fe09c10d16 Merge pull request #42 from Alloyed/add-up-left-cells
Add Layout:up/down/left/right()
2016-08-28 18:12:24 +02:00
Kyle McLamb
ec361de482 Fix layout:pop() to actually pop off of the stack 2016-08-27 10:19:07 -04:00
Kyle McLamb
b19f0a3bff Add Layout:up/down/left/right()
up() places the next cell above the previous one, and left() places the
next cell to the left of the previous one. down() and right() are
aliases to row()/col(), for symmetry.

Also added are nextX() variants for function.
2016-08-08 13:22:07 -04:00
vrld
e64a822de8 Merge pull request #39 from texm/master
Ensure char is valid
2016-07-06 14:56:11 +02:00
vrld
9d184831e2 Merge pull request #38 from endlesstravel/master
fix bug when input more than one character.
2016-07-06 14:55:43 +02:00
tex
1b374b41cf Ensure char is valid
Fixes an error which could occur if an input's state was set to active without user interaction
2016-07-03 20:29:09 +08:00
endlesstravel
3171286c1f fix bug when input more than one character. 2016-06-01 19:06:45 +08:00
Matthias Richter
3fd6a6aecd Fix #33: tinted image buttons
Not a bug, but a feature---now documented!
2016-04-17 21:09:24 +02:00
Matthias Richter
10767cca33 Fix wrong padding in nested layouts
Previoysly, padding was added before adding a cell, which lead to
incorrect and unaligned cell placement in nested layouts.
Now padding is only added when at least one cell has been placed before.
2016-04-17 21:00:45 +02:00
vrld
5bba68071d Fix #35: Error in layout documentation example, cont.
Gotta catch them all
2016-04-12 10:52:46 +02:00
vrld
83e9131e25 Fix #35: Error in layout documentation example 2016-04-12 10:51:40 +02:00
Matthias Richter
cb93f4e48e Do not leak graphics state from .draw() 2016-03-13 13:30:27 +01:00
Matthias Richter
d0a1addc0b Move full state reset to enterFrame 2016-03-13 13:26:07 +01:00
Matthias Richter
c65c67cc63 Coding style changes 2016-03-13 13:24:39 +01:00
Matthias Richter
f9ee40d53d Patch #27: Cursor disappears when filling the input box 2016-03-13 13:22:51 +01:00
vrld
633c2a58cc Merge pull request #31 from rm-code/patch-1
Remove unused variable
2016-03-13 13:14:28 +01:00
vrld
0947b08ff7 Merge pull request #30 from tesselode/override-radius
Add more options to override theme properties
2016-03-13 13:13:57 +01:00
vrld
5a6da54467 Merge pull request #29 from tesselode/input-colors-fix
Fix an error when overriding the colors of an input widget
2016-03-13 13:12:46 +01:00
Robert Machmer
f4c8e9b393 Remove unused variable 2016-03-13 10:22:12 +01:00
Andrew Minnich
a4779092c1 Fix an error when overriding the colors of an input widget 2016-03-05 16:44:16 -05:00
Andrew Minnich
01f7cd88fb Add cornerRadius option to override theme corner radius 2016-03-05 16:20:43 -05:00
Andrew Minnich
5298f31d06 Have theme.drawBox take options argument
It can optionally still take a colors argument.
2016-03-05 16:13:04 -05:00
Matthias Richter
f02976d969 Remove debug printout in layout.lua 2016-01-16 03:09:36 +01:00
Matthias Richter
b37c35dc0a Add (not perfect) mouse interaction to input widget 2016-01-16 02:53:11 +01:00
Matthias Richter
4ac0f37097 Tweak theme: Larger space between checkbox and label 2016-01-16 02:35:12 +01:00
Matthias Richter
4f3d285218 Allow to overwrite draw function per widget 2016-01-16 02:33:41 +01:00
Matthias Richter
18880de088 Actually revert changes in :push() (commit 09a4583) 2016-01-16 02:26:05 +01:00
Matthias Richter
62b31ac719 Move computation of text offset from theme to input widget 2016-01-16 02:16:52 +01:00
Matthias Richter
09a458386c Revert change in :push(), remove :pos()
Revert signature if layout:push(x,y, padx,pady) to layout:push(x,y)
Makes it possible to use the idiomatic layout:push(layout:row()) again.
(layout:row() returns x,y, w,h of last cell)

Remove layout:pos([x,y]) because it's not needed and potentially confusing.
2016-01-16 02:08:36 +01:00
Matthias Richter
86cae4c03b Document changes 2016-01-12 21:49:21 +01:00
Matthias Richter
36c446cdcc Code cleanup, fix edge cases 2016-01-12 21:49:12 +01:00
Matthias Richter
fb7bed76f6 Add helper for nested layouts 2016-01-12 21:12:40 +01:00
Matthias Richter
946099e93d Fix mouse in rectangle test 2016-01-03 19:15:57 +01:00
Matthias Richter
cd88aa2008 Update readme 2016-01-03 18:52:41 +01:00
Matthias Richter
b0b2e6561d Fix #25 - Throw error when trying to construct an empty cell. 2016-01-03 18:47:52 +01:00
Matthias Richter
aca8a297bb Fix #17: Support multiple instances 2016-01-03 18:33:39 +01:00
vrld
f77ab8e5e8 Merge pull request #24 from WetDesertRock/patch-1
Better mobile integration (allows text input)
2016-01-03 14:52:36 +01:00
vrld
0992d70b62 Merge pull request #23 from Yonaba/patch-1
Fixed typo
2016-01-03 14:23:48 +01:00
WetDesertRock
315c250ffb Better mobile integration (allows text input) 2016-01-02 22:41:04 -08:00