Issue with Texture Atlas
Posted: 07 Oct 2023, 02:41
Hello.
Working on getting my first view to render correctly.
I have a set of kind of confusing outcomes I can't quit explain/make sense of.
I am brand new to Noesis but an experience developer.

The Problem: My buttons are rendering as magenta blocks with no text in them.
Background:
Any help would be appreciated, and feel free to ask for any more information you need.
Working on getting my first view to render correctly.
I have a set of kind of confusing outcomes I can't quit explain/make sense of.
I am brand new to Noesis but an experience developer.

The Problem: My buttons are rendering as magenta blocks with no text in them.
Background:
- Using MonoGame with the recently released pickup of the Neosis.MonoGame project here: https://github.com/ManoxCZ/Noesis.Monogame/tree/main
- I have made a couple minor local changes to support subclassing the "GameWithNeosis" class.
- The issue seems to only effect the buttons. Not the static images/image control.
Code: Select all
<!-- Created using Noesis XAML exporter for TexturePacker (https://www.codeandweb.com/texturepacker) -->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BitmapImage x:Key="GUICoreImages" UriSource="GUICoreImages.png"/>
<CroppedBitmap x:Key="PanelGreen" Source="{StaticResource GUICoreImages}" SourceRect="1,1,822,1009"/>
<CroppedBitmap x:Key="VerticalPanelBordered" Source="{StaticResource GUICoreImages}" SourceRect="825,1,264,1440"/>
<CroppedBitmap x:Key="VerticalPanel" Source="{StaticResource GUICoreImages}" SourceRect="1091,1,158,1440"/>
<CroppedBitmap x:Key="PanelGreenWithFooter" Source="{StaticResource GUICoreImages}" SourceRect="1,1012,489,582"/>
<CroppedBitmap x:Key="CoOpStudioLogo" Source="{StaticResource GUICoreImages}" SourceRect="1251,1,256,256"/>
<CroppedBitmap x:Key="FullLogo" Source="{StaticResource GUICoreImages}" SourceRect="1251,259,256,256"/>
<CroppedBitmap x:Key="SyndicatesLogo" Source="{StaticResource GUICoreImages}" SourceRect="1251,517,256,256"/>
<CroppedBitmap x:Key="SynLogo" Source="{StaticResource GUICoreImages}" SourceRect="1251,775,256,256"/>
<CroppedBitmap x:Key="PanelBlack" Source="{StaticResource GUICoreImages}" SourceRect="1,1596,588,252"/>
<CroppedBitmap x:Key="SelectorGreen" Source="{StaticResource GUICoreImages}" SourceRect="1,1850,886,185"/>
<CroppedBitmap x:Key="TooltipBackground" Source="{StaticResource GUICoreImages}" SourceRect="492,1012,287,386"/>
<CroppedBitmap x:Key="PanelGreenLargeTitle" Source="{StaticResource GUICoreImages}" SourceRect="591,1443,800,243"/>
<CroppedBitmap x:Key="ListItemBackground" Source="{StaticResource GUICoreImages}" SourceRect="591,1688,631,58"/>
<CroppedBitmap x:Key="IconPanel" Source="{StaticResource GUICoreImages}" SourceRect="591,1748,529,92"/>
<CroppedBitmap x:Key="Separator" Source="{StaticResource GUICoreImages}" SourceRect="591,1842,334,1"/>
<CroppedBitmap x:Key="ProgressBarBackground" Source="{StaticResource GUICoreImages}" SourceRect="492,1400,325,10"/>
<CroppedBitmap x:Key="BoxBlue" Source="{StaticResource GUICoreImages}" SourceRect="1251,1033,132,110"/>
<CroppedBitmap x:Key="BoxGrey" Source="{StaticResource GUICoreImages}" SourceRect="1251,1145,132,110"/>
<CroppedBitmap x:Key="ButtonActiveRound" Source="{StaticResource GUICoreImages}" SourceRect="1224,1688,162,58"/>
<CroppedBitmap x:Key="ButtonHoverRound" Source="{StaticResource GUICoreImages}" SourceRect="1122,1748,162,58"/>
<CroppedBitmap x:Key="SeparatorVertical" Source="{StaticResource GUICoreImages}" SourceRect="781,1012,3,205"/>
<CroppedBitmap x:Key="SlideBar" Source="{StaticResource GUICoreImages}" SourceRect="492,1412,191,14"/>
<CroppedBitmap x:Key="ButtonActive" Source="{StaticResource GUICoreImages}" SourceRect="1122,1808,162,39"/>
<CroppedBitmap x:Key="ScrollBarBackground" Source="{StaticResource GUICoreImages}" SourceRect="1393,1033,17,586"/>
<CroppedBitmap x:Key="ButtonHover" Source="{StaticResource GUICoreImages}" SourceRect="927,1842,162,39"/>
<CroppedBitmap x:Key="ButtonNormalRound" Source="{StaticResource GUICoreImages}" SourceRect="889,1883,162,58"/>
<CroppedBitmap x:Key="ButtonNormal" Source="{StaticResource GUICoreImages}" SourceRect="889,1943,162,39"/>
<CroppedBitmap x:Key="ProgressBarForeground" Source="{StaticResource GUICoreImages}" SourceRect="492,1428,128,10"/>
<CroppedBitmap x:Key="ItemCell" Source="{StaticResource GUICoreImages}" SourceRect="1286,1748,62,62"/>
<CroppedBitmap x:Key="CheckboxBackground" Source="{StaticResource GUICoreImages}" SourceRect="1412,1033,48,48"/>
<CroppedBitmap x:Key="ScrollBarHandle" Source="{StaticResource GUICoreImages}" SourceRect="786,1012,17,64"/>
<CroppedBitmap x:Key="CheckboxChecked" Source="{StaticResource GUICoreImages}" SourceRect="1251,1257,40,40"/>
<CroppedBitmap x:Key="CheckboxUnchecked" Source="{StaticResource GUICoreImages}" SourceRect="889,1984,40,40"/>
<CroppedBitmap x:Key="MinusButton" Source="{StaticResource GUICoreImages}" SourceRect="492,1440,38,38"/>
<CroppedBitmap x:Key="PlusButton" Source="{StaticResource GUICoreImages}" SourceRect="1412,1083,38,38"/>
<CroppedBitmap x:Key="StatusBlank" Source="{StaticResource GUICoreImages}" SourceRect="685,1412,29,29"/>
<CroppedBitmap x:Key="StatusGreen" Source="{StaticResource GUICoreImages}" SourceRect="716,1412,29,29"/>
<CroppedBitmap x:Key="StatusRed" Source="{StaticResource GUICoreImages}" SourceRect="747,1412,29,29"/>
<CroppedBitmap x:Key="Slider" Source="{StaticResource GUICoreImages}" SourceRect="1091,1842,29,14"/>
<CroppedBitmap x:Key="Cursor" Source="{StaticResource GUICoreImages}" SourceRect="1053,1883,24,24"/>
<CroppedBitmap x:Key="ArrowLeft" Source="{StaticResource GUICoreImages}" SourceRect="1393,1621,15,30"/>
<CroppedBitmap x:Key="ArrowRight" Source="{StaticResource GUICoreImages}" SourceRect="1286,1812,15,30"/>
<CroppedBitmap x:Key="Checkmark" Source="{StaticResource GUICoreImages}" SourceRect="1350,1748,16,14"/>
<CroppedBitmap x:Key="XMark" Source="{StaticResource GUICoreImages}" SourceRect="1462,1033,14,14"/>
</ResourceDictionary>
Code: Select all
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Images/GUICoreImages.xaml"/>
<ResourceDictionary Source="Fonts/Fonts.xaml"/>
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="MidGrey" Color="#606060"/>
<SolidColorBrush x:Key="DarkGrey" Color="#333"/>
<SolidColorBrush x:Key="SynBlue" Color="#25aae1"/>
<SolidColorBrush x:Key="SynOrange" Color="#da6f35"/>
<SolidColorBrush x:Key="SynGreen" Color="#32f220"/>
<Style x:Key="XlButtonNormal" TargetType="Button">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="{DynamicResource ButtonNormal}"/>
</Setter.Value>
</Setter>
<Setter Property="Padding">
<Setter.Value>
<Thickness Top="10" Bottom="10" Left="90" Right="90"/>
</Setter.Value>
</Setter>
<Setter Property="Margin">
<Setter.Value>
<Thickness Top="0" Bottom="25" Left="0" Right="0"/>
</Setter.Value>
</Setter>
<Setter Property="FontFamily" Value="{StaticResource SyncopateBold}" />
<Setter Property="FontSize" Value="20" />
</Style>
</ResourceDictionary>Code: Select all
<Window x:Name="MainMenuWindow" x:Class="SyndicatesGUI.MainMenu.MainMenu"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SyndicatesGUI.MainMenu"
mc:Ignorable="d"
Title="MainMenu" Height="1080" Width="1920" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" Background="{x:Null}">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Assets/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Center">
<Image x:Name="Logo" Height="200" Width="200" Source="{StaticResource FullLogo}" />
<Button x:Name="ContinueButton" Style="{DynamicResource XlButtonNormal}" Content="Continue"/>
<Button x:Name="NewGameButton" Style="{StaticResource XlButtonNormal}" Content="New Game"/>
<Button x:Name="LoadGameButton" Style="{StaticResource XlButtonNormal}" Content="Load Game"/>
<Button x:Name="ConfigurationButton" Style="{StaticResource XlButtonNormal}" Content="Configuration"/>
<Button x:Name="ExitButton" Style="{StaticResource XlButtonNormal}" Content="Exit"/>
</StackPanel>
</Window>
Code: Select all
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="DosisRegular">#Dosis Regular</FontFamily>
<FontFamily x:Key="DosisBold">#Dosis Bold</FontFamily>
<FontFamily x:Key="OrbitronRegular">#Orbitron Regular</FontFamily>
<FontFamily x:Key="OrbitronBold">#Orbitron Bold</FontFamily>
<FontFamily x:Key="SyncopateNormal">#Syncopate Regular</FontFamily>
<FontFamily x:Key="SyncopateBold">#Syncopate Bold</FontFamily>
</ResourceDictionary>