Skip to content

Commit

Permalink
Merge pull request #321 from AnthonyTornetta/317-hot-bar-numbers-are-…
Browse files Browse the repository at this point in the history
…hidden-by-their-items-model

Fixed UI camera order issues
  • Loading branch information
AnthonyTornetta authored Aug 23, 2024
2 parents 4bcfa4f + de68e29 commit 0ab13e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ See [the issues page](https://github.com/AnthonyTornetta/Cosmos/issues) for the
- [x] Absorb incoming damage
- [x] Inventory UI improvements
- [x] Scrollable inventory
- [ ] An interface into all the storage devices connected to it?
- [x] Escape functionality
- [x] Escape can now be used to close the foremost open UI menus
- [x] If no such menus are available, it will instead open the pause menu
Expand All @@ -93,9 +92,11 @@ See [the issues page](https://github.com/AnthonyTornetta/Cosmos/issues) for the
- [x] Speed display
- [x] Energy display
- [x] A way of selecting which systems to use preventing use of systems that are not meant to be actively used
- [ ] Wires
- [ ] Electrical
- [x] Wires
- [x] Logic
- [x] Logic blocks
- [x] Wiring system
- [x] Logic receivers
- [x] Planet generation & LOD overhaul
- [x] Performance improvements
- [x] GPU-based generation
Expand All @@ -104,6 +105,8 @@ See [the issues page](https://github.com/AnthonyTornetta/Cosmos/issues) for the
- [x] Update to bevy 0.14

## Release 0.0.7a
- [ ] Wires
- [ ] Electrical
- [ ] Galaxy map
- [ ] Able to view stars
- [ ] Zoom in to view planets
Expand Down
4 changes: 2 additions & 2 deletions cosmos_client/src/ui/hotbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
use super::{
components::show_cursor::no_open_menus,
item_renderer::{create_ui_cameras, RenderItem},
UiMiddleRoot, UiRoot,
UiMiddleRoot,
};

const ITEM_NAME_FADE_DURATION_SEC: f32 = 5.0;
Expand Down Expand Up @@ -398,7 +398,7 @@ fn populate_hotbar(
}
}

fn add_hotbar(mut commands: Commands, q_target_camera: Query<Entity, With<UiRoot>>, asset_server: Res<AssetServer>) {
fn add_hotbar(mut commands: Commands, q_target_camera: Query<Entity, With<UiMiddleRoot>>, asset_server: Res<AssetServer>) {
let target_cam = q_target_camera.single();

commands
Expand Down
6 changes: 3 additions & 3 deletions cosmos_client/src/ui/item_renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub(crate) fn create_ui_cameras(mut commands: Commands) {
camera: Camera {
order: 2,
clear_color: ClearColorConfig::Custom(Color::NONE),
hdr: false,
hdr: true, // Transparent stuff fails to render properly if this is off - this may be a bevy bug?
..Default::default()
},
transform: Transform::from_xyz(0.0, 0.0, 1.0).looking_at(Vec3::ZERO, Vec3::Y),
Expand Down Expand Up @@ -233,8 +233,8 @@ fn render_items(
};

let render_layer = match render_layer {
Some(ItemRenderLayer::Top) | None => INVENTORY_SLOT_LAYER,
Some(ItemRenderLayer::Middle) => MIDDLE_INVENTORY_SLOT_LAYER,
Some(ItemRenderLayer::Top) => INVENTORY_SLOT_LAYER,
Some(ItemRenderLayer::Middle) | None => MIDDLE_INVENTORY_SLOT_LAYER,
};

// Clear out any materials that were previously on this entity from previous renders
Expand Down

0 comments on commit 0ab13e5

Please sign in to comment.