1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-16 14:18:46 +02:00

remove nullable ref types

This commit is contained in:
Monniasza 2023-09-06 08:47:20 +02:00
parent f19a4178d2
commit a14310c132
12 changed files with 15 additions and 4 deletions

Binary file not shown.

BIN
.vs/MLEM/v17/.futdcache.v2 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\MLEM.sln",
"PreviewInSolutionExplorer": false
}

View file

@ -26,8 +26,8 @@ namespace MLEM.Ui.Elements {
/// <param name="size">The radio button's size</param>
/// <param name="label">The label to display next to the radio button</param>
/// <param name="defaultChecked">If the radio button should be checked by default</param>
/// <param name="group">The group that the radio button has</param>
public RadioGroupButton(Anchor anchor, Vector2 size, string label, bool defaultChecked = false, RadioGroup? group = null) :
/// <param name="group">The group that the radio button has. Can be null</param>
public RadioGroupButton(Anchor anchor, Vector2 size, string label, bool defaultChecked = false, RadioGroup group = null) :
base(anchor, size, label, defaultChecked) {
this.Group = group;
@ -53,8 +53,12 @@ namespace MLEM.Ui.Elements {
/// A group of radio group buttons
/// </summary>
public class RadioGroup {
private RadioGroupButton? selection;
public RadioGroupButton? Selection{ get => selection; set {
//can be null
private RadioGroupButton selection;
/// <summary>
/// The currently selected item, set to null to unselect all
/// </summary>
public RadioGroupButton Selection{ get => selection; set {
if (selection != null) this.selection.Checked = false;
selection = value;
if(selection != null) {