Commit graph

73 commits

Author SHA1 Message Date
Jonathan Johnson
8d3a4a42cf
Updating Kludgine
This fixes a few issues, the most important being a crash when a window
is minimized
2023-12-22 12:18:04 -08:00
Jonathan Johnson
6b33b0f686
Fixed reference cyle in ManagedWidget 2023-12-22 09:51:06 -08:00
Jonathan Johnson
564b9e5a96
Added comments to multi-window
Also made it open a second window before startup
2023-12-21 15:41:34 -08:00
Jonathan Johnson
f1a2a711ff
Multi-window support
Closes #91

There's some details to still figure out, which are in new issues:

- #109: When opening a window, no handle is returned that gives access to the
  window from the opener. Technically this can all be wired up manually,
  with exception of requeesting the window close.
- #107: How can a window close itself? Once we have a handle type, we still
  need a mechanism to allow a button on a window request that the window
  closes gracefully. The examples that currently close the window
  call exit instad.
2023-12-21 14:57:29 -08:00
Jonathan Johnson
4e145d7f35
Removed UnwindSafe bounds
appit wasn't supposed to pass along this requirement
2023-12-20 11:35:19 -08:00
Jonathan Johnson
9aaf22c903
Preparing v0.1.3 2023-12-19 16:45:51 -08:00
Jonathan Johnson
a79d2f7d58
Updated Kludgine 2023-12-19 14:55:06 -08:00
Jonathan Johnson
75eb96b5f5
Preparing v0.1.2 2023-12-18 17:15:21 -08:00
Jonathan Johnson
a1e3082527
Fixing compilation on Windows
Condvar isn't UnwindSafe on Windows either. See
rust-lang/rust#118009
2023-12-18 17:10:04 -08:00
Jonathan Johnson
7dc00f27e0
Fixing links in readme
I somehow lost my variables at some point.
2023-12-18 11:40:45 -08:00
Jonathan Johnson
5be40e7271
Preparing gooey-macros for publish 2023-12-18 11:25:38 -08:00
Jonathan Johnson
62ad57b17f
Updating to released kludgine/figures/appit 2023-12-18 11:18:43 -08:00
Jonathan Johnson
4a68fa08f8
Updated README and Cargo.toml
Also removed example that wasn't ever completed.
2023-12-18 09:56:37 -08:00
Jonathan Johnson
02d6b343f1
Widget docs + refactoring
- MakeWidgetWithId::make_with_id -> MakeWidgetWithTag::make_With_tag
- ManagedWidget -> MountedWidget
- *_refresh -> *_redraw, standardized on terminology
- get_tracked -> get_tracking_redraw
2023-12-17 07:38:31 -08:00
Jonathan Johnson
7ae4374411
ColorSource picker 2023-12-15 14:01:31 -08:00
Jonathan Johnson
d7d06e41fa
Fixing various mouse selection bugs
Realized that I was skipping invisible glyphs during construction of
MeasuredText. Once those were in, most of the issues vanished. A few
small tweaks and now it works surprisingly well.
2023-12-14 19:59:27 -08:00
Jonathan Johnson
353db9dc39
Added Opacity component
Closes #87
2023-12-13 14:02:39 -08:00
Jonathan Johnson
1ea9938198
Fixing style inheritance 2023-12-13 12:51:43 -08:00
Jonathan Johnson
a7efe9a3d5
Container Shadows 2023-12-12 13:49:03 -08:00
Jonathan Johnson
87fa4a3478
Moved arc path generation to Kludgine 2023-12-10 15:43:02 -08:00
Jonathan Johnson
c4151d649c
Added Spinner widget
Closes #80
2023-12-10 15:05:59 -08:00
Jonathan Johnson
35576f9214
Image widget
Closes #23

(Feels good to close a 3 year old issue!)
2023-12-09 13:18:46 -08:00
Jonathan Johnson
95555ce928
Tilemap updates 2023-12-09 08:20:18 -08:00
Jonathan Johnson
16af20269e
Updated figures + kludgine 2023-12-07 15:49:03 -08:00
Jonathan Johnson
2fe08fc9e9
Added hover support to OverlayLayer 2023-12-07 09:51:07 -08:00
Jonathan Johnson
9ee00106a3
Updated alot + Eq for CallbackHandle 2023-12-02 06:51:19 -08:00
Jonathan Johnson
3f8885efbe
Callback handles are now managed
Installing a callback now returns a CallbackHandle. All map-style APIs
install this handle automatically on the created dynamic, which keeps
the callback installed until the dynamic is freed. All other APIs
return the handle for the caller to either call persist() or store
somewhere.

