.describe() for Intrinsics, for use in tooltips later
This commit is contained in:
parent
190543a361
commit
b5743819ec
2 changed files with 34 additions and 0 deletions
|
|
@ -111,6 +111,12 @@ pub fn draw_tooltips(ecs: &World, ctx: &mut BTerm, xy: Option<(i32, i32)>) {
|
|||
if position.x == mouse_pos_adjusted.0 && position.y == mouse_pos_adjusted.1 {
|
||||
let mut tip = Tooltip::new();
|
||||
tip.add(crate::gui::obfuscate_name_ecs(ecs, entity).0, renderable.fg);
|
||||
let intrinsics = ecs.read_storage::<crate::components::Intrinsics>();
|
||||
if let Some(intrinsics) = intrinsics.get(entity) {
|
||||
if !intrinsics.list.is_empty() {
|
||||
tip.add(intrinsics.describe(), RGB::named(WHITE));
|
||||
}
|
||||
}
|
||||
// Attributes
|
||||
let attr = attributes.get(entity);
|
||||
if let Some(a) = attr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue