Commit graph

54 commits

Author SHA1 Message Date
Jonathan Johnson
4668db3983
New slider example showing min/max 2023-11-14 11:27:04 -08:00
Jonathan Johnson
4c7c3be5ba
Helpers galore 2023-11-14 09:31:56 -08:00
Jonathan Johnson
ca81c3702c
Updating examples 2023-11-14 08:02:31 -08:00
Jonathan Johnson
a04619a279
Layout caching, Lerp underflow fix, label fix 2023-11-14 07:38:39 -08:00
Jonathan Johnson
cc7d4bac45
Merge pull request #74 from ModProg/button-fun
button outline without drawing
2023-11-13 16:29:41 -08:00
Jonathan Johnson
b1ae9efae2
ColorScheme[Builder] 2023-11-13 16:28:20 -08:00
Jonathan Johnson
40343e163f
Scroll fixes, resize helpers 2023-11-13 11:30:45 -08:00
Jonathan Johnson
ee3813f44d
Switcher, h/v expand 2023-11-13 09:14:38 -08:00
Roland Fredenhagen
4fa5be0cec
remove in_columns and in_rows again 2023-11-13 17:05:30 +01:00
Roland Fredenhagen
7467f6408e
working outline 2023-11-13 17:03:53 +01:00
Jonathan Johnson
96d407ddc2
Container, query_parent_style 2023-11-12 13:37:32 -08:00
Jonathan Johnson
849710dbb1
Diverging from material
Introducing two new colors:

- ColorTheme::color_dim, for dimmed/disabled primary colors
- SurfaceTheme::opaque_widget, for buttons.

In material design, a button's background color uses the Highest
Container role, which seems incorrect because then buttons wouldn't have
a different color when placed inside of the highest level container.

Rather than remove a container level, I added one more tone using the
neutral variant.

Other changes are just gut feelings to have a slightly richer dark
theme. I feel like material is a little muddy in dark mode.
2023-11-12 07:55:28 -08:00
Jonathan Johnson
6220394df2
Merge branch 'main' into button-fun 2023-11-11 20:18:06 -08:00
Jonathan Johnson
d07dcdc9aa
Paired dynamics are now possible
Also sliders look better
2023-11-11 16:51:07 -08:00
Roland Fredenhagen
83cb88925a
Make button take MakeWidget 2023-11-12 00:38:43 +01:00
Jonathan Johnson
019412543c
Lerp for ThemeMode 2023-11-11 13:47:35 -08:00
Jonathan Johnson
27d5baef5d
ThemeMode 2023-11-11 13:41:34 -08:00
Jonathan Johnson
68339dfb62
Scroll fixes 2023-11-11 10:23:24 -08:00
Jonathan Johnson
eb4b24f4a9
Slider 2023-11-11 09:42:53 -08:00
Jonathan Johnson
d844a44b33
Refactored LabelBackground to WidgetBackground 2023-11-10 18:15:45 -08:00
Jonathan Johnson
81f6f8c4d3
Theme example reacts 2023-11-10 18:11:31 -08:00
Jonathan Johnson
89dcffdda7
Added theme visualizer example
A very good test of the stack widget.
2023-11-10 13:26:44 -08:00
Jonathan Johnson
e683b7d31f
fill(), expand at root, Space::colored 2023-11-10 12:20:56 -08:00
Jonathan Johnson
724f6d7b18
Resize now accepts ranges, Window honors Resize
Closes #62, Closes #63
2023-11-09 14:54:41 -08:00
Jonathan Johnson
1714948174
Styles are now reactive 2023-11-09 10:42:56 -08:00
Jonathan Johnson
a2e28cb522
Dynamic::take, align helpers, scroll fix
Scroll was previously taking the graphics region as its control size as
opposed to the constraints. This was due to this code originally living
in redraw. This fixes scroll areas being able to scroll their contents
fully when sharing window space with other widgts.
2023-11-09 10:04:09 -08:00
Jonathan Johnson
58b98a9a16
LinearInterpolation now requires PartialEq
This also means that if an animation is animating over discrete values
and the actual value has not changed, the Dynamic will no longer detect
a change because it's now using update instead of set.
2023-11-09 07:46:02 -08:00
Jonathan Johnson
a818cc41fd
TileMap focus, Style helpers 2023-11-09 06:58:58 -08:00
Jonathan Johnson
22fb955dca
More combinators
Maybe I went overboard.
2023-11-08 20:10:01 -08:00
Jonathan Johnson
ad57e02e4f
Generic ForEach/MapEach 2023-11-08 15:32:51 -08:00
Jonathan Johnson
747813f6b8
Button.enabled 2023-11-08 12:37:58 -08:00
Jonathan Johnson
a8cd3df22c
Better Input keyboard event handling 2023-11-08 11:21:45 -08:00
Jonathan Johnson
bf9836a82b
Default + Cancel widgets 2023-11-08 11:03:17 -08:00
Jonathan Johnson
fc165628e5
Input no longer blinks in the background
Also, Expand now expands properly.
2023-11-08 08:44:16 -08:00
Jonathan Johnson
8a2dae3f76
Next-focus progress
gameui no longer needs next_focus for the input to be focused
automatically
2023-11-07 08:39:35 -08:00
Jonathan Johnson
fbf6134a0a
Initial window focus 2023-11-06 06:19:41 -08:00
Jonathan Johnson
0f6d3838b1
LayoutContext
measure() now is layout(). LayoutContext can either persist layout
information or be used temporarily for measurement. While this caching
is constantly thrown out currently, this is a step towards being able to
only re-layout widgets if they've been invalidated.
2023-11-05 11:50:59 -08:00
Jonathan Johnson
126b324b55
Animation docs, on_complete 2023-11-03 09:37:22 -07:00
Jonathan Johnson
501eecd7a5
Async, better scroll, Input::on_key 2023-11-03 07:15:34 -07:00
Jonathan Johnson
0026a6db0d
Resize/Expand rework + basic readme 2023-11-02 14:23:36 -07:00
Jonathan Johnson
a95a7dc850
Spacing widget 2023-11-02 10:09:03 -07:00
Jonathan Johnson
ed31805693
Tuple animations 2023-11-02 07:48:30 -07:00
Jonathan Johnson
64f46a46e2
Button animations, hover fixes, ComponentType 2023-11-01 20:11:05 -07:00
Jonathan Johnson
6b8e5f886b
Update scroll example + work around cosmic_text
I decided scrolling a label would work better, so I loaded a source file
and noticed it wasn't rendering quite right in the label. It turns out
that the text wrapping was triggering despite the width in redraw being
the same as the measured amount. In short: sometimes the width I measure
can't be the width I set as the cosmic_text::Buffer size, because it
will cause it to wrap.

I've worked around it by caching the measured text for now. But it may
still show up in other situations and may require a more generalized
fix by seeing what else we can gleam from the glyphs being measured.
2023-11-01 15:43:56 -07:00
Jonathan Johnson
79be9a063b
Scroll and Animations
Scroll is only working to the absolute barest of requirements.
2023-11-01 15:15:14 -07:00
Jonathan Johnson
93a9545cc4
Renamed Array to Stack 2023-10-30 21:41:14 -07:00
Jonathan Johnson
c9c4c9aeed
Documentation 2023-10-30 21:12:04 -07:00
Jonathan Johnson
04e5381187
Added Tick to TileMap 2023-10-29 08:41:50 -07:00
Jonathan Johnson
6acaf7ed1c
Added tilemap example 2023-10-27 15:30:37 -07:00
Jonathan Johnson
90593e1938
Updates for Kludgine text refactor 2023-10-27 14:23:42 -07:00