fix: Improve button/pill_button UI element to allow any child

This commit is contained in:
demenik
2025-12-01 14:26:16 +01:00
parent 7a608516eb
commit f908192c0e
8 changed files with 86 additions and 94 deletions

View File

@@ -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)
),
],
));