Skip to content

Commit

Permalink
Add menu sprite font.
Browse files Browse the repository at this point in the history
  • Loading branch information
chemodax committed Aug 15, 2023
1 parent 75e4a4e commit b723b85
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
2 changes: 2 additions & 0 deletions UWP/Assets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public MovingSpriteAssets(AnimatedImage[] normal, AnimatedImage[] ghost, Animate
public AnimatedImage DrawGameInNumbers;

public AnimatedImage[] Alpha;
public SpriteFont MenuFont;

public static int scale = 2;

Expand Down Expand Up @@ -567,6 +568,7 @@ AnimatedImage loadPermanentWall(AnimatedImage fireImages, Image wall)
},
PauseHelp = loadImage(imgHelp, 79, 155, 162, 45),
GameHelp = loadImage(imgHelp, 0, 0, 121, 20),
MenuFont = content.Load<SpriteFont>(@"font\Menu")
};
}
}
Expand Down
9 changes: 8 additions & 1 deletion UWP/Content/Content.mgcb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


#----------------------------- Global Properties ----------------------------#

/outputDir:bin/$(Platform)
Expand Down Expand Up @@ -727,6 +727,13 @@
/processorParam:TextureFormat=Color
/build:CONTROLS.png

#begin font/Menu.spritefont
/importer:FontDescriptionImporter
/processor:FontDescriptionProcessor
/processorParam:PremultiplyAlpha=True
/processorParam:TextureFormat=Compressed
/build:font/Menu.spritefont;font/Menu.spritefont

#begin HELP.png
/importer:TextureImporter
/processor:TextureProcessor
Expand Down
60 changes: 60 additions & 0 deletions UWP/Content/font/Menu.spritefont
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains an xml description of a font, and will be read by the XNA
Framework Content Pipeline. Follow the comments to customize the appearance
of the font in your game, and to change the characters which are available to draw
with.
-->
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">

<!--
Modify this string to change the font that will be imported.
-->
<FontName>Arial</FontName>

<!--
Size is a float value, measured in points. Modify this value to change
the size of the font.
-->
<Size>34</Size>

<!--
Spacing is a float value, measured in pixels. Modify this value to change
the amount of spacing in between characters.
-->
<Spacing>0</Spacing>

<!--
UseKerning controls the layout of the font. If this value is true, kerning information
will be used when placing characters.
-->
<UseKerning>true</UseKerning>

<!--
Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
and "Bold, Italic", and are case sensitive.
-->
<Style>Bold</Style>

<!--
If you uncomment this line, the default character will be substituted if you draw
or measure text that contains characters which were not included in the font.
-->
<!-- <DefaultCharacter>*</DefaultCharacter> -->

<!--
CharacterRegions control what letters are available in the font. Every
character from Start to End will be built and made available for drawing. The
default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
character set. The characters are ordered according to the Unicode standard.
See the documentation for more information.
-->
<CharacterRegions>
<CharacterRegion>
<Start>&#32;</Start>
<End>&#126;</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
1 change: 1 addition & 0 deletions UWP/MrBoom.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<None Include="Content\font\Menu.spritefont" />
<None Include="Package.StoreAssociation.xml" />
<Content Include="Assets\LargeTile.scale-100.png" />
<Content Include="Assets\LargeTile.scale-125.png" />
Expand Down

0 comments on commit b723b85

Please sign in to comment.