Skip to content

Commit

Permalink
[HaRepacker] Fix missing input textbox with float & double property
Browse files Browse the repository at this point in the history
  • Loading branch information
eaxvac committed Dec 6, 2020
1 parent 6c21fcf commit 064c02b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion HaRepacker/GUI/Panels/MainPanel.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ private void ShowObjectValue(WzObject obj)
}
}
}
else if (bIsWzLongProperty || bIsWzIntProperty)
else if (bIsWzLongProperty || bIsWzIntProperty || bIsWzShortProperty)
{
textPropBox.Visibility = Visibility.Visible;
textPropBox.AcceptsReturn = false;
Expand All @@ -1490,6 +1490,9 @@ private void ShowObjectValue(WzObject obj)
else if (bIsWzIntProperty)
{
value_ = (ulong)((WzIntProperty)obj).GetLong();
} else if (bIsWzShortProperty)
{
value_ = (ulong)((WzShortProperty)obj).GetLong();
}

// field limit UI
Expand All @@ -1503,6 +1506,21 @@ private void ShowObjectValue(WzObject obj)
fieldLimitPanelHost.Visibility = Visibility.Visible;
}
textPropBox.Text = value_.ToString();
}
else if (bIsWzDoubleProperty || bIsWzFloatProperty)
{
textPropBox.Visibility = Visibility.Visible;
textPropBox.AcceptsReturn = false;
textPropBox.ApplyButtonEnabled = false; // reset to disabled mode when changed

if (bIsWzFloatProperty)
{
textPropBox.Text = ((WzFloatProperty)obj).GetFloat().ToString();
}
else if (bIsWzDoubleProperty)
{
textPropBox.Text = ((WzDoubleProperty)obj).GetDouble().ToString();
}
}
else
{
Expand Down

0 comments on commit 064c02b

Please sign in to comment.