mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-25 08:22:15 +00:00
reasonably functional screens demo
This commit is contained in:
@@ -26,3 +26,20 @@
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:logo-square-128.png
|
||||
|
||||
#begin montserrat-32.fnt
|
||||
/importer:BitmapFontImporter
|
||||
/processor:BitmapFontProcessor
|
||||
/build:montserrat-32.fnt
|
||||
|
||||
#begin montserrat-32_0.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:montserrat-32_0.png
|
||||
|
||||
|
||||
@@ -0,0 +1,341 @@
|
||||
<?xml version="1.0"?>
|
||||
<font>
|
||||
<info face="Montserrat" size="32" bold="1" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/>
|
||||
<common lineHeight="32" base="27" scaleW="256" scaleH="256" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/>
|
||||
<pages>
|
||||
<page id="0" file="montserrat-32_0.png" />
|
||||
</pages>
|
||||
<chars count="95">
|
||||
<char id="32" x="88" y="44" width="3" height="1" xoffset="-1" yoffset="31" xadvance="6" page="0" chnl="15" />
|
||||
<char id="33" x="250" y="21" width="5" height="19" xoffset="2" yoffset="8" xadvance="7" page="0" chnl="15" />
|
||||
<char id="34" x="72" y="103" width="8" height="8" xoffset="2" yoffset="8" xadvance="12" page="0" chnl="15" />
|
||||
<char id="35" x="0" y="49" width="19" height="19" xoffset="0" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="36" x="0" y="0" width="16" height="27" xoffset="0" yoffset="4" xadvance="17" page="0" chnl="15" />
|
||||
<char id="37" x="118" y="24" width="25" height="19" xoffset="1" yoffset="8" xadvance="28" page="0" chnl="15" />
|
||||
<char id="38" x="172" y="0" width="17" height="20" xoffset="1" yoffset="8" xadvance="18" page="0" chnl="15" />
|
||||
<char id="39" x="251" y="61" width="4" height="8" xoffset="2" yoffset="8" xadvance="7" page="0" chnl="15" />
|
||||
<char id="40" x="72" y="0" width="8" height="24" xoffset="2" yoffset="7" xadvance="9" page="0" chnl="15" />
|
||||
<char id="41" x="62" y="0" width="9" height="24" xoffset="1" yoffset="7" xadvance="10" page="0" chnl="15" />
|
||||
<char id="42" x="61" y="104" width="10" height="9" xoffset="0" yoffset="8" xadvance="10" page="0" chnl="15" />
|
||||
<char id="43" x="13" y="105" width="13" height="13" xoffset="0" yoffset="12" xadvance="14" page="0" chnl="15" />
|
||||
<char id="44" x="81" y="103" width="6" height="7" xoffset="0" yoffset="23" xadvance="7" page="0" chnl="15" />
|
||||
<char id="45" x="130" y="100" width="7" height="3" xoffset="1" yoffset="17" xadvance="10" page="0" chnl="15" />
|
||||
<char id="46" x="107" y="100" width="5" height="5" xoffset="1" yoffset="22" xadvance="7" page="0" chnl="15" />
|
||||
<char id="47" x="29" y="0" width="13" height="25" xoffset="-1" yoffset="5" xadvance="10" page="0" chnl="15" />
|
||||
<char id="48" x="170" y="42" width="17" height="19" xoffset="1" yoffset="8" xadvance="19" page="0" chnl="15" />
|
||||
<char id="49" x="203" y="61" width="9" height="19" xoffset="0" yoffset="8" xadvance="11" page="0" chnl="15" />
|
||||
<char id="50" x="130" y="64" width="15" height="19" xoffset="1" yoffset="8" xadvance="16" page="0" chnl="15" />
|
||||
<char id="51" x="236" y="61" width="14" height="18" xoffset="0" yoffset="9" xadvance="15" page="0" chnl="15" />
|
||||
<char id="52" x="17" y="69" width="16" height="19" xoffset="1" yoffset="8" xadvance="17" page="0" chnl="15" />
|
||||
<char id="53" x="114" y="64" width="15" height="19" xoffset="0" yoffset="8" xadvance="16" page="0" chnl="15" />
|
||||
<char id="54" x="146" y="64" width="15" height="19" xoffset="1" yoffset="8" xadvance="17" page="0" chnl="15" />
|
||||
<char id="55" x="98" y="64" width="15" height="19" xoffset="1" yoffset="8" xadvance="16" page="0" chnl="15" />
|
||||
<char id="56" x="82" y="66" width="15" height="19" xoffset="1" yoffset="8" xadvance="17" page="0" chnl="15" />
|
||||
<char id="57" x="66" y="67" width="15" height="19" xoffset="1" yoffset="8" xadvance="17" page="0" chnl="15" />
|
||||
<char id="58" x="27" y="105" width="5" height="12" xoffset="1" yoffset="15" xadvance="6" page="0" chnl="15" />
|
||||
<char id="59" x="233" y="80" width="6" height="15" xoffset="0" yoffset="15" xadvance="7" page="0" chnl="15" />
|
||||
<char id="60" x="240" y="80" width="12" height="14" xoffset="1" yoffset="11" xadvance="14" page="0" chnl="15" />
|
||||
<char id="61" x="48" y="104" width="12" height="9" xoffset="1" yoffset="14" xadvance="14" page="0" chnl="15" />
|
||||
<char id="62" x="0" y="108" width="12" height="14" xoffset="1" yoffset="11" xadvance="14" page="0" chnl="15" />
|
||||
<char id="63" x="190" y="61" width="12" height="19" xoffset="0" yoffset="8" xadvance="13" page="0" chnl="15" />
|
||||
<char id="64" x="141" y="0" width="24" height="22" xoffset="0" yoffset="9" xadvance="25" page="0" chnl="15" />
|
||||
<char id="65" x="144" y="23" width="21" height="19" xoffset="0" yoffset="8" xadvance="21" page="0" chnl="15" />
|
||||
<char id="66" x="219" y="61" width="16" height="18" xoffset="2" yoffset="9" xadvance="19" page="0" chnl="15" />
|
||||
<char id="67" x="78" y="46" width="18" height="19" xoffset="1" yoffset="8" xadvance="19" page="0" chnl="15" />
|
||||
<char id="68" x="59" y="47" width="18" height="19" xoffset="2" yoffset="8" xadvance="21" page="0" chnl="15" />
|
||||
<char id="69" x="34" y="68" width="15" height="19" xoffset="2" yoffset="8" xadvance="18" page="0" chnl="15" />
|
||||
<char id="70" x="241" y="41" width="14" height="19" xoffset="2" yoffset="8" xadvance="16" page="0" chnl="15" />
|
||||
<char id="71" x="116" y="44" width="17" height="19" xoffset="1" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="72" x="134" y="44" width="17" height="19" xoffset="2" yoffset="8" xadvance="21" page="0" chnl="15" />
|
||||
<char id="73" x="213" y="61" width="5" height="19" xoffset="2" yoffset="8" xadvance="9" page="0" chnl="15" />
|
||||
<char id="74" x="176" y="62" width="13" height="19" xoffset="0" yoffset="8" xadvance="14" page="0" chnl="15" />
|
||||
<char id="75" x="40" y="47" width="18" height="19" xoffset="2" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="76" x="162" y="63" width="13" height="19" xoffset="2" yoffset="8" xadvance="15" page="0" chnl="15" />
|
||||
<char id="77" x="229" y="21" width="20" height="19" xoffset="2" yoffset="8" xadvance="25" page="0" chnl="15" />
|
||||
<char id="78" x="206" y="41" width="17" height="19" xoffset="2" yoffset="8" xadvance="21" page="0" chnl="15" />
|
||||
<char id="79" x="208" y="21" width="20" height="19" xoffset="1" yoffset="8" xadvance="22" page="0" chnl="15" />
|
||||
<char id="80" x="50" y="67" width="15" height="19" xoffset="2" yoffset="8" xadvance="18" page="0" chnl="15" />
|
||||
<char id="81" x="81" y="0" width="21" height="23" xoffset="1" yoffset="8" xadvance="22" page="0" chnl="15" />
|
||||
<char id="82" x="188" y="41" width="17" height="19" xoffset="2" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="83" x="224" y="41" width="16" height="19" xoffset="0" yoffset="8" xadvance="17" page="0" chnl="15" />
|
||||
<char id="84" x="0" y="69" width="16" height="19" xoffset="1" yoffset="8" xadvance="16" page="0" chnl="15" />
|
||||
<char id="85" x="97" y="44" width="18" height="19" xoffset="1" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="86" x="187" y="21" width="20" height="19" xoffset="0" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="87" x="88" y="24" width="29" height="19" xoffset="0" yoffset="8" xadvance="29" page="0" chnl="15" />
|
||||
<char id="88" x="166" y="22" width="20" height="19" xoffset="0" yoffset="8" xadvance="20" page="0" chnl="15" />
|
||||
<char id="89" x="20" y="48" width="19" height="19" xoffset="0" yoffset="8" xadvance="18" page="0" chnl="15" />
|
||||
<char id="90" x="152" y="43" width="17" height="19" xoffset="1" yoffset="8" xadvance="18" page="0" chnl="15" />
|
||||
<char id="91" x="123" y="0" width="8" height="23" xoffset="2" yoffset="7" xadvance="10" page="0" chnl="15" />
|
||||
<char id="92" x="43" y="0" width="13" height="25" xoffset="1" yoffset="5" xadvance="12" page="0" chnl="15" />
|
||||
<char id="93" x="132" y="0" width="8" height="23" xoffset="2" yoffset="7" xadvance="12" page="0" chnl="15" />
|
||||
<char id="94" x="33" y="105" width="14" height="11" xoffset="1" yoffset="12" xadvance="16" page="0" chnl="15" />
|
||||
<char id="95" x="113" y="100" width="16" height="3" xoffset="0" yoffset="29" xadvance="16" page="0" chnl="15" />
|
||||
<char id="96" x="99" y="100" width="7" height="5" xoffset="1" yoffset="7" xadvance="9" page="0" chnl="15" />
|
||||
<char id="97" x="164" y="83" width="14" height="15" xoffset="1" yoffset="12" xadvance="16" page="0" chnl="15" />
|
||||
<char id="98" x="0" y="28" width="16" height="20" xoffset="2" yoffset="7" xadvance="18" page="0" chnl="15" />
|
||||
<char id="99" x="179" y="82" width="14" height="15" xoffset="0" yoffset="12" xadvance="15" page="0" chnl="15" />
|
||||
<char id="100" x="208" y="0" width="17" height="20" xoffset="0" yoffset="7" xadvance="19" page="0" chnl="15" />
|
||||
<char id="101" x="116" y="84" width="15" height="15" xoffset="0" yoffset="12" xadvance="16" page="0" chnl="15" />
|
||||
<char id="102" x="243" y="0" width="12" height="20" xoffset="0" yoffset="7" xadvance="10" page="0" chnl="15" />
|
||||
<char id="103" x="34" y="26" width="15" height="20" xoffset="1" yoffset="12" xadvance="17" page="0" chnl="15" />
|
||||
<char id="104" x="66" y="25" width="15" height="20" xoffset="2" yoffset="7" xadvance="18" page="0" chnl="15" />
|
||||
<char id="105" x="166" y="0" width="5" height="21" xoffset="2" yoffset="6" xadvance="8" page="0" chnl="15" />
|
||||
<char id="106" x="17" y="0" width="11" height="26" xoffset="-3" yoffset="6" xadvance="9" page="0" chnl="15" />
|
||||
<char id="107" x="50" y="26" width="15" height="20" xoffset="2" yoffset="7" xadvance="17" page="0" chnl="15" />
|
||||
<char id="108" x="82" y="24" width="5" height="20" xoffset="2" yoffset="7" xadvance="9" page="0" chnl="15" />
|
||||
<char id="109" x="39" y="88" width="24" height="15" xoffset="2" yoffset="12" xadvance="28" page="0" chnl="15" />
|
||||
<char id="110" x="132" y="84" width="15" height="15" xoffset="2" yoffset="12" xadvance="18" page="0" chnl="15" />
|
||||
<char id="111" x="64" y="87" width="17" height="15" xoffset="0" yoffset="12" xadvance="17" page="0" chnl="15" />
|
||||
<char id="112" x="226" y="0" width="16" height="20" xoffset="2" yoffset="12" xadvance="18" page="0" chnl="15" />
|
||||
<char id="113" x="190" y="0" width="17" height="20" xoffset="0" yoffset="12" xadvance="19" page="0" chnl="15" />
|
||||
<char id="114" x="222" y="80" width="10" height="15" xoffset="2" yoffset="12" xadvance="12" page="0" chnl="15" />
|
||||
<char id="115" x="208" y="81" width="13" height="15" xoffset="0" yoffset="12" xadvance="14" page="0" chnl="15" />
|
||||
<char id="116" x="0" y="89" width="11" height="18" xoffset="0" yoffset="9" xadvance="12" page="0" chnl="15" />
|
||||
<char id="117" x="148" y="84" width="15" height="15" xoffset="1" yoffset="12" xadvance="18" page="0" chnl="15" />
|
||||
<char id="118" x="82" y="86" width="16" height="15" xoffset="0" yoffset="12" xadvance="15" page="0" chnl="15" />
|
||||
<char id="119" x="12" y="89" width="26" height="15" xoffset="0" yoffset="12" xadvance="25" page="0" chnl="15" />
|
||||
<char id="120" x="99" y="84" width="16" height="15" xoffset="0" yoffset="12" xadvance="16" page="0" chnl="15" />
|
||||
<char id="121" x="17" y="27" width="16" height="20" xoffset="0" yoffset="12" xadvance="16" page="0" chnl="15" />
|
||||
<char id="122" x="194" y="81" width="13" height="15" xoffset="1" yoffset="12" xadvance="15" page="0" chnl="15" />
|
||||
<char id="123" x="113" y="0" width="9" height="23" xoffset="1" yoffset="7" xadvance="10" page="0" chnl="15" />
|
||||
<char id="124" x="57" y="0" width="4" height="25" xoffset="2" yoffset="5" xadvance="8" page="0" chnl="15" />
|
||||
<char id="125" x="103" y="0" width="9" height="23" xoffset="1" yoffset="7" xadvance="11" page="0" chnl="15" />
|
||||
<char id="126" x="88" y="102" width="10" height="5" xoffset="2" yoffset="16" xadvance="14" page="0" chnl="15" />
|
||||
</chars>
|
||||
<kernings count="234">
|
||||
<kerning first="39" second="46" amount="-1" />
|
||||
<kerning first="122" second="89" amount="-1" />
|
||||
<kerning first="122" second="87" amount="-1" />
|
||||
<kerning first="122" second="86" amount="-1" />
|
||||
<kerning first="121" second="65" amount="-1" />
|
||||
<kerning first="120" second="113" amount="-1" />
|
||||
<kerning first="120" second="111" amount="-1" />
|
||||
<kerning first="120" second="103" amount="-1" />
|
||||
<kerning first="120" second="101" amount="-1" />
|
||||
<kerning first="120" second="100" amount="-1" />
|
||||
<kerning first="120" second="99" amount="-1" />
|
||||
<kerning first="120" second="97" amount="-1" />
|
||||
<kerning first="120" second="89" amount="-1" />
|
||||
<kerning first="120" second="87" amount="-1" />
|
||||
<kerning first="120" second="86" amount="-1" />
|
||||
<kerning first="120" second="85" amount="-1" />
|
||||
<kerning first="119" second="65" amount="-1" />
|
||||
<kerning first="119" second="46" amount="-1" />
|
||||
<kerning first="118" second="65" amount="-1" />
|
||||
<kerning first="118" second="46" amount="-1" />
|
||||
<kerning first="116" second="89" amount="-1" />
|
||||
<kerning first="116" second="87" amount="-1" />
|
||||
<kerning first="116" second="86" amount="-1" />
|
||||
<kerning first="115" second="89" amount="-1" />
|
||||
<kerning first="45" second="74" amount="-1" />
|
||||
<kerning first="47" second="57" amount="-1" />
|
||||
<kerning first="115" second="87" amount="-1" />
|
||||
<kerning first="115" second="86" amount="-1" />
|
||||
<kerning first="114" second="121" amount="1" />
|
||||
<kerning first="114" second="119" amount="1" />
|
||||
<kerning first="114" second="118" amount="1" />
|
||||
<kerning first="114" second="89" amount="-1" />
|
||||
<kerning first="114" second="87" amount="-1" />
|
||||
<kerning first="114" second="86" amount="-1" />
|
||||
<kerning first="112" second="120" amount="-1" />
|
||||
<kerning first="112" second="89" amount="-2" />
|
||||
<kerning first="112" second="87" amount="-2" />
|
||||
<kerning first="112" second="86" amount="-2" />
|
||||
<kerning first="112" second="84" amount="-2" />
|
||||
<kerning first="112" second="74" amount="-1" />
|
||||
<kerning first="112" second="65" amount="-1" />
|
||||
<kerning first="111" second="120" amount="-1" />
|
||||
<kerning first="111" second="89" amount="-2" />
|
||||
<kerning first="111" second="87" amount="-2" />
|
||||
<kerning first="111" second="86" amount="-2" />
|
||||
<kerning first="111" second="84" amount="-2" />
|
||||
<kerning first="111" second="74" amount="-1" />
|
||||
<kerning first="55" second="46" amount="-1" />
|
||||
<kerning first="65" second="67" amount="-1" />
|
||||
<kerning first="65" second="71" amount="-1" />
|
||||
<kerning first="65" second="79" amount="-1" />
|
||||
<kerning first="65" second="81" amount="-1" />
|
||||
<kerning first="111" second="65" amount="-1" />
|
||||
<kerning first="65" second="84" amount="-2" />
|
||||
<kerning first="65" second="85" amount="-1" />
|
||||
<kerning first="65" second="86" amount="-1" />
|
||||
<kerning first="65" second="87" amount="-1" />
|
||||
<kerning first="65" second="89" amount="-1" />
|
||||
<kerning first="65" second="92" amount="-1" />
|
||||
<kerning first="65" second="99" amount="-1" />
|
||||
<kerning first="65" second="100" amount="-1" />
|
||||
<kerning first="65" second="101" amount="-1" />
|
||||
<kerning first="65" second="103" amount="-1" />
|
||||
<kerning first="65" second="111" amount="-1" />
|
||||
<kerning first="65" second="113" amount="-1" />
|
||||
<kerning first="65" second="116" amount="-1" />
|
||||
<kerning first="65" second="117" amount="-1" />
|
||||
<kerning first="65" second="118" amount="-1" />
|
||||
<kerning first="65" second="119" amount="-1" />
|
||||
<kerning first="65" second="121" amount="-1" />
|
||||
<kerning first="110" second="89" amount="-1" />
|
||||
<kerning first="110" second="87" amount="-1" />
|
||||
<kerning first="110" second="86" amount="-1" />
|
||||
<kerning first="109" second="89" amount="-1" />
|
||||
<kerning first="109" second="87" amount="-1" />
|
||||
<kerning first="109" second="86" amount="-1" />
|
||||
<kerning first="107" second="113" amount="-1" />
|
||||
<kerning first="107" second="111" amount="-1" />
|
||||
<kerning first="107" second="103" amount="-1" />
|
||||
<kerning first="107" second="101" amount="-1" />
|
||||
<kerning first="107" second="100" amount="-1" />
|
||||
<kerning first="107" second="99" amount="-1" />
|
||||
<kerning first="107" second="97" amount="-1" />
|
||||
<kerning first="107" second="89" amount="-1" />
|
||||
<kerning first="107" second="87" amount="-1" />
|
||||
<kerning first="107" second="86" amount="-1" />
|
||||
<kerning first="107" second="85" amount="-1" />
|
||||
<kerning first="104" second="89" amount="-1" />
|
||||
<kerning first="104" second="87" amount="-1" />
|
||||
<kerning first="104" second="86" amount="-1" />
|
||||
<kerning first="102" second="121" amount="1" />
|
||||
<kerning first="102" second="119" amount="1" />
|
||||
<kerning first="102" second="118" amount="1" />
|
||||
<kerning first="102" second="108" amount="1" />
|
||||
<kerning first="102" second="107" amount="1" />
|
||||
<kerning first="102" second="104" amount="1" />
|
||||
<kerning first="102" second="98" amount="1" />
|
||||
<kerning first="102" second="97" amount="-1" />
|
||||
<kerning first="102" second="89" amount="2" />
|
||||
<kerning first="102" second="87" amount="2" />
|
||||
<kerning first="102" second="86" amount="2" />
|
||||
<kerning first="102" second="84" amount="2" />
|
||||
<kerning first="102" second="82" amount="1" />
|
||||
<kerning first="102" second="81" amount="1" />
|
||||
<kerning first="102" second="80" amount="1" />
|
||||
<kerning first="102" second="79" amount="1" />
|
||||
<kerning first="102" second="78" amount="1" />
|
||||
<kerning first="102" second="77" amount="1" />
|
||||
<kerning first="102" second="76" amount="1" />
|
||||
<kerning first="102" second="75" amount="1" />
|
||||
<kerning first="102" second="73" amount="1" />
|
||||
<kerning first="102" second="72" amount="1" />
|
||||
<kerning first="102" second="71" amount="1" />
|
||||
<kerning first="102" second="70" amount="1" />
|
||||
<kerning first="102" second="69" amount="1" />
|
||||
<kerning first="102" second="68" amount="1" />
|
||||
<kerning first="102" second="67" amount="1" />
|
||||
<kerning first="102" second="66" amount="1" />
|
||||
<kerning first="101" second="125" amount="-1" />
|
||||
<kerning first="101" second="120" amount="-1" />
|
||||
<kerning first="101" second="89" amount="-2" />
|
||||
<kerning first="101" second="87" amount="-2" />
|
||||
<kerning first="101" second="86" amount="-2" />
|
||||
<kerning first="101" second="84" amount="-2" />
|
||||
<kerning first="101" second="74" amount="-1" />
|
||||
<kerning first="101" second="65" amount="-1" />
|
||||
<kerning first="99" second="89" amount="-1" />
|
||||
<kerning first="99" second="87" amount="-1" />
|
||||
<kerning first="99" second="86" amount="-1" />
|
||||
<kerning first="98" second="120" amount="-1" />
|
||||
<kerning first="98" second="89" amount="-2" />
|
||||
<kerning first="98" second="87" amount="-2" />
|
||||
<kerning first="98" second="86" amount="-2" />
|
||||
<kerning first="98" second="84" amount="-2" />
|
||||
<kerning first="98" second="74" amount="-1" />
|
||||
<kerning first="98" second="65" amount="-1" />
|
||||
<kerning first="97" second="89" amount="-1" />
|
||||
<kerning first="97" second="87" amount="-1" />
|
||||
<kerning first="97" second="86" amount="-1" />
|
||||
<kerning first="89" second="122" amount="-1" />
|
||||
<kerning first="89" second="120" amount="-1" />
|
||||
<kerning first="89" second="117" amount="-1" />
|
||||
<kerning first="89" second="116" amount="-1" />
|
||||
<kerning first="89" second="115" amount="-1" />
|
||||
<kerning first="89" second="114" amount="-1" />
|
||||
<kerning first="68" second="46" amount="-1" />
|
||||
<kerning first="68" second="65" amount="-1" />
|
||||
<kerning first="89" second="113" amount="-2" />
|
||||
<kerning first="89" second="111" amount="-2" />
|
||||
<kerning first="68" second="74" amount="-1" />
|
||||
<kerning first="89" second="110" amount="-1" />
|
||||
<kerning first="89" second="109" amount="-1" />
|
||||
<kerning first="68" second="84" amount="-1" />
|
||||
<kerning first="89" second="103" amount="-2" />
|
||||
<kerning first="89" second="101" amount="-2" />
|
||||
<kerning first="89" second="100" amount="-2" />
|
||||
<kerning first="89" second="99" amount="-2" />
|
||||
<kerning first="89" second="97" amount="-1" />
|
||||
<kerning first="89" second="65" amount="-1" />
|
||||
<kerning first="89" second="38" amount="-1" />
|
||||
<kerning first="87" second="122" amount="-1" />
|
||||
<kerning first="87" second="120" amount="-1" />
|
||||
<kerning first="87" second="117" amount="-1" />
|
||||
<kerning first="87" second="116" amount="-1" />
|
||||
<kerning first="87" second="115" amount="-1" />
|
||||
<kerning first="87" second="114" amount="-1" />
|
||||
<kerning first="87" second="113" amount="-2" />
|
||||
<kerning first="87" second="111" amount="-2" />
|
||||
<kerning first="87" second="110" amount="-1" />
|
||||
<kerning first="87" second="109" amount="-1" />
|
||||
<kerning first="87" second="103" amount="-2" />
|
||||
<kerning first="87" second="101" amount="-2" />
|
||||
<kerning first="87" second="100" amount="-2" />
|
||||
<kerning first="87" second="99" amount="-2" />
|
||||
<kerning first="87" second="97" amount="-1" />
|
||||
<kerning first="87" second="65" amount="-1" />
|
||||
<kerning first="86" second="122" amount="-1" />
|
||||
<kerning first="86" second="120" amount="-1" />
|
||||
<kerning first="86" second="117" amount="-1" />
|
||||
<kerning first="70" second="46" amount="-1" />
|
||||
<kerning first="70" second="65" amount="-1" />
|
||||
<kerning first="86" second="116" amount="-1" />
|
||||
<kerning first="86" second="115" amount="-1" />
|
||||
<kerning first="86" second="114" amount="-1" />
|
||||
<kerning first="86" second="113" amount="-2" />
|
||||
<kerning first="86" second="111" amount="-2" />
|
||||
<kerning first="86" second="110" amount="-1" />
|
||||
<kerning first="86" second="109" amount="-1" />
|
||||
<kerning first="86" second="103" amount="-2" />
|
||||
<kerning first="86" second="101" amount="-2" />
|
||||
<kerning first="74" second="65" amount="-1" />
|
||||
<kerning first="86" second="100" amount="-2" />
|
||||
<kerning first="74" second="120" amount="-1" />
|
||||
<kerning first="86" second="99" amount="-2" />
|
||||
<kerning first="86" second="97" amount="-1" />
|
||||
<kerning first="86" second="65" amount="-1" />
|
||||
<kerning first="86" second="46" amount="-1" />
|
||||
<kerning first="86" second="38" amount="-1" />
|
||||
<kerning first="85" second="120" amount="-1" />
|
||||
<kerning first="85" second="65" amount="-1" />
|
||||
<kerning first="75" second="67" amount="-1" />
|
||||
<kerning first="75" second="71" amount="-1" />
|
||||
<kerning first="75" second="79" amount="-1" />
|
||||
<kerning first="75" second="81" amount="-1" />
|
||||
<kerning first="85" second="46" amount="-1" />
|
||||
<kerning first="84" second="113" amount="-2" />
|
||||
<kerning first="84" second="111" amount="-2" />
|
||||
<kerning first="84" second="108" amount="-1" />
|
||||
<kerning first="84" second="107" amount="-1" />
|
||||
<kerning first="84" second="104" amount="-1" />
|
||||
<kerning first="84" second="103" amount="-2" />
|
||||
<kerning first="84" second="101" amount="-2" />
|
||||
<kerning first="84" second="100" amount="-2" />
|
||||
<kerning first="76" second="92" amount="-1" />
|
||||
<kerning first="84" second="99" amount="-2" />
|
||||
<kerning first="84" second="98" amount="-1" />
|
||||
<kerning first="84" second="81" amount="-1" />
|
||||
<kerning first="84" second="79" amount="-1" />
|
||||
<kerning first="84" second="71" amount="-1" />
|
||||
<kerning first="84" second="67" amount="-1" />
|
||||
<kerning first="84" second="65" amount="-2" />
|
||||
<kerning first="79" second="46" amount="-1" />
|
||||
<kerning first="79" second="65" amount="-1" />
|
||||
<kerning first="84" second="46" amount="-1" />
|
||||
<kerning first="84" second="38" amount="-1" />
|
||||
<kerning first="79" second="74" amount="-1" />
|
||||
<kerning first="81" second="84" amount="-1" />
|
||||
<kerning first="81" second="74" amount="-1" />
|
||||
<kerning first="79" second="84" amount="-1" />
|
||||
<kerning first="81" second="65" amount="-1" />
|
||||
<kerning first="81" second="46" amount="-1" />
|
||||
<kerning first="80" second="74" amount="-1" />
|
||||
<kerning first="80" second="65" amount="-1" />
|
||||
<kerning first="80" second="46" amount="-1" />
|
||||
</kernings>
|
||||
</font>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -43,6 +43,8 @@
|
||||
<Compile Include="Screens\KeyboardOptionsScreen.cs" />
|
||||
<Compile Include="Screens\LoadGameScreen.cs" />
|
||||
<Compile Include="Screens\MainMenuScreen.cs" />
|
||||
<Compile Include="Screens\MenuItem.cs" />
|
||||
<Compile Include="Screens\MenuScreen.cs" />
|
||||
<Compile Include="Screens\MouseOptionsScreen.cs" />
|
||||
<Compile Include="Screens\OptionsScreen.cs" />
|
||||
<Compile Include="Screens\VideoOptionsScreen.cs" />
|
||||
@@ -55,11 +57,13 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Content\montserrat-32_0.png" />
|
||||
<Content Include="Icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Content\logo-square-128.png" />
|
||||
<None Include="Content\montserrat-32.fnt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MonoGameContentReference Include="Content\Content.mgcb" />
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Demo.Screens.Screens;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using MonoGame.Extended;
|
||||
using MonoGame.Extended.Sprites;
|
||||
using MonoGame.Extended.Screens;
|
||||
using MonoGame.Extended.ViewportAdapters;
|
||||
|
||||
namespace Demo.Screens
|
||||
@@ -11,30 +11,32 @@ namespace Demo.Screens
|
||||
{
|
||||
// ReSharper disable once NotAccessedField.Local
|
||||
private readonly GraphicsDeviceManager _graphicsDeviceManager;
|
||||
private SpriteBatch _spriteBatch;
|
||||
private Sprite _sprite;
|
||||
private Camera2D _camera;
|
||||
|
||||
public Game1()
|
||||
{
|
||||
|
||||
_graphicsDeviceManager = new GraphicsDeviceManager(this);
|
||||
Content.RootDirectory = "Content";
|
||||
IsMouseVisible = true;
|
||||
Window.AllowUserResizing = true;
|
||||
|
||||
ScreenComponent screenComponent;
|
||||
Components.Add(screenComponent = new ScreenComponent(this));
|
||||
|
||||
screenComponent.Register(new MainMenuScreen(Services, this));
|
||||
screenComponent.Register(new LoadGameScreen(Services));
|
||||
screenComponent.Register(new OptionsScreen(Services));
|
||||
screenComponent.Register(new AudioOptionsScreen(Services));
|
||||
screenComponent.Register(new VideoOptionsScreen(Services));
|
||||
screenComponent.Register(new KeyboardOptionsScreen(Services));
|
||||
screenComponent.Register(new MouseOptionsScreen(Services));
|
||||
}
|
||||
|
||||
protected override void LoadContent()
|
||||
{
|
||||
_spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||
|
||||
var viewportAdapter = new BoxingViewportAdapter(Window, GraphicsDevice, 800, 480);
|
||||
_camera = new Camera2D(viewportAdapter);
|
||||
|
||||
var logoTexture = Content.Load<Texture2D>("logo-square-128");
|
||||
_sprite = new Sprite(logoTexture)
|
||||
{
|
||||
Position = viewportAdapter.Center.ToVector2()
|
||||
};
|
||||
}
|
||||
|
||||
protected override void UnloadContent()
|
||||
@@ -43,14 +45,11 @@ namespace Demo.Screens
|
||||
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
var deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;
|
||||
var keyboardState = Keyboard.GetState();
|
||||
|
||||
if (keyboardState.IsKeyDown(Keys.Escape))
|
||||
Exit();
|
||||
|
||||
_sprite.Rotation += deltaTime;
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
@@ -58,10 +57,6 @@ namespace Demo.Screens
|
||||
{
|
||||
GraphicsDevice.Clear(Color.Black);
|
||||
|
||||
_spriteBatch.Begin(blendState: BlendState.AlphaBlend, transformMatrix: _camera.GetViewMatrix());
|
||||
_spriteBatch.Draw(_sprite);
|
||||
_spriteBatch.End();
|
||||
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
using MonoGame.Extended.Screens;
|
||||
using System;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class AudioOptionsScreen : Screen
|
||||
public class AudioOptionsScreen : MenuScreen
|
||||
{
|
||||
public AudioOptionsScreen(IServiceProvider serviceProvider)
|
||||
: base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("Back", Show<OptionsScreen>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,20 @@
|
||||
using System;
|
||||
using MonoGame.Extended.Screens;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class KeyboardOptionsScreen : Screen
|
||||
public class KeyboardOptionsScreen : MenuScreen
|
||||
{
|
||||
public KeyboardOptionsScreen(IServiceProvider serviceProvider)
|
||||
: base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("Back", Show<OptionsScreen>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,18 @@
|
||||
using MonoGame.Extended.Screens;
|
||||
using System;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class LoadGameScreen : Screen
|
||||
public class LoadGameScreen : MenuScreen
|
||||
{
|
||||
public LoadGameScreen(IServiceProvider serviceProvider) : base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("Back", Show<MainMenuScreen>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,26 @@
|
||||
using MonoGame.Extended.Screens;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class MainMenuScreen : Screen
|
||||
public class MainMenuScreen : MenuScreen
|
||||
{
|
||||
private readonly Game _game;
|
||||
|
||||
public MainMenuScreen(IServiceProvider serviceProvider, Game game)
|
||||
: base(serviceProvider)
|
||||
{
|
||||
_game = game;
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("New Game", () => { });
|
||||
AddMenuItem("Load Game", Show<LoadGameScreen>);
|
||||
AddMenuItem("Options", Show<OptionsScreen>);
|
||||
AddMenuItem("Exit", _game.Exit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using MonoGame.Extended.BitmapFonts;
|
||||
using MonoGame.Extended.Shapes;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class MenuItem
|
||||
{
|
||||
public MenuItem(BitmapFont font, string text)
|
||||
{
|
||||
Text = text;
|
||||
Font = font;
|
||||
Color = Color.White;
|
||||
}
|
||||
|
||||
public BitmapFont Font { get; }
|
||||
public string Text { get; set; }
|
||||
public Vector2 Position { get; set; }
|
||||
public Color Color { get; set; }
|
||||
public RectangleF BoundingRectangle => new RectangleF(Position, Font.MeasureString(Text));
|
||||
public Action Action { get; set; }
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
spriteBatch.DrawString(Font, Text, Position, Color);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using MonoGame.Extended.BitmapFonts;
|
||||
using MonoGame.Extended.Screens;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public abstract class MenuScreen : Screen
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private SpriteBatch _spriteBatch;
|
||||
|
||||
protected MenuScreen(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
MenuItems = new List<MenuItem>();
|
||||
}
|
||||
|
||||
public List<MenuItem> MenuItems { get; }
|
||||
protected BitmapFont Font { get; private set; }
|
||||
protected ContentManager Content { get; private set; }
|
||||
|
||||
protected void AddMenuItem(string text, Action action)
|
||||
{
|
||||
var menuItem = new MenuItem(Font, text)
|
||||
{
|
||||
Position = new Vector2(300, 200 + 32 * MenuItems.Count),
|
||||
Action = action
|
||||
};
|
||||
|
||||
MenuItems.Add(menuItem);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
Content = new ContentManager(_serviceProvider, "Content");
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
|
||||
_spriteBatch.Dispose();
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
var graphicsDeviceService = (IGraphicsDeviceService)_serviceProvider.GetService(typeof(IGraphicsDeviceService));
|
||||
|
||||
_spriteBatch = new SpriteBatch(graphicsDeviceService.GraphicsDevice);
|
||||
Font = Content.Load<BitmapFont>("montserrat-32");
|
||||
}
|
||||
|
||||
public override void UnloadContent()
|
||||
{
|
||||
Content.Unload();
|
||||
Content.Dispose();
|
||||
|
||||
base.UnloadContent();
|
||||
}
|
||||
|
||||
private MouseState _previousState;
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
base.Update(gameTime);
|
||||
|
||||
var mouseState = Mouse.GetState();
|
||||
var isPressed = mouseState.LeftButton == ButtonState.Released && _previousState.LeftButton == ButtonState.Pressed;
|
||||
|
||||
foreach (var menuItem in MenuItems)
|
||||
{
|
||||
var isHovered = menuItem.BoundingRectangle.Contains(mouseState.X, mouseState.Y);
|
||||
|
||||
menuItem.Color = isHovered ? Color.Yellow : Color.White;
|
||||
|
||||
if (isHovered && isPressed)
|
||||
{
|
||||
menuItem.Action?.Invoke();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_previousState = mouseState;
|
||||
}
|
||||
|
||||
public override void Draw(GameTime gameTime)
|
||||
{
|
||||
base.Draw(gameTime);
|
||||
|
||||
_spriteBatch.Begin();
|
||||
|
||||
foreach (var menuItem in MenuItems)
|
||||
menuItem.Draw(_spriteBatch);
|
||||
|
||||
_spriteBatch.End();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,18 @@
|
||||
using MonoGame.Extended.Screens;
|
||||
using System;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class MouseOptionsScreen : Screen
|
||||
public class MouseOptionsScreen : MenuScreen
|
||||
{
|
||||
public MouseOptionsScreen(IServiceProvider serviceProvider) : base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("Back", Show<OptionsScreen>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,23 @@
|
||||
using MonoGame.Extended.Screens;
|
||||
using System;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class OptionsScreen : Screen
|
||||
public class OptionsScreen : MenuScreen
|
||||
{
|
||||
public OptionsScreen(IServiceProvider serviceProvider)
|
||||
: base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("Audio Options", Show<AudioOptionsScreen>);
|
||||
AddMenuItem("Video Options", Show<VideoOptionsScreen>);
|
||||
AddMenuItem("Keyboard Options", Show<KeyboardOptionsScreen>);
|
||||
AddMenuItem("Mouse Options", Show<MouseOptionsScreen>);
|
||||
AddMenuItem("Back", Show<MainMenuScreen>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,18 @@
|
||||
using MonoGame.Extended.Screens;
|
||||
using System;
|
||||
|
||||
namespace Demo.Screens.Screens
|
||||
{
|
||||
public class VideoOptionsScreen : Screen
|
||||
public class VideoOptionsScreen : MenuScreen
|
||||
{
|
||||
public VideoOptionsScreen(IServiceProvider serviceProvider) : base(serviceProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
base.LoadContent();
|
||||
|
||||
AddMenuItem("Back", Show<OptionsScreen>);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,33 @@ namespace MonoGame.Extended.Screens
|
||||
{
|
||||
public abstract class Screen : IDraw, IDisposable
|
||||
{
|
||||
protected Screen()
|
||||
{
|
||||
}
|
||||
|
||||
public IScreenManager ScreenManager { get; internal set; }
|
||||
public bool IsInitialized { get; private set; }
|
||||
public bool IsVisible { get; set; }
|
||||
|
||||
public T FindScreen<T>() where T : Screen
|
||||
{
|
||||
return ScreenManager?.FindScreen<T>();
|
||||
}
|
||||
|
||||
public void Show<T>(bool hideThis) where T : Screen
|
||||
{
|
||||
var screen = FindScreen<T>();
|
||||
screen.Show();
|
||||
|
||||
if (hideThis)
|
||||
Hide();
|
||||
}
|
||||
|
||||
public void Show<T>() where T : Screen
|
||||
{
|
||||
Show<T>(true);
|
||||
}
|
||||
|
||||
public void Show()
|
||||
{
|
||||
if (!IsInitialized)
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace MonoGame.Extended.Screens
|
||||
{
|
||||
public class ScreenComponent : DrawableGameComponent
|
||||
public interface IScreenManager
|
||||
{
|
||||
T FindScreen<T>() where T : Screen;
|
||||
}
|
||||
|
||||
public class ScreenComponent : DrawableGameComponent, IScreenManager
|
||||
{
|
||||
public ScreenComponent(Game game)
|
||||
: base(game)
|
||||
@@ -14,17 +20,24 @@ namespace MonoGame.Extended.Screens
|
||||
|
||||
private readonly List<Screen> _screens;
|
||||
|
||||
public void Register(Screen screen)
|
||||
public T Register<T>(T screen)
|
||||
where T : Screen
|
||||
{
|
||||
screen.ScreenManager = this;
|
||||
_screens.Add(screen);
|
||||
|
||||
if (_screens.Count == 1)
|
||||
_screens[0].Show();
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
foreach (var screen in _screens)
|
||||
screen.Initialize();
|
||||
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
protected override void LoadContent()
|
||||
@@ -58,5 +71,15 @@ namespace MonoGame.Extended.Screens
|
||||
foreach (var screen in _screens.Where(s => s.IsVisible))
|
||||
screen.Draw(gameTime);
|
||||
}
|
||||
|
||||
public T FindScreen<T>() where T : Screen
|
||||
{
|
||||
var screen = _screens.OfType<T>().FirstOrDefault();
|
||||
|
||||
if (screen == null)
|
||||
throw new InvalidOperationException($"{typeof(T).Name} not registered");
|
||||
|
||||
return screen;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user