Skip to content

Commit 192a15e

Browse files
committed
Some fixes
1 parent 51b52cb commit 192a15e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<RootNamespace>Myra</RootNamespace>
88
<Description>UI Library for MonoGame, FNA and Stride</Description>
99
<VersionPrefix>1.5.8</VersionPrefix>
10-
<XNAssetsVersion>0.7.3</XNAssetsVersion>
10+
<XNAssetsVersion>0.7.5</XNAssetsVersion>
1111
<FontStashSharpVersion>1.3.9</FontStashSharpVersion>
1212
<LangVersion>8.0</LangVersion>
1313
<InfoLundinMathVersion>1.2.6</InfoLundinMathVersion>

src/Myra/Graphics2D/UI/Properties/PropertyGrid.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,10 @@ private void FillSubGrid(ref int y, IReadOnlyList<Record> records)
12201220
{
12211221
valueWidget = CreateFileEditor(record, hasSetter, "*.png|*.jpg|*.bmp|*.gif", name => Settings.AssetManager.LoadTexture2D(MyraEnvironment.GraphicsDevice, name));
12221222
}
1223+
else if (propertyType == typeof(TextureCube))
1224+
{
1225+
valueWidget = CreateFileEditor(record, hasSetter, "*.dds", name => Settings.AssetManager.LoadTexture2D(MyraEnvironment.GraphicsDevice, name));
1226+
}
12231227
#endif
12241228
else
12251229
{

src/Myra/Graphics2D/UI/Selectors/ListView.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ public int? SelectedIndex
288288
return null;
289289
}
290290

291-
return Widgets.IndexOf(_selectedItem);
291+
var result = Widgets.IndexOf(_selectedItem);
292+
if (result == -1)
293+
{
294+
return null;
295+
}
296+
297+
return result;
292298
}
293299

294300
set

0 commit comments

Comments
 (0)