diff --git a/Assets/Graphics/Tiles and Objects/WoodPlank.png b/Assets/Graphics/Tiles and Objects/WoodPlank.png new file mode 100644 index 00000000..6e8a5764 Binary files /dev/null and b/Assets/Graphics/Tiles and Objects/WoodPlank.png differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf64abc..98948346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ SneakyTactician *Removed Serilog dependency *Inventories are now baked in for creatures *Increased camera performance, 100x100 worlds are possible (~22 fps) +*Now putting core game content in the "Magical Life Core" mod +*Task manager rewrite to be more intelligent, offer more options for dynamic dependencies +*Crafting is now supported +*Protobuf-net inheritance and surrogates are now automatically handled +*Mods are now supported, and when found will be loaded #### GUI *Tilling dirt is now available from the in game GUI @@ -20,10 +25,12 @@ SneakyTactician *Added the new log texture *Skills/creature window now has an inventory tab *Zooming out now supported +*Added the Action Bar #### Bugs *Fixed PineTree class property Name's value *Fixed mined stones not disappering +*Surround sound now functions like it should --- diff --git a/MagicalLifeGUIWindows/Content/Banks/Master_Bank.bank b/MLGUIWindows/Content/Banks/Master_Bank.bank similarity index 93% rename from MagicalLifeGUIWindows/Content/Banks/Master_Bank.bank rename to MLGUIWindows/Content/Banks/Master_Bank.bank index 77142861..3ee21e38 100644 Binary files a/MagicalLifeGUIWindows/Content/Banks/Master_Bank.bank and b/MLGUIWindows/Content/Banks/Master_Bank.bank differ diff --git a/MLGUIWindows/Content/Banks/Master_Bank.strings.bank b/MLGUIWindows/Content/Banks/Master_Bank.strings.bank new file mode 100644 index 00000000..ac6ebcd7 Binary files /dev/null and b/MLGUIWindows/Content/Banks/Master_Bank.strings.bank differ diff --git a/MagicalLifeGUIWindows/Content/Character/Base Character/BaseCharacterSprite.png b/MLGUIWindows/Content/Character/Base Character/BaseCharacterSprite.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Character/Base Character/BaseCharacterSprite.png rename to MLGUIWindows/Content/Character/Base Character/BaseCharacterSprite.png diff --git a/MagicalLifeGUIWindows/Content/Character/Character.png b/MLGUIWindows/Content/Character/Character.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Character/Character.png rename to MLGUIWindows/Content/Character/Character.png diff --git a/MagicalLifeGUIWindows/Content/Content.mgcb b/MLGUIWindows/Content/Content.mgcb similarity index 88% rename from MagicalLifeGUIWindows/Content/Content.mgcb rename to MLGUIWindows/Content/Content.mgcb index c1c98315..b66ae110 100644 --- a/MagicalLifeGUIWindows/Content/Content.mgcb +++ b/MLGUIWindows/Content/Content.mgcb @@ -38,12 +38,6 @@ /processorParam:TextureFormat=Color /build:Logo/MonoGameLogo.png -#begin Banks/Master_Bank.bank -/copy:Banks/Master_Bank.bank - -#begin Banks/Master_Bank.strings.bank -/copy:Banks/Master_Bank.strings.bank - #begin GUI/ListBoxItemBackground.png /importer:TextureImporter /processor:TextureProcessor @@ -562,3 +556,81 @@ /processorParam:TextureFormat=Color /build:Textures/Tile/TilledDirt.png +#begin Banks/Master_Bank.bank +/copy:Banks/Master_Bank.bank + +#begin Banks/Master_Bank.strings.bank +/copy:Banks/Master_Bank.strings.bank + +#begin Textures/Items/WoodPlank.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/Items/WoodPlank.png + +#begin Textures/Items/Food/CornEar.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/Items/Food/CornEar.png + +#begin Textures/Resource/Plants/Crops/CornFullGrowth.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/Resource/Plants/Crops/CornFullGrowth.png + +#begin Textures/Resource/Plants/Crops/CornGrowth1.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/Resource/Plants/Crops/CornGrowth1.png + +#begin Textures/Resource/Plants/Crops/CornGrowth2.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/Resource/Plants/Crops/CornGrowth2.png + +#begin Textures/Resource/Plants/Crops/CornSeedling.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/Resource/Plants/Crops/CornSeedling.png + diff --git a/MagicalLifeGUIWindows/Content/Fonts/MainMenuFont12x.spritefont b/MLGUIWindows/Content/Fonts/MainMenuFont12x.spritefont similarity index 100% rename from MagicalLifeGUIWindows/Content/Fonts/MainMenuFont12x.spritefont rename to MLGUIWindows/Content/Fonts/MainMenuFont12x.spritefont diff --git a/MagicalLifeGUIWindows/Content/Fonts/MainMenuFont24x.spritefont b/MLGUIWindows/Content/Fonts/MainMenuFont24x.spritefont similarity index 100% rename from MagicalLifeGUIWindows/Content/Fonts/MainMenuFont24x.spritefont rename to MLGUIWindows/Content/Fonts/MainMenuFont24x.spritefont diff --git a/MagicalLifeGUIWindows/Content/GUI/AxeButton_Gold.png b/MLGUIWindows/Content/GUI/AxeButton_Gold.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/AxeButton_Gold.png rename to MLGUIWindows/Content/GUI/AxeButton_Gold.png diff --git a/MagicalLifeGUIWindows/Content/GUI/AxeButton_Grey.png b/MLGUIWindows/Content/GUI/AxeButton_Grey.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/AxeButton_Grey.png rename to MLGUIWindows/Content/GUI/AxeButton_Grey.png diff --git a/MagicalLifeGUIWindows/Content/GUI/AxeMapIcon.png b/MLGUIWindows/Content/GUI/AxeMapIcon.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/AxeMapIcon.png rename to MLGUIWindows/Content/GUI/AxeMapIcon.png diff --git a/MagicalLifeGUIWindows/Content/GUI/CursorCarrot.png b/MLGUIWindows/Content/GUI/CursorCarrot.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/CursorCarrot.png rename to MLGUIWindows/Content/GUI/CursorCarrot.png diff --git a/MagicalLifeGUIWindows/Content/GUI/HoeButton_Gold.png b/MLGUIWindows/Content/GUI/HoeButton_Gold.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/HoeButton_Gold.png rename to MLGUIWindows/Content/GUI/HoeButton_Gold.png diff --git a/MagicalLifeGUIWindows/Content/GUI/HoeButton_Grey.png b/MLGUIWindows/Content/GUI/HoeButton_Grey.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/HoeButton_Grey.png rename to MLGUIWindows/Content/GUI/HoeButton_Grey.png diff --git a/MagicalLifeGUIWindows/Content/GUI/HoeMapIcon.png b/MLGUIWindows/Content/GUI/HoeMapIcon.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/HoeMapIcon.png rename to MLGUIWindows/Content/GUI/HoeMapIcon.png diff --git a/MagicalLifeGUIWindows/Content/GUI/InputBox100x50.png b/MLGUIWindows/Content/GUI/InputBox100x50.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/InputBox100x50.png rename to MLGUIWindows/Content/GUI/InputBox100x50.png diff --git a/MagicalLifeGUIWindows/Content/GUI/ListBoxItemBackground.png b/MLGUIWindows/Content/GUI/ListBoxItemBackground.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/ListBoxItemBackground.png rename to MLGUIWindows/Content/GUI/ListBoxItemBackground.png diff --git a/MagicalLifeGUIWindows/Content/GUI/MenuBackground.png b/MLGUIWindows/Content/GUI/MenuBackground.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/MenuBackground.png rename to MLGUIWindows/Content/GUI/MenuBackground.png diff --git a/MagicalLifeGUIWindows/Content/GUI/MenuButton.png b/MLGUIWindows/Content/GUI/MenuButton.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/MenuButton.png rename to MLGUIWindows/Content/GUI/MenuButton.png diff --git a/MagicalLifeGUIWindows/Content/GUI/PickaxeButton_Gold.png b/MLGUIWindows/Content/GUI/PickaxeButton_Gold.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/PickaxeButton_Gold.png rename to MLGUIWindows/Content/GUI/PickaxeButton_Gold.png diff --git a/MagicalLifeGUIWindows/Content/GUI/PickaxeButton_Grey.png b/MLGUIWindows/Content/GUI/PickaxeButton_Grey.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/PickaxeButton_Grey.png rename to MLGUIWindows/Content/GUI/PickaxeButton_Grey.png diff --git a/MagicalLifeGUIWindows/Content/GUI/PickaxeMapIcon.png b/MLGUIWindows/Content/GUI/PickaxeMapIcon.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/PickaxeMapIcon.png rename to MLGUIWindows/Content/GUI/PickaxeMapIcon.png diff --git a/MagicalLifeGUIWindows/Content/GUI/X.png b/MLGUIWindows/Content/GUI/X.png similarity index 100% rename from MagicalLifeGUIWindows/Content/GUI/X.png rename to MLGUIWindows/Content/GUI/X.png diff --git a/MagicalLifeGUIWindows/Content/Logo/FMODLogo.png b/MLGUIWindows/Content/Logo/FMODLogo.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Logo/FMODLogo.png rename to MLGUIWindows/Content/Logo/FMODLogo.png diff --git a/MagicalLifeGUIWindows/Content/Logo/MonoGameLogo.png b/MLGUIWindows/Content/Logo/MonoGameLogo.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Logo/MonoGameLogo.png rename to MLGUIWindows/Content/Logo/MonoGameLogo.png diff --git a/MLGUIWindows/Content/Textures/Items/Food/CornEar.png b/MLGUIWindows/Content/Textures/Items/Food/CornEar.png new file mode 100644 index 00000000..0485c39c Binary files /dev/null and b/MLGUIWindows/Content/Textures/Items/Food/CornEar.png differ diff --git a/MagicalLifeGUIWindows/Content/Textures/Items/Log_1.png b/MLGUIWindows/Content/Textures/Items/Log_1.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Items/Log_1.png rename to MLGUIWindows/Content/Textures/Items/Log_1.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Items/StoneRubble_01.png b/MLGUIWindows/Content/Textures/Items/StoneRubble_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Items/StoneRubble_01.png rename to MLGUIWindows/Content/Textures/Items/StoneRubble_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Items/StoneRubble_02.png b/MLGUIWindows/Content/Textures/Items/StoneRubble_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Items/StoneRubble_02.png rename to MLGUIWindows/Content/Textures/Items/StoneRubble_02.png diff --git a/MLGUIWindows/Content/Textures/Items/WoodPlank.png b/MLGUIWindows/Content/Textures/Items/WoodPlank.png new file mode 100644 index 00000000..6e8a5764 Binary files /dev/null and b/MLGUIWindows/Content/Textures/Items/WoodPlank.png differ diff --git a/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornFullGrowth.png b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornFullGrowth.png new file mode 100644 index 00000000..5c0470ea Binary files /dev/null and b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornFullGrowth.png differ diff --git a/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornGrowth1.png b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornGrowth1.png new file mode 100644 index 00000000..b81b458a Binary files /dev/null and b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornGrowth1.png differ diff --git a/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornGrowth2.png b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornGrowth2.png new file mode 100644 index 00000000..afbe22e4 Binary files /dev/null and b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornGrowth2.png differ diff --git a/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornSeedling.png b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornSeedling.png new file mode 100644 index 00000000..30f308ca Binary files /dev/null and b/MLGUIWindows/Content/Textures/Resource/Plants/Crops/CornSeedling.png differ diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_01.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_01.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_02.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_02.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Maple_Leaves_02.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_01.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_01.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_02.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_02.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Oak_Leaves_02.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_Leaves_02.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_Leaves_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_Leaves_02.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_Leaves_02.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_leaves_01.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_leaves_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_leaves_01.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Leaves/Pine_leaves_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Maple_Stump.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Maple_Stump.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Maple_Stump.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Maple_Stump.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Oak_Stump.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Oak_Stump.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Oak_Stump.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Oak_Stump.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Pine_Stump.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Pine_Stump.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Pine_Stump.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Stumps/Pine_Stump.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Maple_Trunk.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Maple_Trunk.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Maple_Trunk.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Maple_Trunk.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Oak_Trunk.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Oak_Trunk.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Oak_Trunk.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Oak_Trunk.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Pine_Trunk.png b/MLGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Pine_Trunk.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Pine_Trunk.png rename to MLGUIWindows/Content/Textures/Resource/Plants/Trees/Trunks/Pine_Trunk.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Stone_01.png b/MLGUIWindows/Content/Textures/Resource/Stone_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Stone_01.png rename to MLGUIWindows/Content/Textures/Resource/Stone_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Resource/Stone_02.png b/MLGUIWindows/Content/Textures/Resource/Stone_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Resource/Stone_02.png rename to MLGUIWindows/Content/Textures/Resource/Stone_02.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/Dirt_01.png b/MLGUIWindows/Content/Textures/Tile/Dirt_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/Dirt_01.png rename to MLGUIWindows/Content/Textures/Tile/Dirt_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/Dirt_02.png b/MLGUIWindows/Content/Textures/Tile/Dirt_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/Dirt_02.png rename to MLGUIWindows/Content/Textures/Tile/Dirt_02.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/Grass_01.png b/MLGUIWindows/Content/Textures/Tile/Grass_01.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/Grass_01.png rename to MLGUIWindows/Content/Textures/Tile/Grass_01.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/Grass_02.png b/MLGUIWindows/Content/Textures/Tile/Grass_02.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/Grass_02.png rename to MLGUIWindows/Content/Textures/Tile/Grass_02.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/Grass_03.png b/MLGUIWindows/Content/Textures/Tile/Grass_03.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/Grass_03.png rename to MLGUIWindows/Content/Textures/Tile/Grass_03.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/Grass_04.png b/MLGUIWindows/Content/Textures/Tile/Grass_04.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/Grass_04.png rename to MLGUIWindows/Content/Textures/Tile/Grass_04.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/TestTile.png b/MLGUIWindows/Content/Textures/Tile/TestTile.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/TestTile.png rename to MLGUIWindows/Content/Textures/Tile/TestTile.png diff --git a/MagicalLifeGUIWindows/Content/Textures/Tile/TilledDirt.png b/MLGUIWindows/Content/Textures/Tile/TilledDirt.png similarity index 100% rename from MagicalLifeGUIWindows/Content/Textures/Tile/TilledDirt.png rename to MLGUIWindows/Content/Textures/Tile/TilledDirt.png diff --git a/MLGUIWindows/FriendAssemblies.cs b/MLGUIWindows/FriendAssemblies.cs new file mode 100644 index 00000000..eeb98706 --- /dev/null +++ b/MLGUIWindows/FriendAssemblies.cs @@ -0,0 +1,19 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("MagicalLifeAPITest")] +[assembly: InternalsVisibleTo("MagicalLifeClientStandard")] +[assembly: InternalsVisibleTo("MagicalLifeDedicatedServerCore")] +[assembly: InternalsVisibleTo("MagicalLifeAPIStandard")] +[assembly: InternalsVisibleTo("MagicalLifeModdingAPI")] +[assembly: InternalsVisibleTo("MagicalLifeServerStandard")] +[assembly: InternalsVisibleTo("MagicalLifeSettingsStandard")] + +namespace MagicalLifeGUIWindows +{ + /// + /// Used to control who has access to internal members of this assembly. + /// + public class FriendAssemblies + { + } +} \ No newline at end of file diff --git a/MLGUIWindows/GUI/Action Menu/ActionMenu.cs b/MLGUIWindows/GUI/Action Menu/ActionMenu.cs new file mode 100644 index 00000000..4f665575 --- /dev/null +++ b/MLGUIWindows/GUI/Action Menu/ActionMenu.cs @@ -0,0 +1,15 @@ +namespace MagicalLifeGUIWindows.GUI.Action_Menu +{ + /// + /// The action menu on the right side of the screen, when the correct key is pressed. + /// + public static class ActionMenu + { + public static ActionMenuContainer AMenu { get; } = new ActionMenuContainer(true); + + internal static void Initialize() + { + MenuHandler.DisplayMenu(AMenu); + } + } +} \ No newline at end of file diff --git a/MLGUIWindows/GUI/Action Menu/ActionMenuContainer.cs b/MLGUIWindows/GUI/Action Menu/ActionMenuContainer.cs new file mode 100644 index 00000000..757f2632 --- /dev/null +++ b/MLGUIWindows/GUI/Action Menu/ActionMenuContainer.cs @@ -0,0 +1,50 @@ +using MagicalLifeAPI.Asset; +using MagicalLifeAPI.Crafting; +using MagicalLifeAPI.DataTypes; +using MagicalLifeAPI.Registry.Recipe; +using MagicalLifeAPI.World.Base; +using MagicalLifeGUIWindows.GUI.Reusable; +using MagicalLifeGUIWindows.GUI.Reusable.Collections; +using Microsoft.Xna.Framework; +using MonoGUI.Game.Custom; +using System.Collections.Generic; + +namespace MagicalLifeGUIWindows.GUI.Action_Menu +{ + /// + /// The action menu container. + /// + public class ActionMenuContainer : GuiContainer + { + public MonoGrid ActionGrid { get; set; } + + public ActionMenuContainer(bool visible) : base(TextureLoader.GUIMenuBackground, ActionMenuLayout.ActionMenuLocation, false) + { + this.Visible = visible; + + this.ActionGrid = new MonoGrid(new Point2D(32, 32), ActionMenuLayout.ActionGridBounds, int.MaxValue, + true, TextureLoader.FontMainMenuFont12x, 5); + this.PopulateActionGrid(); + + this.Controls.Add(this.ActionGrid); + } + + private void PopulateActionGrid() + { + Rectangle zero = new Rectangle(0, 0, 32, 32); + foreach (KeyValuePair> item in RecipeRegistry.ItemToRecipe) + { + foreach (IRecipe item2 in item.Value) + { + RenderableImage recipeImage = new RenderableIRecipe(zero, item2.GetDisplayTextureID(), true, item2); + this.ActionGrid.Add(recipeImage); + } + } + } + + public override string GetTextureName() + { + return TextureLoader.GUIMenuBackground; + } + } +} \ No newline at end of file diff --git a/MLGUIWindows/GUI/Action Menu/ActionMenuLayout.cs b/MLGUIWindows/GUI/Action Menu/ActionMenuLayout.cs new file mode 100644 index 00000000..7e978051 --- /dev/null +++ b/MLGUIWindows/GUI/Action Menu/ActionMenuLayout.cs @@ -0,0 +1,47 @@ +using MagicalLifeAPI.Filing; +using Microsoft.Xna.Framework; + +namespace MagicalLifeGUIWindows.GUI.Action_Menu +{ + /// + /// Positioning data for the action menu. + /// + public static class ActionMenuLayout + { + /// + /// The dimensions of the action menu. + /// + public static Rectangle ActionMenuLocation + { + get + { + switch ((Resolution)SettingsManager.WindowSettings.Settings.Resolution) + { + case Resolution._2560x1440: + return ActionMenuLayout2560x1440.ActionMenuLocation; + + default: + return ActionMenuLayout1920x1080.ActionMenuLocation; + } + } + } + + /// + /// The dimensions of the actual grid containing the action items. + /// + public static Rectangle ActionGridBounds + { + get + { + switch ((Resolution)SettingsManager.WindowSettings.Settings.Resolution) + { + case Resolution._2560x1440: + return ActionMenuLayout2560x1440.ActionGridBounds; + + default: + return ActionMenuLayout1920x1080.ActionGridBounds; + } + } + } + } +} \ No newline at end of file diff --git a/MLGUIWindows/GUI/Action Menu/ActionMenuLayout1920x1080.cs b/MLGUIWindows/GUI/Action Menu/ActionMenuLayout1920x1080.cs new file mode 100644 index 00000000..6a620a64 --- /dev/null +++ b/MLGUIWindows/GUI/Action Menu/ActionMenuLayout1920x1080.cs @@ -0,0 +1,13 @@ +using Microsoft.Xna.Framework; + +namespace MagicalLifeGUIWindows.GUI.Action_Menu +{ + /// + /// Holds positioning information for the action menu. + /// + public static class ActionMenuLayout1920x1080 + { + public static readonly Rectangle ActionMenuLocation = new Rectangle(1710, 0, 210, 1080); + public static readonly Rectangle ActionGridBounds = new Rectangle(0, 0, 210, 1080); + } +} \ No newline at end of file diff --git a/MLGUIWindows/GUI/Action Menu/ActionMenuLayout2560x1440.cs b/MLGUIWindows/GUI/Action Menu/ActionMenuLayout2560x1440.cs new file mode 100644 index 00000000..7ac50879 --- /dev/null +++ b/MLGUIWindows/GUI/Action Menu/ActionMenuLayout2560x1440.cs @@ -0,0 +1,13 @@ +using Microsoft.Xna.Framework; + +namespace MagicalLifeGUIWindows.GUI.Action_Menu +{ + /// + /// Holds positioning information for the action menu. + /// + public static class ActionMenuLayout2560x1440 + { + public static readonly Rectangle ActionMenuLocation = new Rectangle(2350, 0, 210, 1440); + public static readonly Rectangle ActionGridBounds = new Rectangle(0, 0, 210, 1440); + } +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Character Menu/Buttons/InventoryTabButton.cs b/MLGUIWindows/GUI/Character Menu/Buttons/InventoryTabButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/Character Menu/Buttons/InventoryTabButton.cs rename to MLGUIWindows/GUI/Character Menu/Buttons/InventoryTabButton.cs index b26b6e15..ca2fe94a 100644 --- a/MagicalLifeGUIWindows/GUI/Character Menu/Buttons/InventoryTabButton.cs +++ b/MLGUIWindows/GUI/Character Menu/Buttons/InventoryTabButton.cs @@ -1,7 +1,6 @@ using MagicalLifeAPI.Asset; using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.Character_Menu.Buttons { diff --git a/MagicalLifeGUIWindows/GUI/Character Menu/Buttons/SkillsTabButton.cs b/MLGUIWindows/GUI/Character Menu/Buttons/SkillsTabButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/Character Menu/Buttons/SkillsTabButton.cs rename to MLGUIWindows/GUI/Character Menu/Buttons/SkillsTabButton.cs index 2a2fd8c4..4f47301d 100644 --- a/MagicalLifeGUIWindows/GUI/Character Menu/Buttons/SkillsTabButton.cs +++ b/MLGUIWindows/GUI/Character Menu/Buttons/SkillsTabButton.cs @@ -1,7 +1,6 @@ using MagicalLifeAPI.Asset; using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.Character_Menu.Buttons { diff --git a/MagicalLifeGUIWindows/GUI/Character Menu/CharacterContainer.cs b/MLGUIWindows/GUI/Character Menu/CharacterContainer.cs similarity index 99% rename from MagicalLifeGUIWindows/GUI/Character Menu/CharacterContainer.cs rename to MLGUIWindows/GUI/Character Menu/CharacterContainer.cs index c70676ef..44b6d216 100644 --- a/MagicalLifeGUIWindows/GUI/Character Menu/CharacterContainer.cs +++ b/MLGUIWindows/GUI/Character Menu/CharacterContainer.cs @@ -7,7 +7,6 @@ using MagicalLifeGUIWindows.Input; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; using System.Collections.Generic; namespace MagicalLifeGUIWindows.GUI.Character_Menu diff --git a/MagicalLifeGUIWindows/GUI/Character Menu/CharacterMenu.cs b/MLGUIWindows/GUI/Character Menu/CharacterMenu.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Character Menu/CharacterMenu.cs rename to MLGUIWindows/GUI/Character Menu/CharacterMenu.cs diff --git a/MagicalLifeGUIWindows/GUI/Character Menu/CharacterMenuLayout.cs b/MLGUIWindows/GUI/Character Menu/CharacterMenuLayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Character Menu/CharacterMenuLayout.cs rename to MLGUIWindows/GUI/Character Menu/CharacterMenuLayout.cs diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/BackButton.cs b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/BackButton.cs similarity index 95% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/BackButton.cs rename to MLGUIWindows/GUI/In Game Escape Menu/Buttons/BackButton.cs index 5f0e4758..fbb341a7 100644 --- a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/BackButton.cs +++ b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/BackButton.cs @@ -2,7 +2,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.In { diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/QuitButton.cs b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/QuitButton.cs similarity index 94% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/QuitButton.cs rename to MLGUIWindows/GUI/In Game Escape Menu/Buttons/QuitButton.cs index e8cfc52c..0d7a0e44 100644 --- a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/QuitButton.cs +++ b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/QuitButton.cs @@ -1,12 +1,10 @@ using MagicalLifeAPI.Asset; -using MagicalLifeAPI.Error.InternalExceptions; using MagicalLifeAPI.Networking; using MagicalLifeAPI.Sound; using MagicalLifeAPI.World.Data; using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; using System; namespace MagicalLifeGUIWindows.GUI.In diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/SaveButton.cs b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/SaveButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/SaveButton.cs rename to MLGUIWindows/GUI/In Game Escape Menu/Buttons/SaveButton.cs index 1214f8ad..b5ff0d9a 100644 --- a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/SaveButton.cs +++ b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/SaveButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Save; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.In { diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/SettingsButton.cs b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/SettingsButton.cs similarity index 91% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/SettingsButton.cs rename to MLGUIWindows/GUI/In Game Escape Menu/Buttons/SettingsButton.cs index 953dccd7..f584d2e0 100644 --- a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/Buttons/SettingsButton.cs +++ b/MLGUIWindows/GUI/In Game Escape Menu/Buttons/SettingsButton.cs @@ -5,11 +5,6 @@ using MagicalLifeGUIWindows.GUI.Settings_Menu; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MagicalLifeGUIWindows.GUI.In_Game_Escape_Menu.Buttons { @@ -42,4 +37,4 @@ private void OpenSettingsMenu() InGameEscapeMenu.menu.PopupChild(SettingsGameMenu.Menu); } } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenu.cs b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenu.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenu.cs rename to MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenu.cs diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuContainer.cs b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuContainer.cs similarity index 87% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuContainer.cs rename to MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuContainer.cs index 2d914039..e6b6e2be 100644 --- a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuContainer.cs +++ b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuContainer.cs @@ -15,7 +15,8 @@ public class InGameEscapeMenuContainer : GuiContainer public SettingsButton Settings { get; private set; } = new SettingsButton(); - public InGameEscapeMenuContainer() : base(TextureLoader.GUIMenuBackground, RenderInfo.FullScreenWindow, false) + public InGameEscapeMenuContainer() + : base(TextureLoader.GUIMenuBackground, RenderInfo.FullScreenWindow, false) { this.Controls.Add(this.Quit); this.Controls.Add(this.Save); diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout.cs b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout.cs rename to MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout.cs diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout1920x1080.cs b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout1920x1080.cs similarity index 99% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout1920x1080.cs index 9a1cecf4..30b2f894 100644 --- a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout1920x1080.cs +++ b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout1920x1080.cs @@ -15,7 +15,5 @@ public static class InGameEscapeMenuLayout1920x1080 public static readonly int SettingsButtonY = 540; public static readonly int BackButtonY = 610; - - } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout2560x1440.cs b/MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout2560x1440.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/In Game Escape Menu/InGameEscapeMenuLayout2560x1440.cs diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/ChopActionButton.cs b/MLGUIWindows/GUI/In Game GUI/Buttons/ChopActionButton.cs similarity index 97% rename from MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/ChopActionButton.cs rename to MLGUIWindows/GUI/In Game GUI/Buttons/ChopActionButton.cs index 0c582aa6..98dcb490 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/ChopActionButton.cs +++ b/MLGUIWindows/GUI/In Game GUI/Buttons/ChopActionButton.cs @@ -2,7 +2,6 @@ using MagicalLifeAPI.Entity.AI.Task; using MagicalLifeGUIWindows.GUI.Reusable; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.In { diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/MineActionButton.cs b/MLGUIWindows/GUI/In Game GUI/Buttons/MineActionButton.cs similarity index 97% rename from MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/MineActionButton.cs rename to MLGUIWindows/GUI/In Game GUI/Buttons/MineActionButton.cs index 8945f031..008b2dac 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/MineActionButton.cs +++ b/MLGUIWindows/GUI/In Game GUI/Buttons/MineActionButton.cs @@ -2,7 +2,6 @@ using MagicalLifeAPI.Entity.AI.Task; using MagicalLifeGUIWindows.GUI.Reusable; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.In { diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/TillDirtActionButton.cs b/MLGUIWindows/GUI/In Game GUI/Buttons/TillDirtActionButton.cs similarity index 97% rename from MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/TillDirtActionButton.cs rename to MLGUIWindows/GUI/In Game GUI/Buttons/TillDirtActionButton.cs index 5d151bc9..7a1431d6 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/Buttons/TillDirtActionButton.cs +++ b/MLGUIWindows/GUI/In Game GUI/Buttons/TillDirtActionButton.cs @@ -2,7 +2,6 @@ using MagicalLifeAPI.Entity.AI.Task; using MagicalLifeGUIWindows.GUI.Reusable; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.In { diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUI.cs b/MLGUIWindows/GUI/In Game GUI/InGameGUI.cs similarity index 55% rename from MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUI.cs rename to MLGUIWindows/GUI/In Game GUI/InGameGUI.cs index 2afc8ad0..18629c46 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUI.cs +++ b/MLGUIWindows/GUI/In Game GUI/InGameGUI.cs @@ -1,4 +1,5 @@ using MagicalLifeAPI.Entity.AI.Task; +using MagicalLifeGUIWindows.Map; namespace MagicalLifeGUIWindows.GUI.In { @@ -7,7 +8,17 @@ namespace MagicalLifeGUIWindows.GUI.In /// public static class InGameGUI { - public static ActionSelected Selected = ActionSelected.None; + public static ActionSelected Selected + { + get + { + return RenderingData.CurrentlySelected; + } + set + { + RenderingData.CurrentlySelected = value; + } + } public static InGameGUIContainer InGame; @@ -15,6 +26,7 @@ internal static void Initialize() { InGame = new InGameGUIContainer(true); MenuHandler.DisplayMenu(InGame); + Selected = ActionSelected.None; } } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUIContainer.cs b/MLGUIWindows/GUI/In Game GUI/InGameGUIContainer.cs similarity index 91% rename from MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUIContainer.cs rename to MLGUIWindows/GUI/In Game GUI/InGameGUIContainer.cs index 1eaca5b6..6f98cf97 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUIContainer.cs +++ b/MLGUIWindows/GUI/In Game GUI/InGameGUIContainer.cs @@ -15,7 +15,8 @@ public class InGameGUIContainer : GuiContainer public ChopActionButton ChopActionButton { get; set; } = new ChopActionButton(); - public InGameGUIContainer(bool visible) : base(TextureLoader.GUIMenuBackground, GetDrawingBounds(), false) + public InGameGUIContainer(bool visible) + : base(TextureLoader.GUIMenuBackground, GetDrawingBounds(), false, true) { this.Visible = visible; this.Controls.Add(this.MineActionButton); diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout.cs b/MLGUIWindows/GUI/In Game GUI/InGameGUILayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout.cs rename to MLGUIWindows/GUI/In Game GUI/InGameGUILayout.cs diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout1920x1080.cs b/MLGUIWindows/GUI/In Game GUI/InGameGUILayout1920x1080.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout1920x1080.cs rename to MLGUIWindows/GUI/In Game GUI/InGameGUILayout1920x1080.cs index 38c738a0..daba7cd4 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout1920x1080.cs +++ b/MLGUIWindows/GUI/In Game GUI/InGameGUILayout1920x1080.cs @@ -18,7 +18,7 @@ public static class InGameGUILayout1920x1080 /// /// The width of the in game GUI container. /// - public static readonly int ContainerWidth = 1920; + public static readonly int ContainerWidth = 1710; /// /// The height of the in game GUI container. diff --git a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout2560x1440.cs b/MLGUIWindows/GUI/In Game GUI/InGameGUILayout2560x1440.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout2560x1440.cs rename to MLGUIWindows/GUI/In Game GUI/InGameGUILayout2560x1440.cs index ba91fb5d..6dc1b062 100644 --- a/MagicalLifeGUIWindows/GUI/In Game GUI/InGameGUILayout2560x1440.cs +++ b/MLGUIWindows/GUI/In Game GUI/InGameGUILayout2560x1440.cs @@ -18,7 +18,7 @@ public static class InGameGUILayout2560x1440 /// /// The width of the in game GUI container. /// - public static readonly int ContainerWidth = 2560; + public static readonly int ContainerWidth = 2350; /// /// The height of the in game GUI container. diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/Buttons/JoinButton.cs b/MLGUIWindows/GUI/Join Game Menu/Buttons/JoinButton.cs similarity index 97% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/Buttons/JoinButton.cs rename to MLGUIWindows/GUI/Join Game Menu/Buttons/JoinButton.cs index 7b89ed05..f31b1068 100644 --- a/MagicalLifeGUIWindows/GUI/Join Game Menu/Buttons/JoinButton.cs +++ b/MLGUIWindows/GUI/Join Game Menu/Buttons/JoinButton.cs @@ -8,7 +8,6 @@ using MagicalLifeGUIWindows.Input; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.Join { diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/Input Boxes/IPInputBox.cs b/MLGUIWindows/GUI/Join Game Menu/Input Boxes/IPInputBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/Input Boxes/IPInputBox.cs rename to MLGUIWindows/GUI/Join Game Menu/Input Boxes/IPInputBox.cs diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/Input Boxes/PortInputBox.cs b/MLGUIWindows/GUI/Join Game Menu/Input Boxes/PortInputBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/Input Boxes/PortInputBox.cs rename to MLGUIWindows/GUI/Join Game Menu/Input Boxes/PortInputBox.cs diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenu.cs b/MLGUIWindows/GUI/Join Game Menu/JoinGameMenu.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenu.cs rename to MLGUIWindows/GUI/Join Game Menu/JoinGameMenu.cs diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuContainer.cs b/MLGUIWindows/GUI/Join Game Menu/JoinGameMenuContainer.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuContainer.cs rename to MLGUIWindows/GUI/Join Game Menu/JoinGameMenuContainer.cs diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout.cs b/MLGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout.cs rename to MLGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout.cs diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout1920x1080.cs b/MLGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout1920x1080.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout1920x1080.cs diff --git a/MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout2560x1440.cs b/MLGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout2560x1440.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/Join Game Menu/JoinGameMenuLayout2560x1440.cs diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/Buttons/LoadSaveButton.cs b/MLGUIWindows/GUI/Load Game Menu/Buttons/LoadSaveButton.cs similarity index 95% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/Buttons/LoadSaveButton.cs rename to MLGUIWindows/GUI/Load Game Menu/Buttons/LoadSaveButton.cs index 0234e667..08c7b243 100644 --- a/MagicalLifeGUIWindows/GUI/Load Game Menu/Buttons/LoadSaveButton.cs +++ b/MLGUIWindows/GUI/Load Game Menu/Buttons/LoadSaveButton.cs @@ -1,4 +1,5 @@ using MagicalLifeAPI.Asset; +using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeAPI.Networking.Client; using MagicalLifeAPI.Networking.Server; using MagicalLifeAPI.Sound; @@ -11,7 +12,6 @@ using MagicalLifeGUIWindows.Properties; using MagicalLifeServer; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.Load { @@ -42,6 +42,7 @@ private void LoadSaveButton_ClickEvent(object sender, Reusable.Event.ClickEventA BoundHandler.HideAll(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); + RenderInfo.Camera2D.InitializeForDimension(0); } } diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/List Boxes/SelectGameListBox.cs b/MLGUIWindows/GUI/Load Game Menu/List Boxes/SelectGameListBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/List Boxes/SelectGameListBox.cs rename to MLGUIWindows/GUI/Load Game Menu/List Boxes/SelectGameListBox.cs diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenu.cs b/MLGUIWindows/GUI/Load Game Menu/LoadGameMenu.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenu.cs rename to MLGUIWindows/GUI/Load Game Menu/LoadGameMenu.cs diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuContainer.cs b/MLGUIWindows/GUI/Load Game Menu/LoadGameMenuContainer.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuContainer.cs rename to MLGUIWindows/GUI/Load Game Menu/LoadGameMenuContainer.cs diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout.cs b/MLGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout.cs rename to MLGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout.cs diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout1920x1080.cs b/MLGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout1920x1080.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout1920x1080.cs diff --git a/MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout2560x1440.cs b/MLGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout2560x1440.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/Load Game Menu/LoadGameMenuLayout2560x1440.cs diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/JoinGameButton.cs b/MLGUIWindows/GUI/MainMenu/Buttons/JoinGameButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/MainMenu/Buttons/JoinGameButton.cs rename to MLGUIWindows/GUI/MainMenu/Buttons/JoinGameButton.cs index 210407c1..065f333d 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/JoinGameButton.cs +++ b/MLGUIWindows/GUI/MainMenu/Buttons/JoinGameButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.MainMenu.Buttons { diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/LoadGameButton.cs b/MLGUIWindows/GUI/MainMenu/Buttons/LoadGameButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/MainMenu/Buttons/LoadGameButton.cs rename to MLGUIWindows/GUI/MainMenu/Buttons/LoadGameButton.cs index 85192d60..194a060e 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/LoadGameButton.cs +++ b/MLGUIWindows/GUI/MainMenu/Buttons/LoadGameButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.MainMenu.Buttons { diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/NewGameButton.cs b/MLGUIWindows/GUI/MainMenu/Buttons/NewGameButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/MainMenu/Buttons/NewGameButton.cs rename to MLGUIWindows/GUI/MainMenu/Buttons/NewGameButton.cs index 9bc94736..d4537c9c 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/NewGameButton.cs +++ b/MLGUIWindows/GUI/MainMenu/Buttons/NewGameButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.MainMenu.Buttons { diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/QuitButton.cs b/MLGUIWindows/GUI/MainMenu/Buttons/QuitButton.cs similarity index 95% rename from MagicalLifeGUIWindows/GUI/MainMenu/Buttons/QuitButton.cs rename to MLGUIWindows/GUI/MainMenu/Buttons/QuitButton.cs index e56511fa..5c226d89 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/QuitButton.cs +++ b/MLGUIWindows/GUI/MainMenu/Buttons/QuitButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.MainMenu.Buttons { diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/SettingsButton.cs b/MLGUIWindows/GUI/MainMenu/Buttons/SettingsButton.cs similarity index 90% rename from MagicalLifeGUIWindows/GUI/MainMenu/Buttons/SettingsButton.cs rename to MLGUIWindows/GUI/MainMenu/Buttons/SettingsButton.cs index 6a86b581..9b06f39f 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/Buttons/SettingsButton.cs +++ b/MLGUIWindows/GUI/MainMenu/Buttons/SettingsButton.cs @@ -4,11 +4,6 @@ using MagicalLifeGUIWindows.GUI.Settings_Menu; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MagicalLifeGUIWindows.GUI.MainMenu.Buttons { @@ -35,6 +30,5 @@ private static Rectangle GetLocation() return new Rectangle(x, y, width, height); } - } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenu.cs b/MLGUIWindows/GUI/MainMenu/MainMenu.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/MainMenu/MainMenu.cs rename to MLGUIWindows/GUI/MainMenu/MainMenu.cs diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenuContainer.cs b/MLGUIWindows/GUI/MainMenu/MainMenuContainer.cs similarity index 94% rename from MagicalLifeGUIWindows/GUI/MainMenu/MainMenuContainer.cs rename to MLGUIWindows/GUI/MainMenu/MainMenuContainer.cs index 30e38e5b..998bd960 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenuContainer.cs +++ b/MLGUIWindows/GUI/MainMenu/MainMenuContainer.cs @@ -13,7 +13,7 @@ public MainMenuContainer(bool visible) : base(TextureLoader.GUIMenuBackground, R this.Controls.Add(new NewGameButton()); this.Controls.Add(new LoadGameButton()); this.Controls.Add(new JoinGameButton()); - this.Controls.Add(new SettingsButton()); + this.Controls.Add(new SettingsButton()); this.Controls.Add(new QuitButton()); } diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout.cs b/MLGUIWindows/GUI/MainMenu/MainMenuLayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout.cs rename to MLGUIWindows/GUI/MainMenu/MainMenuLayout.cs diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout1920x1080.cs b/MLGUIWindows/GUI/MainMenu/MainMenuLayout1920x1080.cs similarity index 84% rename from MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/MainMenu/MainMenuLayout1920x1080.cs index 7cc10399..0b63e3e1 100644 --- a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout1920x1080.cs +++ b/MLGUIWindows/GUI/MainMenu/MainMenuLayout1920x1080.cs @@ -28,23 +28,21 @@ public static class MainMenuLayout1920x1080 /// /// The y position of the top of the host game button. /// - public static readonly int LoadGameButtonY = 200; + public static readonly int LoadGameButtonY = 170; /// /// The y position of the top of the join game button. /// - public static readonly int JoinGameButtonY = 300; + public static readonly int JoinGameButtonY = 240; /// /// The y position of the top of the settings button. /// - public static readonly int SettingButtonY = 350; + public static readonly int SettingButtonY = 310; /// /// The y position of the top of the quit button. /// - public static readonly int QuitButtonY = 400; - - + public static readonly int QuitButtonY = 380; } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout2560x1440.cs b/MLGUIWindows/GUI/MainMenu/MainMenuLayout2560x1440.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/MainMenu/MainMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/MainMenu/MainMenuLayout2560x1440.cs diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/Buttons/NewWorldNextButton.cs b/MLGUIWindows/GUI/New World Menu/Buttons/NewWorldNextButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/New World Menu/Buttons/NewWorldNextButton.cs rename to MLGUIWindows/GUI/New World Menu/Buttons/NewWorldNextButton.cs index dff21c9c..d99c02f6 100644 --- a/MagicalLifeGUIWindows/GUI/New World Menu/Buttons/NewWorldNextButton.cs +++ b/MLGUIWindows/GUI/New World Menu/Buttons/NewWorldNextButton.cs @@ -12,7 +12,6 @@ using MagicalLifeGUIWindows.Properties; using MagicalLifeServer; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.New { @@ -36,9 +35,8 @@ private void NewWorldNextButton_ClickEvent(object sender, Reusable.Event.ClickEv ServerSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); Client.Load(); NewGameInputHandler a = new NewGameInputHandler(); - if(!a.StartNewGame()) + if (!a.StartNewGame()) { - //Should probably make an message box here or something return; } diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/Input Boxes/WorldLengthInputBox.cs b/MLGUIWindows/GUI/New World Menu/Input Boxes/WorldLengthInputBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/New World Menu/Input Boxes/WorldLengthInputBox.cs rename to MLGUIWindows/GUI/New World Menu/Input Boxes/WorldLengthInputBox.cs diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/Input Boxes/WorldWidthInputBox.cs b/MLGUIWindows/GUI/New World Menu/Input Boxes/WorldWidthInputBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/New World Menu/Input Boxes/WorldWidthInputBox.cs rename to MLGUIWindows/GUI/New World Menu/Input Boxes/WorldWidthInputBox.cs diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/Labels/LengthLabel.cs b/MLGUIWindows/GUI/New World Menu/Labels/LengthLabel.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/New World Menu/Labels/LengthLabel.cs rename to MLGUIWindows/GUI/New World Menu/Labels/LengthLabel.cs diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/Labels/WidthLabel.cs b/MLGUIWindows/GUI/New World Menu/Labels/WidthLabel.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/New World Menu/Labels/WidthLabel.cs rename to MLGUIWindows/GUI/New World Menu/Labels/WidthLabel.cs diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/NewGameInputHandler.cs b/MLGUIWindows/GUI/New World Menu/NewGameInputHandler.cs similarity index 63% rename from MagicalLifeGUIWindows/GUI/New World Menu/NewGameInputHandler.cs rename to MLGUIWindows/GUI/New World Menu/NewGameInputHandler.cs index dc708335..96144e37 100644 --- a/MagicalLifeGUIWindows/GUI/New World Menu/NewGameInputHandler.cs +++ b/MLGUIWindows/GUI/New World Menu/NewGameInputHandler.cs @@ -1,7 +1,6 @@ -using MagicalLifeAPI.World.Data; -using MagicalLifeServer.ServerWorld.World; -using System; -using System.ServiceModel.Configuration; +using MagicalLifeAPI.Registry.WorldGeneration; +using MagicalLifeAPI.World.Data; +using MagicalLifeAPI.World.Data.Disk; namespace MagicalLifeGUIWindows.GUI.New { @@ -16,15 +15,16 @@ public class NewGameInputHandler /// public bool StartNewGame() { - bool widthSuccess = int.TryParse(NewWorldMenu.NewWorldMenuM.worldWidth.Text, out int width); + bool widthSuccess = int.TryParse(NewWorldMenu.NewWorldMenuM.WorldWidth.Text, out int width); - bool lengthSuccess = int.TryParse(NewWorldMenu.NewWorldMenuM.worldLength.Text, out int length); + bool lengthSuccess = int.TryParse(NewWorldMenu.NewWorldMenuM.WorldLength.Text, out int length); - if (widthSuccess && lengthSuccess && width > 0 && length > 0) + bool nameSuccess = !string.IsNullOrEmpty(NewWorldMenu.NewWorldMenuM.GameName.Text); + + if (widthSuccess && lengthSuccess && width > 0 && length > 0 && nameSuccess) { - //World.Initialize(width, length, new Dirtland(0)); - //World.Initialize(width, length, new StoneSprinkle(0)); - World.Initialize(width, length, new GrassAndDirt(0)); + WorldStorage.SaveName = NewWorldMenu.NewWorldMenuM.GameName.Text; + World.Initialize(width, length, WorldGeneratorRegistry.Generators[0], "Main"); return true; } else diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenu.cs b/MLGUIWindows/GUI/New World Menu/NewWorldMenu.cs similarity index 72% rename from MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenu.cs rename to MLGUIWindows/GUI/New World Menu/NewWorldMenu.cs index 7d512e1e..a9712b02 100644 --- a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenu.cs +++ b/MLGUIWindows/GUI/New World Menu/NewWorldMenu.cs @@ -9,8 +9,7 @@ public static class NewWorldMenu internal static void Initialize() { - NewWorldMenuContainer mainMenu = new NewWorldMenuContainer(true); - NewWorldMenuM = mainMenu; + NewWorldMenuM = new NewWorldMenuContainer(true); } } } \ No newline at end of file diff --git a/MLGUIWindows/GUI/New World Menu/NewWorldMenuContainer.cs b/MLGUIWindows/GUI/New World Menu/NewWorldMenuContainer.cs new file mode 100644 index 00000000..efb24314 --- /dev/null +++ b/MLGUIWindows/GUI/New World Menu/NewWorldMenuContainer.cs @@ -0,0 +1,44 @@ +using MagicalLifeAPI.Asset; +using MagicalLifeAPI.Components.Generic.Renderable; +using MagicalLifeGUIWindows.GUI.Reusable; + +namespace MagicalLifeGUIWindows.GUI.New +{ + /// + /// The menu that pops up when the user creates a new world. + /// + public class NewWorldMenuContainer : GuiContainer + { + public WorldWidthInputBox WorldWidth { get; } = new WorldWidthInputBox(false); + public WorldLengthInputBox WorldLength { get; } = new WorldLengthInputBox(false); + public NewWorldNextButton NextButton { get; } = new NewWorldNextButton(); + public LengthLabel LengthLabel { get; } = new LengthLabel(); + public WidthLabel WidthLabel { get; } = new WidthLabel(); + public MonoInputBox GameName { get; private set; } + + public NewWorldMenuContainer(bool visible) : base(TextureLoader.GUIMenuBackground, RenderInfo.FullScreenWindow, false) + { + this.Visible = visible; + + this.GameName = new MonoInputBox(TextureLoader.GUIInputBox100x50, TextureLoader.GUICursorCarrot, NewWorldMenuLayout.GameNameInputBox, + int.MaxValue, TextureLoader.FontMainMenuFont12x, false, + Rendering.Text.SimpleTextRenderer.Alignment.Left, true); + + this.Controls.Add(this.WorldWidth); + this.Controls.Add(this.WorldLength); + this.Controls.Add(this.NextButton); + this.Controls.Add(this.LengthLabel); + this.Controls.Add(this.WidthLabel); + this.Controls.Add(this.GameName); + } + + public NewWorldMenuContainer() : base() + { + } + + public override string GetTextureName() + { + return TextureLoader.GUIMenuBackground; + } + } +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout.cs b/MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout.cs similarity index 87% rename from MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout.cs rename to MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout.cs index aee93bae..f457d8c3 100644 --- a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout.cs +++ b/MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout.cs @@ -1,4 +1,5 @@ using MagicalLifeAPI.Filing; +using Microsoft.Xna.Framework; namespace MagicalLifeGUIWindows.GUI.New { @@ -132,5 +133,23 @@ public static int LabelY } } } + + /// + /// The y position at which the is to be displayed at. + /// + public static Rectangle GameNameInputBox + { + get + { + switch ((Resolution)SettingsManager.WindowSettings.Settings.Resolution) + { + case Resolution._2560x1440: + return NewWorldMenuLayout2560x1440.GameNameInputBox; + + default: + return NewWorldMenuLayout1920x1080.GameNameInputBox; + } + } + } } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout1920x1080.cs b/MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout1920x1080.cs similarity index 79% rename from MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout1920x1080.cs index 61b26162..965243c6 100644 --- a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout1920x1080.cs +++ b/MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout1920x1080.cs @@ -1,4 +1,6 @@ -namespace MagicalLifeGUIWindows.GUI.New +using Microsoft.Xna.Framework; + +namespace MagicalLifeGUIWindows.GUI.New { public class NewWorldMenuLayout1920x1080 { @@ -30,11 +32,16 @@ public class NewWorldMenuLayout1920x1080 /// /// The x position at which the is to be displayed at. /// - public static readonly int NextButtonX = 360; + public static readonly int NextButtonX = 490; /// /// The y position at which the is to be displayed at. /// public static readonly int LabelY = 50; + + /// + /// The position and size of the game name input box. + /// + public static readonly Rectangle GameNameInputBox = new Rectangle(360, WorldSizeInputBoxY, 100, 50); } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout2560x1440.cs b/MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout2560x1440.cs similarity index 79% rename from MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout2560x1440.cs index 2f17124a..062679da 100644 --- a/MagicalLifeGUIWindows/GUI/New World Menu/NewWorldMenuLayout2560x1440.cs +++ b/MLGUIWindows/GUI/New World Menu/NewWorldMenuLayout2560x1440.cs @@ -1,4 +1,6 @@ -namespace MagicalLifeGUIWindows.GUI.New +using Microsoft.Xna.Framework; + +namespace MagicalLifeGUIWindows.GUI.New { public static class NewWorldMenuLayout2560x1440 { @@ -30,11 +32,16 @@ public static class NewWorldMenuLayout2560x1440 /// /// The x position at which the is to be displayed at. /// - public static readonly int NextButtonX = 360; + public static readonly int NextButtonX = 490; /// /// The y position at which the is to be displayed at. /// public static readonly int LabelY = 50; + + /// + /// The position and size of the game name input box. + /// + public static readonly Rectangle GameNameInputBox = new Rectangle(360, WorldSizeInputBoxY, 100, 50); } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/Buttons/NewSaveButton.cs b/MLGUIWindows/GUI/Save Game Menu/Buttons/NewSaveButton.cs similarity index 90% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/Buttons/NewSaveButton.cs rename to MLGUIWindows/GUI/Save Game Menu/Buttons/NewSaveButton.cs index 677af56f..8f52321d 100644 --- a/MagicalLifeGUIWindows/GUI/Save Game Menu/Buttons/NewSaveButton.cs +++ b/MLGUIWindows/GUI/Save Game Menu/Buttons/NewSaveButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.Save { @@ -32,7 +31,7 @@ private static Rectangle GetDrawingBounds() private void NewSave() { - if(!string.IsNullOrWhiteSpace(SaveGameMenu.menu.SaveInputBox.Text)) + if (!string.IsNullOrWhiteSpace(SaveGameMenu.menu.SaveInputBox.Text)) { WorldStorage.SerializeWorld(SaveGameMenu.menu.SaveInputBox.Text, new WorldDiskSink()); } diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/Buttons/OverwriteButton.cs b/MLGUIWindows/GUI/Save Game Menu/Buttons/OverwriteButton.cs similarity index 96% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/Buttons/OverwriteButton.cs rename to MLGUIWindows/GUI/Save Game Menu/Buttons/OverwriteButton.cs index 519e885b..50e1b306 100644 --- a/MagicalLifeGUIWindows/GUI/Save Game Menu/Buttons/OverwriteButton.cs +++ b/MLGUIWindows/GUI/Save Game Menu/Buttons/OverwriteButton.cs @@ -4,7 +4,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; namespace MagicalLifeGUIWindows.GUI.Save { diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/InputBoxes/NewSaveInputBox.cs b/MLGUIWindows/GUI/Save Game Menu/InputBoxes/NewSaveInputBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/InputBoxes/NewSaveInputBox.cs rename to MLGUIWindows/GUI/Save Game Menu/InputBoxes/NewSaveInputBox.cs diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/ListBoxes/OverwriteSaveListBox.cs b/MLGUIWindows/GUI/Save Game Menu/ListBoxes/OverwriteSaveListBox.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/ListBoxes/OverwriteSaveListBox.cs rename to MLGUIWindows/GUI/Save Game Menu/ListBoxes/OverwriteSaveListBox.cs diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenu.cs b/MLGUIWindows/GUI/Save Game Menu/SaveGameMenu.cs similarity index 69% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenu.cs rename to MLGUIWindows/GUI/Save Game Menu/SaveGameMenu.cs index f0368953..cff5c011 100644 --- a/MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenu.cs +++ b/MLGUIWindows/GUI/Save Game Menu/SaveGameMenu.cs @@ -6,8 +6,7 @@ public static class SaveGameMenu internal static void Initialize() { - SaveGameMenuContainer mainMenu = new SaveGameMenuContainer(); - menu = mainMenu; + menu = new SaveGameMenuContainer(); } } } \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuContainer.cs b/MLGUIWindows/GUI/Save Game Menu/SaveGameMenuContainer.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuContainer.cs rename to MLGUIWindows/GUI/Save Game Menu/SaveGameMenuContainer.cs diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout.cs b/MLGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout.cs rename to MLGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout.cs diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout1920x1080.cs b/MLGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout1920x1080.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout1920x1080.cs diff --git a/MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout2560x1440.cs b/MLGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout2560x1440.cs similarity index 100% rename from MagicalLifeGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/Save Game Menu/SaveGameMenuLayout2560x1440.cs diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/Buttons/MainMenuButton.cs b/MLGUIWindows/GUI/Settings Menu/Buttons/MainMenuButton.cs similarity index 88% rename from MagicalLifeGUIWindows/GUI/Settings Menu/Buttons/MainMenuButton.cs rename to MLGUIWindows/GUI/Settings Menu/Buttons/MainMenuButton.cs index f7fa6de9..ccf2f594 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/Buttons/MainMenuButton.cs +++ b/MLGUIWindows/GUI/Settings Menu/Buttons/MainMenuButton.cs @@ -4,19 +4,13 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MagicalLifeGUIWindows.GUI.Settings_Menu.Buttons { - public class MainMenuButton: MonoButton + public class MainMenuButton : MonoButton { private bool FromMainMenu { get; set; } - public MainMenuButton(bool fromMainMenu) : base(TextureLoader.GUIMenuButton, GetLocation(), true, Resources.Back) { this.ClickEvent += this.MainMenuButton_ClickEvent; @@ -31,7 +25,6 @@ private void MainMenuButton_ClickEvent(object sender, Reusable.Event.ClickEventA { MainMenu.MainMenu.Initialize(); } - } private static Rectangle GetLocation() @@ -43,6 +36,5 @@ private static Rectangle GetLocation() return new Rectangle(x, y, width, height); } - } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/InputBoxes/MasterVolumeInputBox.cs b/MLGUIWindows/GUI/Settings Menu/InputBoxes/MasterVolumeInputBox.cs similarity index 89% rename from MagicalLifeGUIWindows/GUI/Settings Menu/InputBoxes/MasterVolumeInputBox.cs rename to MLGUIWindows/GUI/Settings Menu/InputBoxes/MasterVolumeInputBox.cs index a1028a5a..85579479 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/InputBoxes/MasterVolumeInputBox.cs +++ b/MLGUIWindows/GUI/Settings Menu/InputBoxes/MasterVolumeInputBox.cs @@ -1,13 +1,9 @@ using MagicalLifeAPI.Asset; +using MagicalLifeAPI.Filing; using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Rendering.Text; using Microsoft.Xna.Framework; using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using MagicalLifeAPI.Filing; namespace MagicalLifeGUIWindows.GUI.Settings_Menu.InputBoxes { @@ -20,7 +16,6 @@ public MasterVolumeInputBox() : TextChanged += UpdateAudio; } - /// /// Updates the audio. /// @@ -28,11 +23,10 @@ public MasterVolumeInputBox() : /// The instance containing the event data. protected void UpdateAudio(Object obj, EventArgs args) { - if (int.TryParse(this.Text, out int volume) && volume >=0 && volume <= 100) + if (int.TryParse(this.Text, out int volume) && volume >= 0 && volume <= 100) { SettingsManager.AudioSettings.Settings.MasterVolume = volume; - SettingsManager.AudioSettings.Save(); - + SettingsManager.AudioSettings.Save(); } } @@ -45,7 +39,5 @@ private static Rectangle GetInitialLocation() return new Rectangle(x, y, width, height); } - - } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/Labels/MasterVolumeLabel.cs b/MLGUIWindows/GUI/Settings Menu/Labels/MasterVolumeLabel.cs similarity index 86% rename from MagicalLifeGUIWindows/GUI/Settings Menu/Labels/MasterVolumeLabel.cs rename to MLGUIWindows/GUI/Settings Menu/Labels/MasterVolumeLabel.cs index 4a0523d2..98022348 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/Labels/MasterVolumeLabel.cs +++ b/MLGUIWindows/GUI/Settings Menu/Labels/MasterVolumeLabel.cs @@ -2,11 +2,6 @@ using MagicalLifeGUIWindows.GUI.Reusable; using MagicalLifeGUIWindows.Properties; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MagicalLifeGUIWindows.GUI.Settings_Menu.Labels { @@ -16,8 +11,6 @@ public MasterVolumeLabel() : base(GetLocation(), TextureLoader.GUIInputBox100x50 { } - - private static Rectangle GetLocation() { int x = SettingsMenuLayout.MasterVolumeLabelX; @@ -28,4 +21,4 @@ private static Rectangle GetLocation() return new Rectangle(x, y, width, height); } } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsGameMenu.cs b/MLGUIWindows/GUI/Settings Menu/SettingsGameMenu.cs similarity index 77% rename from MagicalLifeGUIWindows/GUI/Settings Menu/SettingsGameMenu.cs rename to MLGUIWindows/GUI/Settings Menu/SettingsGameMenu.cs index 526e93ca..6565575b 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsGameMenu.cs +++ b/MLGUIWindows/GUI/Settings Menu/SettingsGameMenu.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MagicalLifeGUIWindows.GUI.Settings_Menu +namespace MagicalLifeGUIWindows.GUI.Settings_Menu { public static class SettingsGameMenu { @@ -19,7 +13,5 @@ internal static void Initialize(bool fromMainMenu) SettingsGameMenuContainer settingsMenu = new SettingsGameMenuContainer(fromMainMenu); Menu = settingsMenu; } - - } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsGameMenuContainer.cs b/MLGUIWindows/GUI/Settings Menu/SettingsGameMenuContainer.cs similarity index 82% rename from MagicalLifeGUIWindows/GUI/Settings Menu/SettingsGameMenuContainer.cs rename to MLGUIWindows/GUI/Settings Menu/SettingsGameMenuContainer.cs index 82be4309..72f52618 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsGameMenuContainer.cs +++ b/MLGUIWindows/GUI/Settings Menu/SettingsGameMenuContainer.cs @@ -1,11 +1,6 @@ using MagicalLifeAPI.Asset; using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeGUIWindows.GUI.Reusable; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MagicalLifeGUIWindows.GUI.Settings_Menu.Buttons; using MagicalLifeGUIWindows.GUI.Settings_Menu.InputBoxes; using MagicalLifeGUIWindows.GUI.Settings_Menu.Labels; @@ -23,7 +18,7 @@ public SettingsGameMenuContainer(bool fromMainMenu) : base(TextureLoader.GUIMenu public override string GetTextureName() { - return TextureLoader.GUIMenuBackground; + return TextureLoader.GUIMenuBackground; } } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout.cs b/MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout.cs similarity index 95% rename from MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout.cs rename to MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout.cs index caf40344..dd21a680 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout.cs +++ b/MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout.cs @@ -1,9 +1,4 @@ using MagicalLifeAPI.Filing; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace MagicalLifeGUIWindows.GUI.Settings_Menu { @@ -37,7 +32,6 @@ public static int MasterVolumeInputBoxX return SettingsMenuLayout1920x1080.MasterVolumeInputBoxX; } } - } public static int MasterVolumeInputBoxY @@ -69,6 +63,7 @@ public static int MasterVolumeInputBoxWidth } } } + public static int MasterVolumeInputBoxHeight { get @@ -82,7 +77,6 @@ public static int MasterVolumeInputBoxHeight return SettingsMenuLayout1920x1080.MasterVolumeInputBoxHeight; } } - } public static int MasterVolumeLabelX @@ -104,7 +98,7 @@ public static int MasterVolumeLabelY { get { - switch ((Resolution) SettingsManager.WindowSettings.Settings.Resolution) + switch ((Resolution)SettingsManager.WindowSettings.Settings.Resolution) { case Resolution._2560x1440: return SetingsMenuLayout2560x1440.MasterVolumeLabelY; @@ -145,4 +139,4 @@ public static int MasterVolumeLabelHeight } } } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout1920x1080.cs b/MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout1920x1080.cs similarity index 81% rename from MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout1920x1080.cs rename to MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout1920x1080.cs index 1bff383c..23f89c82 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout1920x1080.cs +++ b/MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout1920x1080.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MagicalLifeGUIWindows.GUI.Settings_Menu +namespace MagicalLifeGUIWindows.GUI.Settings_Menu { public static class SettingsMenuLayout1920x1080 { @@ -23,4 +17,4 @@ public static class SettingsMenuLayout1920x1080 public static readonly int MasterVolumeLabelWidth = 200; public static readonly int MasterVolumeLabelHeight = 100; } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout2560x1440.cs b/MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout2560x1440.cs similarity index 81% rename from MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout2560x1440.cs rename to MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout2560x1440.cs index 2da54410..7cae4b0c 100644 --- a/MagicalLifeGUIWindows/GUI/Settings Menu/SettingsMenuLayout2560x1440.cs +++ b/MLGUIWindows/GUI/Settings Menu/SettingsMenuLayout2560x1440.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MagicalLifeGUIWindows.GUI.Settings_Menu +namespace MagicalLifeGUIWindows.GUI.Settings_Menu { public static class SetingsMenuLayout2560x1440 { @@ -23,4 +17,4 @@ public static class SetingsMenuLayout2560x1440 public static readonly int MasterVolumeLabelWidth = 200; public static readonly int MasterVolumeLabelHeight = 100; } -} +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/Game1.cs b/MLGUIWindows/Game1.cs similarity index 97% rename from MagicalLifeGUIWindows/Game1.cs rename to MLGUIWindows/Game1.cs index f845ce4c..ee388d04 100644 --- a/MagicalLifeGUIWindows/Game1.cs +++ b/MLGUIWindows/Game1.cs @@ -1,9 +1,9 @@ -using System; -using MagicalLifeAPI.Asset; +using MagicalLifeAPI.Asset; using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeAPI.Filing; using MagicalLifeAPI.Filing.Logging; using MagicalLifeAPI.Load; +using MagicalLifeAPI.Mod; using MagicalLifeAPI.Networking.Serialization; using MagicalLifeAPI.Sound; using MagicalLifeAPI.Universal; @@ -12,6 +12,7 @@ using MagicalLifeGUIWindows.GUI.In; using MagicalLifeGUIWindows.Input; using MagicalLifeGUIWindows.Load; +using MagicalLifeGUIWindows.Map; using MagicalLifeGUIWindows.Rendering; using MagicalLifeGUIWindows.Screens; using Microsoft.Xna.Framework; @@ -47,6 +48,7 @@ public Game1() Graphics = new GraphicsDeviceManager(this); this.Content.RootDirectory = "Content"; Game1.AssetManager = this.Content; + RenderingData.AssetManagerClone = Game1.AssetManager; UniversalEvents.GameExit += this.UniversalEvents_GameExit; Graphics.HardwareModeSwitch = false; OutputDebugInfo(); @@ -101,13 +103,13 @@ protected override void LoadContent() load.LoadAll(ref msg, new List() { - new ItemLoader(), new InputLoader(), new Initializer(), //new TextureLoader(), new TextureLoader(this.Content), - new SpecificTextureLoader(), - new ProtoTypeLoader() + new ProtoTypeLoader(), + new ModLoader(), + new ProtoManager() }); this.InitializeSplashScreens(); } diff --git a/MagicalLifeGUIWindows/Icon.ico b/MLGUIWindows/Icon.ico similarity index 100% rename from MagicalLifeGUIWindows/Icon.ico rename to MLGUIWindows/Icon.ico diff --git a/MagicalLifeGUIWindows/Input/InputHandlers.cs b/MLGUIWindows/Input/InputHandlers.cs similarity index 92% rename from MagicalLifeGUIWindows/Input/InputHandlers.cs rename to MLGUIWindows/Input/InputHandlers.cs index 772d3277..344167f8 100644 --- a/MagicalLifeGUIWindows/Input/InputHandlers.cs +++ b/MLGUIWindows/Input/InputHandlers.cs @@ -21,12 +21,12 @@ public static class InputHandlers public static EscapeHandler EscHandler { get; set; } - public static ZoomHandler ZooomHandler { get; set; } - public static LivingMenuHandler LivingMenuHandler { get; set; } public static ContainerDragHandler DragHandler { get; set; } + public static ActionMenuHandler ActionMenu { get; set; } + public static void Initialize() { LivingMove = new LivingMoveOrderInputHandler(); @@ -35,10 +35,10 @@ public static void Initialize() TillingAction = new TillingActionHandler(); StrafingHandler = new StrafeHandler(); EscHandler = new EscapeHandler(); - ZooomHandler = new ZoomHandler(); ChopAction = new ChopActionHandler(); LivingMenuHandler = new LivingMenuHandler(); DragHandler = new ContainerDragHandler(); + ActionMenu = new ActionMenuHandler(); } } } \ No newline at end of file diff --git a/MLGUIWindows/Input/Specialized Handlers/ActionMenuHandler.cs b/MLGUIWindows/Input/Specialized Handlers/ActionMenuHandler.cs new file mode 100644 index 00000000..11f1358c --- /dev/null +++ b/MLGUIWindows/Input/Specialized Handlers/ActionMenuHandler.cs @@ -0,0 +1,28 @@ +using MagicalLifeAPI.Filing; +using MagicalLifeGUIWindows.GUI.Action_Menu; + +namespace MagicalLifeGUIWindows.Input.Specialized_Handlers +{ + public class ActionMenuHandler + { + public ActionMenuHandler() + { + KeyboardHandler.KeysPressed += this.KeyboardHandler_KeysPressed; + } + + private void KeyboardHandler_KeysPressed(object sender, Microsoft.Xna.Framework.Input.Keys e) + { + if (e == SettingsManager.Keybindings.Settings.OpenActionMenu) + { + if (BoundHandler.GUIWindows.Contains(ActionMenu.AMenu)) + { + BoundHandler.RemoveContainer(ActionMenu.AMenu); + } + else + { + ActionMenu.Initialize(); + } + } + } + } +} \ No newline at end of file diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/ChopActionHandler.cs b/MLGUIWindows/Input/Specialized Handlers/ChopActionHandler.cs similarity index 73% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/ChopActionHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/ChopActionHandler.cs index 7ab0364b..50192d6a 100644 --- a/MagicalLifeGUIWindows/Input/Specialized Handlers/ChopActionHandler.cs +++ b/MLGUIWindows/Input/Specialized Handlers/ChopActionHandler.cs @@ -1,6 +1,8 @@ -using MagicalLifeAPI.Components.Generic.Renderable; +using MagicalLifeAPI.Components; +using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeAPI.Entity.AI.Task; using MagicalLifeAPI.Entity.AI.Task.Tasks; +using MagicalLifeAPI.GUI; using MagicalLifeAPI.World.Base; using MagicalLifeAPI.World.Data; using MagicalLifeAPI.World.Resources; @@ -23,15 +25,16 @@ private void InputHistory_InputAdded() if (last.ActionSelected == ActionSelected.Chop) { - foreach (MagicalLifeAPI.GUI.Selectable item in last.Selected) + foreach (HasComponents item in last.Selected) { - Tile tile = World.GetTile(RenderInfo.Dimension, item.MapLocation.X, item.MapLocation.Y); + ComponentSelectable selectable = item.GetExactComponent(); + Tile tile = World.GetTile(RenderInfo.Dimension, selectable.MapLocation.X, selectable.MapLocation.Y); if (tile.Resources != null && tile.ImpendingAction == ActionSelected.None) { if (tile.Resources is TreeBase) { - HarvestTask task = new HarvestTask(tile.MapLocation, Guid.NewGuid()); + HarvestTask task = new HarvestTask(selectable.MapLocation, Guid.NewGuid()); tile.ImpendingAction = ActionSelected.Chop; TaskManager.Manager.AddTask(task); } diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/ContainerDragHandler.cs b/MLGUIWindows/Input/Specialized Handlers/ContainerDragHandler.cs similarity index 100% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/ContainerDragHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/ContainerDragHandler.cs diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/EscapeHandler.cs b/MLGUIWindows/Input/Specialized Handlers/EscapeHandler.cs similarity index 86% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/EscapeHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/EscapeHandler.cs index b40578b9..0e2bad13 100644 --- a/MagicalLifeGUIWindows/Input/Specialized Handlers/EscapeHandler.cs +++ b/MLGUIWindows/Input/Specialized Handlers/EscapeHandler.cs @@ -2,6 +2,7 @@ using MagicalLifeAPI.Filing.Logging; using MagicalLifeAPI.World.Data; using MagicalLifeGUIWindows.GUI; +using MagicalLifeGUIWindows.GUI.Action_Menu; using MagicalLifeGUIWindows.GUI.In; namespace MagicalLifeGUIWindows.Input.Specialized_Handlers @@ -29,6 +30,11 @@ private void HandleEscapeKey() //Show main menu. MasterLog.DebugWriteLine("Escape key pressed"); + if (ActionMenu.AMenu.Visible == true) + { + BoundHandler.RemoveContainer(ActionMenu.AMenu); + } + if (World.Dimensions.Count > 0) { //Ingame: Open up in game menu diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/LivingMenuHandler.cs b/MLGUIWindows/Input/Specialized Handlers/LivingMenuHandler.cs similarity index 88% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/LivingMenuHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/LivingMenuHandler.cs index e043c921..8a020ea7 100644 --- a/MagicalLifeGUIWindows/Input/Specialized Handlers/LivingMenuHandler.cs +++ b/MLGUIWindows/Input/Specialized Handlers/LivingMenuHandler.cs @@ -2,6 +2,7 @@ using MagicalLifeAPI.DataTypes; using MagicalLifeAPI.Entity; using MagicalLifeAPI.Entity.AI.Task; +using MagicalLifeAPI.GUI; using MagicalLifeAPI.World; using MagicalLifeGUIWindows.GUI.Character_Menu; using MagicalLifeGUIWindows.Input.History; @@ -25,7 +26,7 @@ private void InputHistory_InputAdded() if (historical.ActionSelected == ActionSelected.None && historical.Selected.Count == 1) { - Point2D mapLocation = historical.Selected[0].MapLocation; + Point2D mapLocation = historical.Selected[0].GetExactComponent().MapLocation; Living creature = WorldUtil.GetCreature(mapLocation, RenderInfo.Dimension); if (creature != null) diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/LivingMoveOrderInputHandler.cs b/MLGUIWindows/Input/Specialized Handlers/LivingMoveOrderInputHandler.cs similarity index 85% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/LivingMoveOrderInputHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/LivingMoveOrderInputHandler.cs index d5a909e6..c5319125 100644 --- a/MagicalLifeGUIWindows/Input/Specialized Handlers/LivingMoveOrderInputHandler.cs +++ b/MLGUIWindows/Input/Specialized Handlers/LivingMoveOrderInputHandler.cs @@ -1,4 +1,5 @@ -using MagicalLifeAPI.Components.Generic.Renderable; +using MagicalLifeAPI.Components; +using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeAPI.DataTypes; using MagicalLifeAPI.Entity; using MagicalLifeAPI.Entity.AI.Task; @@ -29,22 +30,22 @@ private void InputHistory_InputAdded() if (historical.ActionSelected == ActionSelected.None && historical.OrderedToTile && historical.OrderPoint2D != null) { - foreach (Selectable item in InputHistory.Selected) + foreach (HasComponents item in InputHistory.Selected) { this.Move(item, historical.OrderPoint2D); } } } - private void Move(Selectable selectable, Point2D target) + private void Move(HasComponents selectable, Point2D target) { if (World.Dimensions[RenderInfo.Dimension][target.X, target.Y].IsWalkable) { switch (selectable) { case Living living: - - Point2D start = selectable.MapLocation; + ComponentSelectable positionData = living.GetExactComponent(); + Point2D start = positionData.MapLocation; if (start != target) { List pth; @@ -61,7 +62,7 @@ private void Move(Selectable selectable, Point2D target) //No reroute else { - pth = MainPathFinder.GetRoute(RenderInfo.Dimension, living.MapLocation, target); + pth = MainPathFinder.GetRoute(RenderInfo.Dimension, positionData.MapLocation, target); } Extensions.EnqueueCollection(living.QueuedMovement, pth); diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/LogoSkip.cs b/MLGUIWindows/Input/Specialized Handlers/LogoSkip.cs similarity index 100% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/LogoSkip.cs rename to MLGUIWindows/Input/Specialized Handlers/LogoSkip.cs diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/MiningActionHandler.cs b/MLGUIWindows/Input/Specialized Handlers/MiningActionHandler.cs similarity index 73% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/MiningActionHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/MiningActionHandler.cs index 498d7e7e..556103f5 100644 --- a/MagicalLifeGUIWindows/Input/Specialized Handlers/MiningActionHandler.cs +++ b/MLGUIWindows/Input/Specialized Handlers/MiningActionHandler.cs @@ -1,6 +1,8 @@ -using MagicalLifeAPI.Components.Generic.Renderable; +using MagicalLifeAPI.Components; +using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeAPI.Entity.AI.Task; using MagicalLifeAPI.Entity.AI.Task.Tasks; +using MagicalLifeAPI.GUI; using MagicalLifeAPI.World.Base; using MagicalLifeAPI.World.Data; using MagicalLifeAPI.World.Resources; @@ -23,15 +25,16 @@ private void InputHistory_InputAdded() if (last.ActionSelected == ActionSelected.Mine) { - foreach (MagicalLifeAPI.GUI.Selectable item in last.Selected) + foreach (HasComponents item in last.Selected) { - Tile tile = World.GetTile(RenderInfo.Dimension, item.MapLocation.X, item.MapLocation.Y); + ComponentSelectable selectable = item.GetExactComponent(); + Tile tile = World.GetTile(RenderInfo.Dimension, selectable.MapLocation.X, selectable.MapLocation.Y); if (tile.Resources != null && tile.ImpendingAction == ActionSelected.None) { if (tile.Resources is RockBase) { - HarvestTask task = new HarvestTask(tile.MapLocation, Guid.NewGuid()); + HarvestTask task = new HarvestTask(selectable.MapLocation, Guid.NewGuid()); tile.ImpendingAction = ActionSelected.Mine; TaskManager.Manager.AddTask(task); } diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/StrafeHandler.cs b/MLGUIWindows/Input/Specialized Handlers/StrafeHandler.cs similarity index 100% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/StrafeHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/StrafeHandler.cs diff --git a/MagicalLifeGUIWindows/Input/Specialized Handlers/TillingActionHandler.cs b/MLGUIWindows/Input/Specialized Handlers/TillingActionHandler.cs similarity index 67% rename from MagicalLifeGUIWindows/Input/Specialized Handlers/TillingActionHandler.cs rename to MLGUIWindows/Input/Specialized Handlers/TillingActionHandler.cs index 7ed0337c..ce768efa 100644 --- a/MagicalLifeGUIWindows/Input/Specialized Handlers/TillingActionHandler.cs +++ b/MLGUIWindows/Input/Specialized Handlers/TillingActionHandler.cs @@ -1,7 +1,9 @@ -using MagicalLifeAPI.Components.Generic.Renderable; +using MagicalLifeAPI.Components; +using MagicalLifeAPI.Components.Generic.Renderable; using MagicalLifeAPI.Components.Resource; using MagicalLifeAPI.Entity.AI.Task; using MagicalLifeAPI.Entity.AI.Task.Tasks; +using MagicalLifeAPI.GUI; using MagicalLifeAPI.World.Base; using MagicalLifeAPI.World.Data; using MagicalLifeGUIWindows.Input.History; @@ -23,15 +25,16 @@ private void InputHistory_InputAdded() if (last.ActionSelected == ActionSelected.Till) { - foreach (MagicalLifeAPI.GUI.Selectable item in last.Selected) + foreach (HasComponents item in last.Selected) { - Tile tile = World.GetTile(RenderInfo.Dimension, item.MapLocation.X, item.MapLocation.Y); + ComponentSelectable selected = item.GetExactComponent(); + Tile tile = World.GetTile(RenderInfo.Dimension, selected.MapLocation.X, selected.MapLocation.Y); - if (tile is ITillable + if (tile.HasComponent() && tile.ImpendingAction == ActionSelected.None && tile.Resources == null) { - TillTask task = new TillTask(tile.MapLocation, Guid.NewGuid(), RenderInfo.Dimension); + TillTask task = new TillTask(tile.GetExactComponent().MapLocation, Guid.NewGuid(), RenderInfo.Dimension); tile.ImpendingAction = ActionSelected.Till; TaskManager.Manager.AddTask(task); } diff --git a/MagicalLifeGUIWindows/Load/Initializer.cs b/MLGUIWindows/Load/Initializer.cs similarity index 100% rename from MagicalLifeGUIWindows/Load/Initializer.cs rename to MLGUIWindows/Load/Initializer.cs diff --git a/MagicalLifeGUIWindows/Load/InputLoader.cs b/MLGUIWindows/Load/InputLoader.cs similarity index 100% rename from MagicalLifeGUIWindows/Load/InputLoader.cs rename to MLGUIWindows/Load/InputLoader.cs diff --git a/MagicalLifeGUIWindows/Load/WindowConfig.cs b/MLGUIWindows/Load/WindowConfig.cs similarity index 100% rename from MagicalLifeGUIWindows/Load/WindowConfig.cs rename to MLGUIWindows/Load/WindowConfig.cs diff --git a/MagicalLifeGUIWindows/MagicalLifeGUIWindows.csproj b/MLGUIWindows/MLGUIWindows.csproj similarity index 59% rename from MagicalLifeGUIWindows/MagicalLifeGUIWindows.csproj rename to MLGUIWindows/MLGUIWindows.csproj index 8dbf86de..c7591a21 100644 --- a/MagicalLifeGUIWindows/MagicalLifeGUIWindows.csproj +++ b/MLGUIWindows/MLGUIWindows.csproj @@ -6,33 +6,17 @@ x86 8.0.30703 2.0 - {9096A50A-058B-40F4-80A7-3C4D8725B658} + {94CBCEE0-960D-4B20-B7C5-020C24022A79} WinExe Properties - MagicalLifeGUIWindows - MagicalLifeGUIWindows + MLGUIWindows + MLGUIWindows 512 Windows - v4.7.1 + v4.7.2 - false - C:\Users\sneak\Downloads\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 5 - 1.0.0.%2a - false - true - true x64 @@ -45,7 +29,7 @@ 4 - x86 + x64 pdbonly true bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\ @@ -59,18 +43,6 @@ app.manifest - - 9800B6AAC48C0DFCFF06E73E02FD7AB34C0F64A2 - - - MagicalLifeGUIWindows_TemporaryKey.pfx - - - true - - - false - true bin\x64\Debug\ @@ -80,8 +52,6 @@ prompt MinimumRecommendedRules.ruleset true - 7.3 - 4 bin\x64\Release\ @@ -92,13 +62,15 @@ prompt MinimumRecommendedRules.ruleset true - 7.3 - - - LocalIntranet + + + + + + @@ -111,43 +83,52 @@ - - + + + + + + + + + + + + + + - + + + + + + + + + - - - - - - - - - - - + + + - - - - - - - - - + + + + + + @@ -155,84 +136,46 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - + Resources.resx True True - Resources.resx - - - ..\packages\BouncyCastle.1.8.2\lib\BouncyCastle.Crypto.dll + + ..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll ..\packages\MailKit.2.1.4\lib\net45\MailKit.dll @@ -256,7 +199,10 @@ $(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Octokit.0.32.0\lib\net45\Octokit.dll ..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll @@ -273,7 +219,6 @@ True True - ..\packages\System.Configuration.ConfigurationManager.4.5.0\lib\net461\System.Configuration.ConfigurationManager.dll @@ -294,131 +239,24 @@ True - - ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll - True - True - - - ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll - True - True - - - ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - True - True - - - - ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll - True - True - - - ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll - True - True - - - ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll - True - True - - - ..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll - True - True - - - ..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll - True - True - - - ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll - True - True - - - ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll - True - True - - - - ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll - True - True - - - ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll - True - True - - - ..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll - True - True - - - ..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll - True - True - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - True - + ..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll - - ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll - True - True - - - ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - True - True - - - ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - True - True - - - ..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll - True - True - ..\packages\System.Security.Permissions.4.5.0\lib\net461\System.Security.Permissions.dll - - ..\packages\System.Security.Principal.Windows.4.5.1\lib\net461\System.Security.Principal.Windows.dll + + ..\packages\System.Security.Principal.Windows.4.5.0\lib\net461\System.Security.Principal.Windows.dll - - ..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll - True - True - - - - ..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll - True - True - @@ -431,6 +269,10 @@ Designer + + + + {1f068781-8fee-4ac2-a8ae-2251c558cf28} @@ -440,39 +282,28 @@ {6ef2d2b5-bfcb-4eb7-b3a0-57a9b32e37ce} MagicalLifeClientStandard + + {89b9dd2d-4904-4491-b111-e43a750e440b} + MagicalLifeMod + - {551AF4EC-5AE6-408C-9825-1471B53D4414} + {551af4ec-5ae6-408c-9825-1471b53d4414} MagicalLifeServerStandard - - {ec7fd282-023d-4926-a766-19b36aeac4c2} - MagicalLifeSettingsStandard + + {251190F6-AC08-4274-895D-E806FD2D16C4} + MonoGUI - - - - - - - - False - Microsoft .NET Framework 4.7.1 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - PublicResXFileCodeGenerator Resources.Designer.cs + Designer + copy "$(SolutionDir)\Included DLL\*.dll" "$(ProjectDir)bin\x64\Debug" copy "$(SolutionDir)\Included DLL\*.dll" "$(ProjectDir)bin\x64\Release" @@ -483,9 +314,7 @@ copy "$(SolutionDir)\Included DLL\*.dll" "$(ProjectDir)bin\x64\Release"This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - -