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