Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
Fix button ID's, all buttons will work now in lists, instead of just …
Browse files Browse the repository at this point in the history
…the top one
  • Loading branch information
FrankvdStam committed Nov 24, 2022
1 parent e2a5509 commit d63a3d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions soulmemory-rs/src/gui/event_flag_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ impl EventFlagWidget
{
ui.text(format!("{: >10}", self.excluded_flags[i].to_string()));
ui.same_line();

let id = ui.push_id(i as i32);
if ui.button("delete")
{
delete_flag_index = Some(i);
}
id.end();
}

if let Some(index) = delete_flag_index
Expand Down Expand Up @@ -127,10 +130,12 @@ impl EventFlagWidget
ui.text(format!("{: >5}", flag_val));
ui.same_line();

let id = ui.push_id(i as i32);
if ui.button("delete")
{
delete_flag_index = Some(i);
}
id.end();
}

if let Some(index) = delete_flag_index
Expand Down

0 comments on commit d63a3d9

Please sign in to comment.