Improve identification of Overlays
This commit is contained in:
parent
bb9928129d
commit
a13ae86dd6
|
@ -413,12 +413,24 @@ impl ConsoleUI {
|
||||||
|
|
||||||
let section_list = List::new(data.section_info.iter().map(
|
let section_list = List::new(data.section_info.iter().map(
|
||||||
|section| {
|
|section| {
|
||||||
let mut new_item = ListItem::new(section.name.clone());
|
ListItem::new(Line::from(vec![{
|
||||||
|
|
||||||
if let Some(color) = section.color_share {
|
if let Some(color) = section.color_share {
|
||||||
new_item = new_item.style(Style::default().fg(color));
|
Span::styled("*", Style::default().fg(color))
|
||||||
}
|
}
|
||||||
new_item
|
else {
|
||||||
|
Span::raw("")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Span::raw(
|
||||||
|
if section.is_global {
|
||||||
|
String::from("<GLOBAL>")
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
section.name.clone()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]))
|
||||||
}).collect::<Vec<_>>()).style(Style::default().fg(Color::White))
|
}).collect::<Vec<_>>()).style(Style::default().fg(Color::White))
|
||||||
.block(Self::create_default_border("Section"))
|
.block(Self::create_default_border("Section"))
|
||||||
.highlight_style(Style::default().add_modifier(Modifier::REVERSED|Modifier::BOLD));
|
.highlight_style(Style::default().add_modifier(Modifier::REVERSED|Modifier::BOLD));
|
||||||
|
@ -547,6 +559,7 @@ impl ConsoleUIData {
|
||||||
size: program_size,
|
size: program_size,
|
||||||
max_size: Self::RAM_SIZE,
|
max_size: Self::RAM_SIZE,
|
||||||
color_share: None,
|
color_share: None,
|
||||||
|
is_global: true
|
||||||
});
|
});
|
||||||
|
|
||||||
for section in memory_map.sections {
|
for section in memory_map.sections {
|
||||||
|
@ -557,6 +570,7 @@ impl ConsoleUIData {
|
||||||
size: section.size,
|
size: section.size,
|
||||||
max_size: program_size,
|
max_size: program_size,
|
||||||
color_share: None,
|
color_share: None,
|
||||||
|
is_global: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +608,8 @@ struct SectionInfo {
|
||||||
pub start_adr: u64,
|
pub start_adr: u64,
|
||||||
pub size: usize,
|
pub size: usize,
|
||||||
pub max_size: usize,
|
pub max_size: usize,
|
||||||
pub color_share: Option<Color>
|
pub color_share: Option<Color>,
|
||||||
|
pub is_global: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SectionInfo {
|
impl SectionInfo {
|
||||||
|
|
Loading…
Reference in New Issue