Commit Graph
100 Commits
Author SHA1 Message Date
Emil Ernerfeldt fa831a2b55 Fix throwing areas around 2020-10-23 15:07:19 +02:00
Emil Ernerfeldt 6bbdf08482 [refactor] Split DemoWindows out of demos::DemoApp 2020-10-19 23:06:11 +02:00
Emil Ernerfeldt 8ccc36937f [egui_glium] Add option not to persist app to file 2020-10-19 20:25:05 +02:00
Emil Ernerfeldt 43813a71eb [app] Add egui::app::DummyStorage 2020-10-19 20:12:14 +02:00
Emil Ernerfeldt 7f8564b27a Expand and clarify project goals 2020-10-18 15:42:49 +02:00
Emil Ernerfeldt 222f534713 Add links to wgpu and winit integrations 2020-10-18 15:42:29 +02:00
Emil Ernerfeldt 12d387d7f5 Replace term "backend" with "integration" 2020-10-18 15:41:52 +02:00
Emil Ernerfeldt 92cfbe643c Add #![forbid(unsafe_code)] and safety badge 2020-10-18 15:40:23 +02:00
Emil Ernerfeldt b8642b4db4 Do less rounding of positions to pixel boundaries
Fixes https://github.com/emilk/egui/issues/27
2020-10-18 14:47:12 +02:00
Emil Ernerfeldt a4e19d7207 [app] Add demo app slider to change scale of all of Egui 2020-10-17 23:54:46 +02:00
Emil Ernerfeldt 251cde60f0 [app] Refactor egui::app::App interface to be more data oriented 2020-10-17 16:13:20 +02:00
Emil Ernerfeldt e56924dc4f Add check.sh helper 2020-10-17 11:03:10 +02:00
Emil Ernerfeldt 4e0ea32d99 fix clippy issues 2020-10-17 11:02:51 +02:00
Emil Ernerfeldt 4fc34cca45 [demo] Show detailed memory usage statistics of paint lists 2020-10-17 10:57:25 +02:00
Emil Ernerfeldt 570860ec5f [refactor] Create helper struct Mutex (with double-lock detection) 2020-10-17 10:38:22 +02:00
Emil Ernerfeldt 73dc3484ae [refactor] Separate space allocation from cursor advancement 2020-10-12 08:50:06 +02:00
Emil Ernerfeldt f0a45f5055 [refactor] Simplify Context with new struct Options 2020-10-12 08:49:01 +02:00
Emil Ernerfeldt ad4f87831b [refactor] Make Ui lighter by using a clone-on-write Arc<Style> 2020-10-12 03:22:41 +02:00
Emil Ernerfeldt 4fab4b30a3 [egui_web] Publish new web demo 2020-10-10 14:12:40 +02:00
Emil Ernerfeldt a0b8f83846 cargo update 2020-10-10 14:01:03 +02:00
Emil Ernerfeldt 42b433a204 [release] bump version numbers to 0.2.0 2020-10-10 14:00:07 +02:00
Emil Ernerfeldt 12afc356ee Misc code cleanup: use more ui.checkbox, ui.label, ui.button etc 2020-10-10 13:04:40 +02:00
Emil Ernerfeldt 5c469551df Switch argument order of ui.checkbox and ui.radio
`bool, text` is the more logical order, as it

* matches the visuals: `[x] text`
* puts the important part first
* more natually allows us to extend to checkboxes without a text
2020-10-10 12:49:02 +02:00
Emil Ernerfeldt a2e8d1d32c [demo] Add compact version of the toggle_switch demo code 2020-10-10 12:33:48 +02:00
Emil Ernerfeldt 343648b94c [refactor] remove Ui::canvas (use Ui::allocate_space instead) 2020-10-10 12:25:01 +02:00
Emil Ernerfeldt b01690c7b8 [culling] coarse culling of text lines, circles and boxes 2020-10-10 12:25:01 +02:00
Emil Ernerfeldt 9874921d06 [bench] benchmark demo app when everything is open 2020-10-10 12:19:36 +02:00
Emil Ernerfeldt f30b354f77 [culling] Add debug option to ignore clip rectangles 2020-10-10 11:39:39 +02:00
Emil Ernerfeldt 2615d1bce1 Remove Rect::default() since there is no sensible default rectangle 2020-10-10 08:03:38 +02:00
Emil Ernerfeldt adec27a7dd fix: clip_rect of combo box popup 2020-10-10 07:54:59 +02:00
Emil Ernerfeldt 8c17b45439 [demo] shorter toggle_switch code 2020-10-10 07:54:54 +02:00
Emil Ernerfeldt c6fd30ea13 fix clippy issue 2020-10-08 22:24:55 +02:00
Emil Ernerfeldt 9f6301e121 Add logarithmic sliders to CHANGELOG.md 2020-10-08 22:24:42 +02:00
Emil Ernerfeldt 3f345b5963 Ui: clean up min_rect/max_rect related functions 2020-10-08 22:24:27 +02:00
Emil Ernerfeldt dbbe1cf063 Update to glium 0.28 2020-10-08 16:23:47 +02:00
Emil Ernerfeldt 3444666806 cargo update 2020-10-08 16:19:33 +02:00
Emil Ernerfeldt 8ff0bed259 [slider] Logarithmic sliders with support for zero and infinity
Logarithmic sliders will intelligently help you pick a good range
even if you inlcude zero or infinity. They also support crossing
the zero value, so you can have a slider span -INF to +INF.

