Skip to content

Commit

Permalink
Add radio group widget type
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Sep 6, 2024
1 parent 6b7f431 commit fd4f366
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/egui/src/data/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ impl WidgetInfo {
WidgetType::Button => "button",
WidgetType::Checkbox => "checkbox",
WidgetType::RadioButton => "radio",
WidgetType::RadioGroup => "radio group",
WidgetType::SelectableLabel => "selectable",
WidgetType::ComboBox => "combo",
WidgetType::Slider => "slider",
Expand Down
3 changes: 3 additions & 0 deletions crates/egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ pub enum WidgetType {

RadioButton,

/// A group of radio buttons.
RadioGroup,

SelectableLabel,

ComboBox,
Expand Down
1 change: 1 addition & 0 deletions crates/egui/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,7 @@ impl Response {
}
WidgetType::Checkbox => Role::CheckBox,
WidgetType::RadioButton => Role::RadioButton,
WidgetType::RadioGroup => Role::RadioGroup,
WidgetType::SelectableLabel => Role::Button,
WidgetType::ComboBox => Role::ComboBox,
WidgetType::Slider => Role::Slider,
Expand Down

0 comments on commit fd4f366

Please sign in to comment.