Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rds1983 committed Dec 11, 2024
1 parent 51b52cb commit 192a15e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<RootNamespace>Myra</RootNamespace>
<Description>UI Library for MonoGame, FNA and Stride</Description>
<VersionPrefix>1.5.8</VersionPrefix>
<XNAssetsVersion>0.7.3</XNAssetsVersion>
<XNAssetsVersion>0.7.5</XNAssetsVersion>
<FontStashSharpVersion>1.3.9</FontStashSharpVersion>
<LangVersion>8.0</LangVersion>
<InfoLundinMathVersion>1.2.6</InfoLundinMathVersion>
Expand Down
4 changes: 4 additions & 0 deletions src/Myra/Graphics2D/UI/Properties/PropertyGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,10 @@ private void FillSubGrid(ref int y, IReadOnlyList<Record> records)
{
valueWidget = CreateFileEditor(record, hasSetter, "*.png|*.jpg|*.bmp|*.gif", name => Settings.AssetManager.LoadTexture2D(MyraEnvironment.GraphicsDevice, name));
}
else if (propertyType == typeof(TextureCube))

Check failure on line 1223 in src/Myra/Graphics2D/UI/Properties/PropertyGrid.cs

View workflow job for this annotation

GitHub Actions / BuildAndPublish

The type or namespace name 'TextureCube' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1223 in src/Myra/Graphics2D/UI/Properties/PropertyGrid.cs

View workflow job for this annotation

GitHub Actions / BuildAndPublish

The type or namespace name 'TextureCube' could not be found (are you missing a using directive or an assembly reference?)
{
valueWidget = CreateFileEditor(record, hasSetter, "*.dds", name => Settings.AssetManager.LoadTexture2D(MyraEnvironment.GraphicsDevice, name));
}
#endif
else
{
Expand Down
8 changes: 7 additions & 1 deletion src/Myra/Graphics2D/UI/Selectors/ListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,13 @@ public int? SelectedIndex
return null;
}

return Widgets.IndexOf(_selectedItem);
var result = Widgets.IndexOf(_selectedItem);
if (result == -1)
{
return null;
}

return result;
}

set
Expand Down

0 comments on commit 192a15e

Please sign in to comment.