From b1ce3dc93369362dea55cea29d71f6a200bde3e5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 1 Sep 2019 11:55:41 +0200 Subject: [PATCH] generify the demos to make them work on android and desktop --- AndroidTests/Activity1.cs | 25 ---- AndroidTests/AndroidTests.csproj | 113 ------------------ AndroidTests/Content/Content.mgcb | 34 ------ .../Content/Fonts/TestFont.spritefont | 60 ---------- AndroidTests/Content/Textures/Test.png | Bin 896 -> 0 bytes AndroidTests/GameImpl.cs | 57 --------- AndroidTests/Properties/AndroidManifest.xml | 5 - AndroidTests/Properties/AssemblyInfo.cs | 41 ------- AndroidTests/Resources/Drawable/Icon.png | Bin 24313 -> 0 bytes AndroidTests/Resources/Drawable/Splash.png | Bin 33526 -> 0 bytes AndroidTests/Resources/Resource.Designer.cs | 99 --------------- AndroidTests/Resources/Values/Strings.xml | 5 - AndroidTests/Resources/Values/Styles.xml | 7 -- AndroidTests/packages.config | 6 - Demos/AnimationDemo.cs | 13 +- Demos/AutoTilingDemo.cs | 9 +- Demos/Demo.cs | 37 ++++++ Demos/Demos.csproj | 13 +- Demos/GameImpl.cs | 89 ++++++++++++++ Demos/PathfindingDemo.cs | 14 ++- Demos/Program.cs | 41 ------- Demos/UiDemo.cs | 16 ++- MLEM.sln | 8 +- 23 files changed, 170 insertions(+), 522 deletions(-) delete mode 100644 AndroidTests/Activity1.cs delete mode 100644 AndroidTests/AndroidTests.csproj delete mode 100644 AndroidTests/Content/Content.mgcb delete mode 100644 AndroidTests/Content/Fonts/TestFont.spritefont delete mode 100644 AndroidTests/Content/Textures/Test.png delete mode 100644 AndroidTests/GameImpl.cs delete mode 100644 AndroidTests/Properties/AndroidManifest.xml delete mode 100644 AndroidTests/Properties/AssemblyInfo.cs delete mode 100644 AndroidTests/Resources/Drawable/Icon.png delete mode 100644 AndroidTests/Resources/Drawable/Splash.png delete mode 100644 AndroidTests/Resources/Resource.Designer.cs delete mode 100644 AndroidTests/Resources/Values/Strings.xml delete mode 100644 AndroidTests/Resources/Values/Styles.xml delete mode 100644 AndroidTests/packages.config create mode 100644 Demos/Demo.cs create mode 100644 Demos/GameImpl.cs delete mode 100644 Demos/Program.cs diff --git a/AndroidTests/Activity1.cs b/AndroidTests/Activity1.cs deleted file mode 100644 index cf60926..0000000 --- a/AndroidTests/Activity1.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Android.App; -using Android.Content.PM; -using Android.OS; -using Android.Views; - -namespace AndroidTests { - [Activity(Label = "AndroidTests" - , MainLauncher = true - , Icon = "@drawable/icon" - , Theme = "@style/Theme.Splash" - , AlwaysRetainTaskState = true - , LaunchMode = LaunchMode.SingleInstance - , ScreenOrientation = ScreenOrientation.UserLandscape - , ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize)] - public class Activity1 : Microsoft.Xna.Framework.AndroidGameActivity { - - protected override void OnCreate(Bundle bundle) { - base.OnCreate(bundle); - var g = new GameImpl(); - this.SetContentView((View) g.Services.GetService(typeof(View))); - g.Run(); - } - - } -} \ No newline at end of file diff --git a/AndroidTests/AndroidTests.csproj b/AndroidTests/AndroidTests.csproj deleted file mode 100644 index 9c259f5..0000000 --- a/AndroidTests/AndroidTests.csproj +++ /dev/null @@ -1,113 +0,0 @@ - - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {410C0262-131C-4D0E-910D-D01B4F7143E0} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties - 512 - true - Resources\Resource.Designer.cs - Off - armeabi-v7a;x86 - .m4a - - v9.0 - Android - Properties\AndroidManifest.xml - True - AndroidTests - - - true - full - false - bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\ - DEBUG;TRACE;ANDROID - prompt - 4 - True - None - - - pdbonly - true - bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\ - TRACE;ANDROID - prompt - 4 - False - SdkOnly - - - - ..\packages\Coroutine.1.0.1\lib\netstandard2.0\Coroutine.dll - True - - - - ..\packages\MonoGame.Extended.3.7.0\lib\netstandard2.0\MonoGame.Extended.dll - True - - - - ..\packages\Newtonsoft.Json.11.0.2\lib\netstandard2.0\Newtonsoft.Json.dll - True - - - - - - - $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Android\MonoGame.Framework.dll - - - - - - - - - - - - - - - - - - - - - - - - {232a6513-a28c-4d7f-ba5a-89281bfc1538} - MLEM.Extended - - - {997f4739-7bec-4621-b9ca-68deb2d74412} - MLEM.Startup - - - {6f00629a-8b87-4264-8896-19983285e32f} - MLEM.Ui - - - {1d6ab762-43c4-4775-8924-707c7ec3f142} - MLEM - - - - - - - - - \ No newline at end of file diff --git a/AndroidTests/Content/Content.mgcb b/AndroidTests/Content/Content.mgcb deleted file mode 100644 index e25af4b..0000000 --- a/AndroidTests/Content/Content.mgcb +++ /dev/null @@ -1,34 +0,0 @@ - -#----------------------------- Global Properties ----------------------------# - -/outputDir:bin/$(Platform) -/intermediateDir:obj/$(Platform) -/platform:Android -/config: -/profile:Reach -/compress:False - -#-------------------------------- References --------------------------------# - - -#---------------------------------- Content ---------------------------------# - -#begin Textures/Test.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:Textures/Test.png - -#begin Fonts/TestFont.spritefont -/importer:FontDescriptionImporter -/processor:FontDescriptionProcessor -/processorParam:PremultiplyAlpha=True -/processorParam:TextureFormat=Compressed -/build:Fonts/TestFont.spritefont - diff --git a/AndroidTests/Content/Fonts/TestFont.spritefont b/AndroidTests/Content/Fonts/TestFont.spritefont deleted file mode 100644 index 54ab9ac..0000000 --- a/AndroidTests/Content/Fonts/TestFont.spritefont +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - Arial - - - 32 - - - 0 - - - true - - - - - - * - - - - - - ɏ - - - - diff --git a/AndroidTests/Content/Textures/Test.png b/AndroidTests/Content/Textures/Test.png deleted file mode 100644 index 7d88c33500f8b645481467247adf547c8218eba0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 896 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>V7BsfaSW-L z^Y)f+-em`gV;|Gi-mx!mDH7L-n2Q`RiHxr*Gc8dF{I6Y1>v8&5-k+^lyrJX{Eu1lMfgE|8wX>E^Pg?ZefjT;{P8XAIPX<@p!@ZI z?i!xWH{Zko`Rf^f@zu>*mS;3`#>teVTc7KvrK<7#$T16^mYTLy&}I83j+|?Z3!4un ztc;m;`$mkP$B@%D|y=T1sIzHffj^V8FBUqeG*`tQ6j{e1lPUyX@M ziu;aOZWoDI$(JSk!MD_RuS#g>)BVbx*P%X*Ot$X{7+(q(r(h+CG{eN12aLK6-6n8fM^8KROqgORj zJJ#AQ6aAu``Rw(Ly;JY)m(SVpwfokFx2Xk=DSKU3zWm$6w0r$_O@}0r8|-yl9k(+2 zJzICwi1+SfOOW1SU&C~SN9^{2zYpcvj`D@g2&fGFkdW@aR)(W5tpi__nzDMyzMWx%{fyrSbdgwQSUPWLj^3w;{uLZGn2hcU9L& zuSut#Jv&>ov1HTrf7Y+X*`kBelUmZ5dJT<|SZbHSK-)VqyVl6$KIeI% mvbkb>x0!(HpBkXTtDf<7+3ek`Ro+{G%=2{hb6Mw<&;$Ur(3j)@ diff --git a/AndroidTests/GameImpl.cs b/AndroidTests/GameImpl.cs deleted file mode 100644 index 738ac56..0000000 --- a/AndroidTests/GameImpl.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using MLEM.Font; -using MLEM.Startup; -using MLEM.Textures; -using MLEM.Ui; -using MLEM.Ui.Elements; -using MLEM.Ui.Style; - -namespace AndroidTests { - public class GameImpl : MlemGame { - - protected override void LoadContent() { - base.LoadContent(); - var tex = LoadContent("Textures/Test"); - var style = new UntexturedStyle(this.SpriteBatch) { - Font = new GenericSpriteFont(LoadContent("Fonts/TestFont")), - TextScale = 0.1F, - PanelTexture = new NinePatch(new TextureRegion(tex, 0, 8, 24, 24), 8), - ButtonTexture = new NinePatch(new TextureRegion(tex, 24, 8, 16, 16), 4), - TextFieldTexture = new NinePatch(new TextureRegion(tex, 24, 8, 16, 16), 4), - ScrollBarBackground = new NinePatch(new TextureRegion(tex, 12, 0, 4, 8), 1, 1, 2, 2), - ScrollBarScrollerTexture = new NinePatch(new TextureRegion(tex, 8, 0, 4, 8), 1, 1, 2, 2), - CheckboxTexture = new NinePatch(new TextureRegion(tex, 24, 8, 16, 16), 4), - CheckboxCheckmark = new TextureRegion(tex, 24, 0, 8, 8), - RadioTexture = new NinePatch(new TextureRegion(tex, 16, 0, 8, 8), 3), - RadioCheckmark = new TextureRegion(tex, 32, 0, 8, 8) - }; - this.UiSystem.Style = style; - this.UiSystem.GlobalScale = 15; - this.UiSystem.AutoScaleWithScreen = true; - - var panel = new Panel(Anchor.Center, new Vector2(100, 50), Vector2.Zero, false, true, new Point(5, 10)); - this.UiSystem.Add("Panel", panel); - panel.AddChild(new Paragraph(Anchor.AutoLeft, 1, "I am Android")); - - var image = new Image(Anchor.AutoCenter, new Vector2(50, 50), new TextureRegion(tex, 0, 0, 8, 8)) {IsHidden = true}; - panel.AddChild(image); - panel.AddChild(new Button(Anchor.AutoCenter, new Vector2(0.5F, 10), "Toggle Image") { - OnPressed = element => image.IsHidden = !image.IsHidden - }); - - panel.AddChild(new TextField(Anchor.AutoLeft, new Vector2(1, 10)) {PlaceholderText = "Tap to type"}); - - panel.AddChild(new Paragraph(Anchor.AutoLeft, 1, "Here is some text that makes it so that the panel is actually long enough for me to try out the scroll behavior.")); - panel.AddChild(new Slider(Anchor.AutoLeft, new Vector2(1, 10), 5, 100)); - - panel.AddChild(new Paragraph(Anchor.AutoLeft, 1, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sapien elit, congue sit amet condimentum in, hendrerit iaculis leo. Phasellus mollis turpis felis, ac finibus elit tincidunt quis. Vestibulum maximus, velit non consequat porttitor, quam diam consequat eros, in cursus nunc mi id dui. Vivamus semper neque at feugiat semper. Nunc ultrices egestas placerat. Proin lectus felis, rutrum quis porta vel, eleifend eget eros. Morbi porttitor massa finibus felis vestibulum, quis faucibus dui volutpat. Nam enim mi, euismod a pharetra vel, suscipit eu tortor. Integer vehicula ligula at consectetur dictum. Etiam fringilla volutpat est, id egestas nunc. Maecenas turpis felis, eleifend non felis a, fringilla lobortis nibh. Morbi rhoncus vestibulum dignissim. Ut posuere nulla ipsum, non condimentum dui posuere sit amet.")); - } - - protected override void DoDraw(GameTime gameTime) { - this.GraphicsDevice.Clear(Color.CornflowerBlue); - base.DoDraw(gameTime); - } - - } -} \ No newline at end of file diff --git a/AndroidTests/Properties/AndroidManifest.xml b/AndroidTests/Properties/AndroidManifest.xml deleted file mode 100644 index e775002..0000000 --- a/AndroidTests/Properties/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/AndroidTests/Properties/AssemblyInfo.cs b/AndroidTests/Properties/AssemblyInfo.cs deleted file mode 100644 index 1224698..0000000 --- a/AndroidTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Android.App; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AndroidTests")] -[assembly: AssemblyProduct("AndroidTests")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6f377592-2266-4c47-855e-6260ff75e1f4")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -// Add some common permissions, these can be removed if not needed -[assembly: UsesPermission(Android.Manifest.Permission.Internet)] -[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)] \ No newline at end of file diff --git a/AndroidTests/Resources/Drawable/Icon.png b/AndroidTests/Resources/Drawable/Icon.png deleted file mode 100644 index f6f4f411136ab86ead0158ea9b18647f254ba2c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24313 zcmeHP3pkVS`+prOlca;BQzP-OO4y+pp#Y%e%(Ss_bzRI6aQKTk zT$rPc4UEg<1Ta}30EAT~xeL8_w&_u7+Q4C+)(@Lb#<5ldaH9;38^e7L4Br9J)(zLO zycQXyTwAvKqyLs+>!Ux00X=he0Yiwxv_TXE7?cUn& zrJ}N75r60yZ+~-O2|#pV;V< z5k6-z4yq9a1Ax$N-Z8^07Xc9o)+QwYjGzkGj304Z4d$elf~vUqEPWw2GMB0X6c)$c zj+<419hn<@XN>Su)3X;7UR-9Kw5I9*IXpn~6?|`8qR|Lyt(sHm5C9m{UViB(VMa{t zn^(`@1k|z`Tdp1W8PvpqQzm?@`I)~(RUH^UyR5Nl;p^A;)wtJHPJ~;@T z+WoNAnkl|ocb2tp77@N%j!)k2dV@S}tk&Sc4U_!$7oc8lru@P_=RDgS{u$E#tX|dx zEZt+7kXd+e?T@82c4(H{w%THKYc#v9*68Q;$W=eK{aOA3cXGao?xv648*^RZ&euif z+_u|JxEcFG=iMsIN5kDeGOw9<5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E-%;9$lYc{9yvA}zLyDKjo3Ry@Le45vzm>vN-iIj1 z6Gd)Gi-N05Jv8s1of7$Y=~S1v$7*dWK92inmF-&}MxGKw_N6wZJQM8|wD~nb%vH5& zU#hfiXExk4W+q3h%X)Izuz|WF;-q7AXzq&V`+OW(d&4NFt9;;w7jG`Aw*6@cU>%62 V7kr1PiN8bC(QdYFmi3}F{|ELgtUdq$ diff --git a/AndroidTests/Resources/Drawable/Splash.png b/AndroidTests/Resources/Drawable/Splash.png deleted file mode 100644 index 2f8610744f28972ad98c5764d2fdfb129f9c26d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33526 zcmeFaby$_#);>%sf(R%fAT83}wGaW3?k*7)NXMd6QBXla5m?e8-QA&50s;a8(jeWj z=={yaK4LTWaVy>nJJ+o7&s5o0!=@ zg0j2YI)JB9P(;Pu9ZXEEq0ZEgpca;PVzg`3^|aKMW@5D3e2Sck4wBHvmJd9gpz5AV z8m6Asrb1@4;t*_6cVWYXjk z|Js~?=?Pi$Kh7QMZuvhnL)QG!>`WB?*dbA{R$)mesEM<^lZL&$4df3gQ~4)^)RK~C zQboi|}GZX^kk%x_whmD&{gPTW~ms6ONkByTLNaf!; z`QyoReJI+SS(&MJg z*xcU9*2EcNX=`Eu<#4dG5asym%fCJOr&I|`+S}MWfoVY@Jfa-`>FfX4O3L2U1u51N zcBW7m*bLa;HVJIind06vvG~_-|5;&U3HifpnAw|JnhF0ks0lCh5igH`06>gikd2EA z%F8Cm&&$mQHRs|MFc;*3@^bNuav+r#bn(}`ko}&0`>!MZeK{A+7bymcio&vXFlQ66 z99by{_=4RM%#5Ftk5iCeP>4;y#FU%u5tLVuO^}C^pY72jQ_e?bJe+2N=6q+e@vqJQ zn%O_P{^#ib=-TYR?D}ub|E+6fCreF-54087W?GXQ=n|~YXfhBUMJeW1)b1iX@kdu@PyNrG!0gSP-AtUI5*9#%{x>G-v4E*5zWu2U|2O~mYf1k%dp+0J??KK1a&hrDTo>bW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3?l@!*?~(>;De z2AS)-$pA7ZJwYa|;frAi|kDaSUP zwL03TVRGN;GD@O3AgO`J5J!!L6D_CIuBWHDG@@RG{U`m5}3Byllg7U_Vi0AD|$;q~ru5YD#x_PrRw>=e~dH#*9 zaXhr->b|AC$Z3|>roRt<0>}4Dj(>?td@GccFU+!V+rru%>li`h>kkK@`+(jw1J<~} zfs~$}9$+KoUg2?Bwq`|TWl*~yZf{lJO&Q_2;%82rxbU(hYV9_l$jX%~`x=&lHlFSH zey{p$+GpTgu*~u8mo8mu${Ooy#cMX^O3Ey3F4Y)VJ2$We@ z?DPXJ@mLpY?LMIknCJTY%S&3cX1);GAoF;wx{69lYUT^+XCRD$R1Y;${H z_Z7IZ54eIWrF>U8hO-YH+5j(!q-cdj% zom18GQkK5ttphn`*8VH6RIo-yMyj5UT6^u3*}gT6ZmEt!EP;xvRBt{zEX_BqSs7S_ zU5Np%2(>PF;E5q*rtkCf|$A430v4#c<*tuCi zB@^b)-=A_)$WdTR)Z1S3doPMCRspBR)PYI!`JM;BqzTL{-tq^%{QUIv^x}3DEIgWI zD8Zw;oMUeKi8E*Ze7Wr3T5r8`y3G|}0|waenQjyEGGg(C)0<+&RNUotwkjPlj1>`C zq_9Gy%28kn*V$AJ9p+vpV1s|-(-*}rZ)Up&3W{HQHcd?4^3j!@f8J*E*{l%yIw|4( z?N{9=E~t4etV$LGr9+mf`_G@5tdhMss`=}z9g{kj>*ehWm=LAEsW|s=>GXx*TAM+B uF{o|<4sRfLkVxVJ=gE-uuF(8f&#+eO?cW#2<0b=5X7F_Nb6Mw<&;$Sn6xLAy diff --git a/AndroidTests/Resources/Resource.Designer.cs b/AndroidTests/Resources/Resource.Designer.cs deleted file mode 100644 index 52ce691..0000000 --- a/AndroidTests/Resources/Resource.Designer.cs +++ /dev/null @@ -1,99 +0,0 @@ -#pragma warning disable 1591 -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -[assembly: global::Android.Runtime.ResourceDesignerAttribute("AndroidTests.Resource", IsApplication=true)] - -namespace AndroidTests -{ - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] - public partial class Resource - { - - static Resource() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - public static void UpdateIdValues() - { - } - - public partial class Attribute - { - - static Attribute() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private Attribute() - { - } - } - - public partial class Drawable - { - - // aapt resource value: 0x7f020000 - public const int Icon = 2130837504; - - // aapt resource value: 0x7f020001 - public const int Splash = 2130837505; - - static Drawable() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private Drawable() - { - } - } - - public partial class String - { - - // aapt resource value: 0x7f030001 - public const int ApplicationName = 2130903041; - - // aapt resource value: 0x7f030000 - public const int Hello = 2130903040; - - static String() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private String() - { - } - } - - public partial class Style - { - - // aapt resource value: 0x7f040000 - public const int Theme_Splash = 2130968576; - - static Style() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private Style() - { - } - } - } -} -#pragma warning restore 1591 diff --git a/AndroidTests/Resources/Values/Strings.xml b/AndroidTests/Resources/Values/Strings.xml deleted file mode 100644 index 7448bbf..0000000 --- a/AndroidTests/Resources/Values/Strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, Click Me! - AndroidTests - diff --git a/AndroidTests/Resources/Values/Styles.xml b/AndroidTests/Resources/Values/Styles.xml deleted file mode 100644 index 5102134..0000000 --- a/AndroidTests/Resources/Values/Styles.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/AndroidTests/packages.config b/AndroidTests/packages.config deleted file mode 100644 index 003ddcd..0000000 --- a/AndroidTests/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Demos/AnimationDemo.cs b/Demos/AnimationDemo.cs index 4168dbf..c838d19 100644 --- a/Demos/AnimationDemo.cs +++ b/Demos/AnimationDemo.cs @@ -7,12 +7,15 @@ using MLEM.Startup; using MLEM.Textures; namespace Demos { - public class AnimationDemo : MlemGame { + public class AnimationDemo : Demo { private SpriteAnimationGroup group; private int facing; - protected override void LoadContent() { + public AnimationDemo(MlemGame game) : base(game) { + } + + public override void LoadContent() { base.LoadContent(); var tex = LoadContent("Textures/Anim"); @@ -37,7 +40,7 @@ namespace Demos { // you can also add a priority to an animation in the group (10 in this case, which is higher than the default of 0) // if two animations' playing conditions are both true, then the one with the higher priority will be picked to play // in this instance, a standing "animation" is displayed when we're facing down and also holding the space key - this.group.Add(new SpriteAnimation(1F, tex, new Rectangle(0, 0, 8, 8)) {Name = "DownStanding"}, () => this.facing == 0 && Input.IsKeyDown(Keys.Space), 10); + this.group.Add(new SpriteAnimation(1F, tex, new Rectangle(0, 0, 8, 8)) {Name = "DownStanding"}, () => this.facing == 0 && this.InputHandler.IsKeyDown(Keys.Space), 10); // you can also add a callback to see when the animation used changes this.group.OnAnimationChanged += (anim, newAnim) => { @@ -45,7 +48,7 @@ namespace Demos { }; } - protected override void Update(GameTime gameTime) { + public override void Update(GameTime gameTime) { base.Update(gameTime); if (this.InputHandler.IsKeyDown(Keys.Down)) @@ -62,7 +65,7 @@ namespace Demos { this.group.Update(gameTime); } - protected override void DoDraw(GameTime gameTime) { + public override void DoDraw(GameTime gameTime) { this.GraphicsDevice.Clear(Color.Black); this.SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, transformMatrix: Matrix.CreateScale(10)); diff --git a/Demos/AutoTilingDemo.cs b/Demos/AutoTilingDemo.cs index 37521c3..711259e 100644 --- a/Demos/AutoTilingDemo.cs +++ b/Demos/AutoTilingDemo.cs @@ -7,12 +7,15 @@ namespace Demos { /// /// This is a demo for . /// - public class AutoTilingDemo : MlemGame { + public class AutoTilingDemo : Demo { private Texture2D texture; private string[] layout; - protected override void LoadContent() { + public AutoTilingDemo(MlemGame game) : base(game) { + } + + public override void LoadContent() { base.LoadContent(); // The layout of the texture is important for auto tiling to work correctly. // It needs to be laid out as follows: Five tiles aligned horizontally within the texture file, with the following information @@ -35,7 +38,7 @@ namespace Demos { }; } - protected override void DoDraw(GameTime gameTime) { + public override void DoDraw(GameTime gameTime) { this.GraphicsDevice.Clear(Color.Black); // the texture region supplied to the AutoTiling method should only encompass the first filler tile's location and size diff --git a/Demos/Demo.cs b/Demos/Demo.cs new file mode 100644 index 0000000..be050da --- /dev/null +++ b/Demos/Demo.cs @@ -0,0 +1,37 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using MLEM.Input; +using MLEM.Startup; +using MLEM.Ui; + +namespace Demos { + public class Demo { + + public readonly MlemGame Game; + public SpriteBatch SpriteBatch => this.Game.SpriteBatch; + public GraphicsDevice GraphicsDevice => this.Game.GraphicsDevice; + public InputHandler InputHandler => this.Game.InputHandler; + public UiSystem UiSystem => this.Game.UiSystem; + + public Demo(MlemGame game) { + this.Game = game; + } + + public virtual void LoadContent() { + } + + public virtual void Update(GameTime time) { + } + + public virtual void DoDraw(GameTime time) { + } + + public virtual void Clear() { + } + + public static T LoadContent(string name) { + return MlemGame.LoadContent(name); + } + + } +} \ No newline at end of file diff --git a/Demos/Demos.csproj b/Demos/Demos.csproj index b0fecce..6ee6d31 100644 --- a/Demos/Demos.csproj +++ b/Demos/Demos.csproj @@ -1,8 +1,7 @@  - Exe - net462 + netstandard2.0 @@ -13,13 +12,9 @@ - - - - - - - + + all + diff --git a/Demos/GameImpl.cs b/Demos/GameImpl.cs new file mode 100644 index 0000000..38c5b40 --- /dev/null +++ b/Demos/GameImpl.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using MLEM.Font; +using MLEM.Startup; +using MLEM.Textures; +using MLEM.Ui; +using MLEM.Ui.Elements; +using MLEM.Ui.Style; + +namespace Demos { + public class GameImpl : MlemGame { + + private static readonly Dictionary> Demos = new Dictionary>(); + private Demo activeDemo; + + static GameImpl() { + Demos.Add("Ui", game => new UiDemo(game)); + Demos.Add("Animation", game => new AnimationDemo(game)); + Demos.Add("AutoTiling", game => new AutoTilingDemo(game)); + Demos.Add("Pathfinding", game => new PathfindingDemo(game)); + } + + public GameImpl() { + this.IsMouseVisible = true; + } + + protected override void LoadContent() { + base.LoadContent(); + + var tex = LoadContent("Textures/Test"); + this.UiSystem.Style = new UntexturedStyle(this.SpriteBatch) { + Font = new GenericSpriteFont(LoadContent("Fonts/TestFont")), + TextScale = 0.1F, + PanelTexture = new NinePatch(new TextureRegion(tex, 0, 8, 24, 24), 8), + ButtonTexture = new NinePatch(new TextureRegion(tex, 24, 8, 16, 16), 4), + ScrollBarBackground = new NinePatch(new TextureRegion(tex, 12, 0, 4, 8), 1, 1, 2, 2), + ScrollBarScrollerTexture = new NinePatch(new TextureRegion(tex, 8, 0, 4, 8), 1, 1, 2, 2), + }; + this.UiSystem.AutoScaleReferenceSize = new Point(1280, 720); + this.UiSystem.AutoScaleWithScreen = true; + this.UiSystem.GlobalScale = 5; + + var selection = new Panel(Anchor.Center, new Vector2(100, 80), Vector2.Zero, false, true, new Point(5, 10)); + this.UiSystem.Add("DemoSelection", selection); + + var backButton = new Button(Anchor.TopRight, new Vector2(30, 10), "Back") { + OnPressed = e => { + this.activeDemo.Clear(); + this.activeDemo = null; + this.UiSystem.Remove("BackButton"); + this.UiSystem.Add("DemoSelection", selection); + } + }; + + selection.AddChild(new Paragraph(Anchor.AutoLeft, 1, "Select the demo you want to see below. Check the demos' source code for more in-depth explanations of their functionality.")); + selection.AddChild(new VerticalSpace(5)); + foreach (var demo in Demos) { + selection.AddChild(new Button(Anchor.AutoCenter, new Vector2(1, 10), demo.Key) { + OnPressed = e => { + this.UiSystem.Remove("DemoSelection"); + this.UiSystem.Add("BackButton", backButton); + + this.activeDemo = demo.Value.Invoke(this); + this.activeDemo.LoadContent(); + }, + PositionOffset = new Vector2(0, 1) + }); + } + } + + protected override void DoDraw(GameTime gameTime) { + if (this.activeDemo != null) { + this.activeDemo.DoDraw(gameTime); + } else { + this.GraphicsDevice.Clear(Color.CornflowerBlue); + } + base.DoDraw(gameTime); + } + + protected override void Update(GameTime gameTime) { + base.Update(gameTime); + if (this.activeDemo != null) + this.activeDemo.Update(gameTime); + } + + } +} \ No newline at end of file diff --git a/Demos/PathfindingDemo.cs b/Demos/PathfindingDemo.cs index 770e6a2..c0ab53e 100644 --- a/Demos/PathfindingDemo.cs +++ b/Demos/PathfindingDemo.cs @@ -10,12 +10,16 @@ using MLEM.Startup; using MonoGame.Extended; namespace Demos { - public class PathfindingDemo : MlemGame { + public class PathfindingDemo : Demo { private bool[,] world; private AStar2 pathfinder; private List path; + public PathfindingDemo(MlemGame game) : base(game) { + + } + private void Init() { // generate a simple random world for testing, where true is walkable area, and false is a wall var random = new Random(); @@ -53,21 +57,21 @@ namespace Demos { Console.WriteLine("Couldn't find a path, press the left mouse button to try again"); } - protected override void LoadContent() { + public override void LoadContent() { base.LoadContent(); this.Init(); } - protected override void Update(GameTime gameTime) { + public override void Update(GameTime gameTime) { base.Update(gameTime); // when pressing the left mouse button, generate a new world and find a new path - if (Input.IsMouseButtonPressed(MouseButton.Left)) { + if (this.InputHandler.IsMouseButtonPressed(MouseButton.Left)) { this.Init(); } } - protected override void DoDraw(GameTime gameTime) { + public override void DoDraw(GameTime gameTime) { this.GraphicsDevice.Clear(Color.White); this.SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, transformMatrix: Matrix.CreateScale(14)); diff --git a/Demos/Program.cs b/Demos/Program.cs deleted file mode 100644 index 50716e3..0000000 --- a/Demos/Program.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Xna.Framework; - -namespace Demos { - public static class Program { - - private static readonly Dictionary> Demos = new Dictionary>(); - - static Program() { - Demos.Add("Ui", () => new UiDemo()); - Demos.Add("AutoTiling", () => new AutoTilingDemo()); - Demos.Add("Animation", () => new AnimationDemo()); - Demos.Add("Pathfinding", () => new PathfindingDemo()); - } - - public static void Main(string[] args) { - Func demoUsed; - if (args.Length <= 0 || !Demos.ContainsKey(args[0])) { - beforeDemo: - Console.WriteLine("Please type the name of the demo you want to see and press Enter."); - Console.WriteLine("The following demos are available: " + string.Join(", ", Demos.Keys)); - Console.WriteLine("(Alternatively, you can supply the name of the demo you want to see as the first argument)"); - var demo = Console.ReadLine(); - if (!Demos.ContainsKey(demo)) { - Console.WriteLine("Not a valid demo."); - goto beforeDemo; - } else { - demoUsed = Demos[demo]; - } - } else { - demoUsed = Demos[args[0]]; - } - - using (var game = demoUsed.Invoke()) - game.Run(); - } - - } -} \ No newline at end of file diff --git a/Demos/UiDemo.cs b/Demos/UiDemo.cs index 322a608..b93f70a 100644 --- a/Demos/UiDemo.cs +++ b/Demos/UiDemo.cs @@ -22,16 +22,15 @@ namespace Demos { /// - Call the instance's DrawEarly method before clearing your /// - Call the instance's Draw method in your game's Draw method /// - public class UiDemo : MlemGame { + public class UiDemo : Demo { private Texture2D testTexture; private NinePatch testPatch; - public UiDemo() { - this.IsMouseVisible = true; + public UiDemo(MlemGame game) : base(game) { } - protected override void LoadContent() { + public override void LoadContent() { this.testTexture = LoadContent("Textures/Test"); this.testPatch = new NinePatch(new TextureRegion(this.testTexture, 0, 8, 24, 24), 8); base.LoadContent(); @@ -55,7 +54,7 @@ namespace Demos { RadioTexture = new NinePatch(new TextureRegion(this.testTexture, 16, 0, 8, 8), 3), RadioCheckmark = new TextureRegion(this.testTexture, 32, 0, 8, 8) }; - var untexturedStyle = this.UiSystem.Style; + var untexturedStyle = new UntexturedStyle(this.SpriteBatch); // set the defined style as the current one this.UiSystem.Style = style; // scale every ui up by 5 @@ -200,7 +199,12 @@ namespace Demos { button.AddedDisplayOffset = Vector2.Zero; } - protected override void DoDraw(GameTime gameTime) { + public override void Clear() { + this.UiSystem.Remove("Test"); + this.UiSystem.Remove("TestTooltip"); + } + + public override void DoDraw(GameTime gameTime) { this.GraphicsDevice.Clear(Color.CornflowerBlue); base.DoDraw(gameTime); } diff --git a/MLEM.sln b/MLEM.sln index 66892c2..c98fe0f 100644 --- a/MLEM.sln +++ b/MLEM.sln @@ -10,7 +10,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demos", "Demos\Demos.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MLEM.Ui", "MLEM.Ui\MLEM.Ui.csproj", "{6F00629A-8B87-4264-8896-19983285E32F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidTests", "AndroidTests\AndroidTests.csproj", "{410C0262-131C-4D0E-910D-D01B4F7143E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demos.DesktopGL", "Demos.DesktopGL\Demos.DesktopGL.csproj", "{468A868F-FB75-4D48-BC03-6F9FCDB014C9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demos.Android", "AndroidDemos\Demos.Android.csproj", "{410C0262-131C-4D0E-910D-D01B4F7143E0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -38,6 +40,10 @@ Global {6F00629A-8B87-4264-8896-19983285E32F}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F00629A-8B87-4264-8896-19983285E32F}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F00629A-8B87-4264-8896-19983285E32F}.Release|Any CPU.Build.0 = Release|Any CPU + {468A868F-FB75-4D48-BC03-6F9FCDB014C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {468A868F-FB75-4D48-BC03-6F9FCDB014C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {468A868F-FB75-4D48-BC03-6F9FCDB014C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {468A868F-FB75-4D48-BC03-6F9FCDB014C9}.Release|Any CPU.Build.0 = Release|Any CPU {410C0262-131C-4D0E-910D-D01B4F7143E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {410C0262-131C-4D0E-910D-D01B4F7143E0}.Debug|Any CPU.Build.0 = Debug|Any CPU {410C0262-131C-4D0E-910D-D01B4F7143E0}.Release|Any CPU.ActiveCfg = Release|Any CPU