Skip to content

Commit

Permalink
Bump version to 1.0.50;
Browse files Browse the repository at this point in the history
Checkbox always invokes CheckChanged, even when Chcked property was set externally;
  • Loading branch information
onepiecefreak3 committed Dec 18, 2023
1 parent d874c9f commit 688e690
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions ImGui.Forms/Controls/CheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,21 @@ namespace ImGui.Forms.Controls
{
public class CheckBox : Component
{
private bool _checked;

public LocalizedString Text { get; set; }

public LocalizedString Tooltip { get; set; }

public bool Checked { get; set; }
public bool Checked
{
get=> _checked;
set
{
_checked = value;
OnCheckChanged();
}
}

#region Events

Expand Down Expand Up @@ -42,10 +52,7 @@ protected override void UpdateInternal(Rectangle contentRect)
ImGuiNET.ImGui.SetTooltip(Tooltip);

if (ImGuiNET.ImGui.Checkbox(Text, ref check) && Enabled)
{
Checked = check;
OnCheckChanged();
}

RemoveStyles(enabled);
}
Expand Down
2 changes: 1 addition & 1 deletion ImGui.Forms/ImGui.Forms.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Imgui.Forms</id>
<version>1.0.49</version>
<version>1.0.50</version>
<description>A WinForms-inspired object-oriented framework around Dear ImGui (https://github.com/ocornut/imgui)</description>

<authors>onepiecefreak</authors>
Expand Down

0 comments on commit 688e690

Please sign in to comment.