use concinnity_core::components::Sprite;
use concinnity_core::ecs::World;
use concinnity_core::ecs::asset_id::AssetId;
use crate::editor::hud_ids::{Family, family_base};
use crate::editor::widget;
pub(crate) const CURSOR: AssetId = AssetId(family_base(Family::Cursor));
const CURSOR_PX: f32 = 20.0;
const FILL: [f32; 4] = [0.95, 0.95, 0.97, 1.0];
pub(crate) fn sprite() -> (AssetId, Sprite) {
let cursor = Sprite {
follow_cursor: true,
width: CURSOR_PX,
height: CURSOR_PX,
tint: FILL,
visible: false,
..Default::default()
};
(CURSOR, cursor)
}
pub(crate) fn set_visible(world: &mut World, visible: bool) {
widget::set_sprite_visible(world, CURSOR, visible);
}