fix: Improve button/pill_button UI element to allow any child
This commit is contained in:
@@ -2,7 +2,11 @@ use super::super::components::{ButtonType, RootMarker};
|
||||
use crate::prelude::GameConfig;
|
||||
use crate::{features::inventory::ui::list_itemstack, prelude::*};
|
||||
|
||||
pub fn open_inventory(commands: &mut Commands, items: Query<&ItemStack>, game_config: &Res<GameConfig>) {
|
||||
pub fn open_inventory(
|
||||
commands: &mut Commands,
|
||||
items: Query<&ItemStack>,
|
||||
game_config: &Res<GameConfig>,
|
||||
) {
|
||||
commands
|
||||
.spawn((
|
||||
RootMarker::Inventory,
|
||||
@@ -44,8 +48,7 @@ pub fn open_inventory(commands: &mut Commands, items: Query<&ItemStack>, game_co
|
||||
height: px(40),
|
||||
..default()
|
||||
},
|
||||
"X",
|
||||
24.0
|
||||
|color| text("X", 24.0, color)
|
||||
),
|
||||
],
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user