Now, the dynamic system can be used for application-long data with
almost no fear of leaking data due to how callbacks are being installed.
Technically cycles are still possible by moving clones into the
callbacks, so a WeakDynamic type might be worth exposing.
2023-12-01 13:31:42 -08:00
Jonathan Johnson
d23226ffe6
Updating kempt 2023-11-29 14:31:25 -08:00
Jonathan Johnson
273aac65bb
Merge branch 'main' into feature/world-coords 2023-11-26 19:11:49 -08:00
Jonathan Johnson
46a0758d09
Vertical sliders/progress bars
Also fixed checkbox layout after Label no longer pads itself.
2023-11-21 20:41:56 -08:00
Jonathan Johnson
2201f2c83b
Ranged sliders, advance_focus, allow_blur
Closes #60

Stepping in sliders is a compromise due to the flexibility of the
current slider implementation. I don't want to force types to implement
Add, and I don't like forcing types to require a Step (ie, what's the
appropriate value for f32 to specify as its next value?). Using a
percentage combined with lerp keeps the implementation fairly
straightfoward, although I remember experiencing this type of
configuration in another UI framework a long time ago and thinking it
was a little annoying to work with.

Ultimately, setting actual step boundaries can be done by customizing
the type that the slider is operating over. I feel like that's a much
more powerful design than I've experienced in previous frameworks, so
I'm hoping this percent step behavior is a reasonable compromise.
2023-11-20 19:44:03 -08:00
Jonathan Johnson
9c1c77f9b1
Updated winit 2023-11-20 06:32:58 -08:00
Jonathan Johnson
ca58cb5fcf
Fixing password field clicking 2023-11-19 15:38:26 -08:00
Jonathan Johnson
9403e85901
MSAA + outlines are now inset
Inset outlines may not be the right approach, but it simplifies
potential alignment issues caused by insetting all filled background
drawing by half the width of the focus ring.
2023-11-19 14:29:21 -08:00
Jonathan Johnson
d5bde44e27
Subpixels + Feathering + figures refactor
Much curves
2023-11-19 10:34:06 -08:00
Jonathan Johnson
aea9def07d
Rounded rect drawing 2023-11-18 14:45:02 -08:00
Jonathan Johnson
8ae315e229
Drawing refactor from Kludgine 2023-11-17 08:07:37 -08:00
Jonathan Johnson
c39f8f33ad
Rewrote text input
Also implemnted secure/masked input

Closes #58
2023-11-16 15:34:26 -08:00
Jonathan Johnson
a8841e6f1c
Merge branch 'main' into feature/world-coords 2023-11-15 18:45:39 -08:00
Jonathan Johnson
1ed1a95a1d
Input copy/paste works now
Also updated to wgpu 0.18.1
2023-11-15 14:25:59 -08:00
Jonathan Johnson
54e01f1911
Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
Roland Fredenhagen
aec768617a
derive(LinearInterpolate) on enum 2023-11-14 20:03:30 +01:00
Jonathan Johnson
a04619a279
Layout caching, Lerp underflow fix, label fix 2023-11-14 07:38:39 -08:00
Togglebit
1d80f8467c removed comment 2023-11-14 08:23:09 +01:00
Togglebit
bb5a0a2ab2 fixed cargo.lock issue with rustix, removed duplicate methods from merge 2023-11-14 08:20:41 +01:00
Togglebit
fd362c7341 world coords and hover state for tilemap (this is very much debug) 2023-11-14 08:06:08 +01: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
ee3813f44d
Switcher, h/v expand 2023-11-13 09:14:38 -08:00
Roland Fredenhagen
ea89531d00
make workspace 2023-11-13 17:03:53 +01:00
Roland Fredenhagen
4a4578bdd6
button outline without drawing 2023-11-13 17:03:51 +01:00