The sliders now also supports reversed sliders (large -> small).
2020-10-07 09:59:49 +02:00
Emil Ernerfeldt d5d8eeb172 [slider] use f64 internally for increased precision 2020-10-06 21:03:47 +02:00
Emil Ernerfeldt a49cba54ac [math] make lerp, remap and remap_clamp work for both f32 and f64 2020-10-06 20:51:59 +02:00
Emil Ernerfeldt 7a71ac1a95 Rename tooltip_text to on_hover_text 2020-10-01 22:53:11 +02:00
Emil Ernerfeldt 5cba44eaa8 Clean up various small TODOs 2020-10-01 22:40:49 +02:00
Emil Ernerfeldt 6fcfb52aa0 [demo] add frame time graph to demo app 2020-10-01 22:25:44 +02:00
Emil Ernerfeldt 1156525ce9 [clippy] fixes 2020-10-01 16:56:40 +02:00
Emil Ernerfeldt 908d1d0c08 [refactor] Ui: rename child_bounds to min_rect, desired_rect to max_rect 2020-09-27 11:43:44 +02:00
Emil Ernerfeldt 43bb670c0c [layout] correct handling of cursor position w.r.t. reversed layouts 2020-09-26 10:06:06 +02:00
Emil Ernerfeldt 8cbf90442b remove ui.vertical_centered 2020-09-26 07:52:24 +02:00
Emil Ernerfeldt aad0391fef remove Ui::set_layout 2020-09-26 07:52:24 +02:00
Emil Ernerfeldt d8021843f8 [menu] simplify menu interactions, fixing an annoying bug 2020-09-25 15:31:27 +02:00
Emil Ernerfeldt 22fffc1793 [widgets] combo box (drop down menu) 2020-09-25 15:30:16 +02:00
Emil Ernerfeldt b081be11d1 [spacing] simplify and tweak spacing 2020-09-25 11:41:47 +02:00
Emil Ernerfeldt 2164e37e39 [refactor] make sure we show all input members in introspection window 2020-09-23 09:03:18 +02:00
Emil Ernerfeldt b77151fb64 remove seconds_from_midnight from core egui input
It is only used by demo app, and so does not belong to egui proper.
Instead it is now passed as part of a DemoEnvironment
2020-09-23 08:57:23 +02:00
Emil Ernerfeldt b84642374b [docs] improve README.md section about writing your own backends 2020-09-21 19:23:22 +02:00
Emil Ernerfeldt 6e7507373a [egui_glium] clean up the code for the glium OpenGL painter 2020-09-21 19:19:24 +02:00
Emil Ernerfeldt deb1c33760 [style] visual tweaks 2020-09-20 09:24:09 +02:00
Emil Ernerfeldt 2c611292ff [style] more spacious, more alignmnet, more readable 2020-09-19 09:55:20 +02:00
Emil Ernerfeldt 05316b7045 [refactor] move DragValue to own file drag_value.rs 2020-09-18 23:59:35 +02:00
Emil Ernerfeldt dd8c298cb5 refactor space allocation code 2020-09-18 23:48:08 +02:00
Emil Ernerfeldt 283b4ab63d [layout] remove ui.horizontal_centered and make centering the default 2020-09-18 23:41:49 +02:00
Emil Ernerfeldt 4df8def9e2 [layout] change clickable_diameter: f32 to interact_size: Vec2 2020-09-18 23:41:34 +02:00
Emil Ernerfeldt 85a67ab15e [refactor] introduce NumExt with at_least and at_most
`x.min(maxumim)` can be confusing but `x.at_most(maximum)` is very clear
2020-09-18 17:49:39 +02:00
Emil Ernerfeldt c25d4ff70a [egui_web] publish new web demo 2020-09-13 22:08:50 +02:00
Emil Ernerfeldt e30a9c1196 [window/resize] add Resize::max_width and fix bug with fixed_size 2020-09-13 22:07:55 +02:00
Emil Ernerfeldt f8bc4d38e8 [refactor] break up demo code into smaller files 2020-09-13 21:54:31 +02:00
Emil Ernerfeldt 8b4f96ffb2 [refactor] move math.rs to math/mod.rs, and same for all other egui mods 2020-09-13 21:23:35 +02:00
Emil Ernerfeldt adc6a225e3 [frame] bug fix: move cursor after a Frame 2020-09-13 19:02:25 +02:00
Emil Ernerfeldt 6904938594 Compilation fix 2020-09-13 15:41:16 +02:00
Emil Ernerfeldt 814121903a remove Label::auto_shrink and replace with ui.shrink_width_to_current() 2020-09-13 09:30:52 +02:00
Emil Ernerfeldt 1069ad8496 add color test window to troubleshoot your Egui painter backend
egui_glium passes the test, but the egui_web WebGL painter fails it.
2020-09-13 09:28:54 +02:00
Emil Ernerfeldt d49aec4079 Add user texture support to egui_glium and egui_web backends 2020-09-11 18:54:57 +02:00
Emil Ernerfeldt 02ef0cd9d5 [user textures] Add custom texture/image support
* Each Traingles mesh comes with a TextureId
* ui.image(...) to show an image/texture
* Up to backend what to do with user textures
2020-09-11 18:54:57 +02:00
Emil Ernerfeldt 13060d495b [user texture] change uv to normalized texture coords in 0-1 range 2020-09-09 17:14:42 +02:00
Emil Ernerfeldt db2afadc76 [lint] TODO.md markdownlint 2020-09-09 17:13:02 +02:00
Emil Ernerfeldt 0ea3a53d97 [font] texture atlas: add one pixel of padding for old GPUs 2020-09-09 15:24:44 +02:00
Emil Ernerfeldt 8984302122 [user textures] switch WHITE_UV to (0,0) and require clamped sampling 2020-09-09 15:24:09 +02:00
Emil Ernerfeldt 7093de0ff2 [docs] clean up README.md 2020-09-09 15:19:30 +02:00
Emil Ernerfeldt bb367752cf [text] support non-latin characters by dynamically adding them to atlas 2020-09-09 14:33:30 +02:00
Emil Ernerfeldt 0e870dae3e [refactor] rename Texture::id to version 2020-09-09 13:32:40 +02:00
Emil Ernerfeldt d959f71d12 [text] add benchmark for text layout 2020-09-09 12:41:59 +02:00
Emil Ernerfeldt 672ffb6cd6 [test] add e2e egui test 2020-09-09 12:14:53 +02:00
Emil Ernerfeldt 23d99b07c8 [bug fix] assume pixels_per_point=1 if nothing is ever set 2020-09-09 12:14:21 +02:00
Emil Ernerfeldt bc0d6baefb [color-picker] edit your own (s)RGBA arrays
Both with and without premultiplied alpha
2020-09-09 11:24:37 +02:00
Emil Ernerfeldt b9a3240ca3 Bump Egui version to 0.1.4 2020-09-08 09:47:42 +02:00
Emil Ernerfeldt 6907e747c6 [web] publish new web demo build 2020-09-08 09:45:31 +02:00
Emil Ernerfeldt 278268768d fix web/wasm build 2020-09-08 09:44:40 +02:00
Emil Ernerfeldt ef5eb4a465 cargo update 2020-09-08 09:27:20 +02:00
Emil Ernerfeldt 97ca69e90e Update TODO.md 2020-09-08 09:19:40 +02:00
Emil Ernerfeldt 9578773613 [style] tweak style, and refactor struct Style 2020-09-08 09:17:08 +02:00
Emil Ernerfeldt d8e0b3bff6 [color] add HSV-based color picker for struct Srgba 2020-09-06 21:30:52 +02:00
Emil Ernerfeldt fc3582fbe1 [color] add HSVA conversion 2020-09-06 21:21:53 +02:00
Emil Ernerfeldt 847f18248f clippy fix 2020-09-06 07:49:49 +02:00
Emil Ernerfeldt a9fd7537c2 [DragValue] add optional range 2020-09-06 07:07:02 +02:00
Emil Ernerfeldt 938c847c6e [math] bug fix: allow inverted range in remap_clamp 2020-09-06 07:04:47 +02:00
Emil Ernerfeldt c26b3069e0 Fix a clippy nit 2020-09-06 06:58:40 +02:00
Emil Ernerfeldt 6ca11aff8c [refactor] use "fg_" prefix in WidgetStyle 2020-09-05 13:30:04 +02:00
Emil Ernerfeldt 2c96cbfa9c [dependencies] turn off optional ahash features to reduce dependencies 2020-09-03 23:04:19 +02:00
Emil Ernerfeldt dc40a5d31d [refactor] represent colors with arrays 2020-09-02 22:04:10 +02:00
Emil Ernerfeldt 9823e4d63c [refactor] Add Triangles::colored_vertex helper 2020-09-02 21:52:43 +02:00
Emil Ernerfeldt e8713bbb71 [widgets] DragValue can now be used with some integers 2020-09-02 06:05:48 +02:00
Emil Ernerfeldt ecd68f4faa [refactor] combine stroke_color and stroke_width in WidgetStyle 2020-09-02 01:36:52 +02:00