Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual UI panels #525

Merged
merged 14 commits into from
Jan 29, 2023
Merged

Virtual UI panels #525

merged 14 commits into from
Jan 29, 2023

Conversation

guusw
Copy link
Member

@guusw guusw commented Jan 17, 2023

MVP for world space UI, tried to keep the PR as small as possible

  • Added basic world space UI rendering and input.
  • Added some basic documentation (reference/shards/VUI/Context/)

@guusw guusw marked this pull request as ready for review January 17, 2023 18:34
src/virtual_ui/context.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
src/gfx/egui/renderer.cpp Outdated Show resolved Hide resolved
src/virtual_ui/context.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #525 (27c19ed) into devel (a76b227) will decrease coverage by 0.05%.
The diff coverage is 78.18%.

@@            Coverage Diff             @@
##            devel     #525      +/-   ##
==========================================
- Coverage   81.40%   81.36%   -0.05%     
==========================================
  Files         235      243       +8     
  Lines       29650    30152     +502     
==========================================
+ Hits        24138    24534     +396     
- Misses       5512     5618     +106     
Impacted Files Coverage Δ
include/linalg_shim.hpp 91.11% <ø> (+8.88%) ⬆️
src/extra/gfx/shards_types.hpp 100.00% <ø> (ø)
src/gfx/checked_stack.hpp 66.66% <ø> (ø)
src/gfx/view_raycast.hpp 100.00% <ø> (ø)
src/input/input.hpp 92.59% <ø> (ø)
src/spatial/context.cpp 55.35% <55.35%> (ø)
src/spatial/panel.hpp 85.71% <85.71%> (ø)
src/extra/spatial/spatial.cpp 91.26% <91.26%> (ø)
src/gfx/egui/renderer.cpp 83.72% <93.93%> (+0.65%) ⬆️
src/core/exposed_type_utils.hpp 100.00% <100.00%> (ø)
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

src/tests/vui.edn Outdated Show resolved Hide resolved
docs/samples/shards/VUI/Context/1.edn Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
docs/details/shards/VUI/Context.md Outdated Show resolved Hide resolved
rust/src/shards/gui/raw_context.rs Outdated Show resolved Hide resolved
rust/src/shards/gui/raw_context.rs Outdated Show resolved Hide resolved
src/extra/egui/context.cpp Outdated Show resolved Hide resolved
src/extra/egui/pass.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
src/extra/vui/vui.cpp Outdated Show resolved Hide resolved
Also Rename Context => UI
@guusw
Copy link
Member Author

guusw commented Jan 24, 2023

Renamed to Spatial.UI & Panel

@Kryptos-FR
Copy link
Contributor

I have an issue with right-clicking. For some reason it doesn't work in debug but does in release (even after removing the FreeCamera which was capturing it to move the view). I don't have an easy reproduction case right now, as it needs to create a shard with ui that responds to the right-click specifically, which we don't have any example at the moment.

// in UI's shard activate
let mouse = &ui.ctx().input().pointer;
if mouse.secondary_released() {
  // do something
  shlog!("right mouse clicked");
}

@guusw
Copy link
Member Author

guusw commented Jan 25, 2023

Yes thanks for reminding, I'll fix that @Kryptos-FR

EDIT: I thought you meant the same issue you mentioned earlier with left click being stuck when moving the camera but this it slightly different, but maybe the same cause.

@guusw guusw merged commit 0a0e2b5 into devel Jan 29, 2023
@Kryptos-FR Kryptos-FR deleted the guus/virtual-ui branch January 30, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants