diff options
31 files changed, 369 insertions, 377 deletions
diff --git a/Mundus Build 15-04-2020 No1.exe b/Mundus Build 16-04-2020 No1.exe Binary files differindex ab4ad95..923b5ce 100644 --- a/Mundus Build 15-04-2020 No1.exe +++ b/Mundus Build 16-04-2020 No1.exe diff --git a/Mundus/Data/SuperLayers/ISuperLayer.cs b/Mundus/Data/SuperLayers/ISuperLayer.cs index c1f62a3..733df32 100644 --- a/Mundus/Data/SuperLayers/ISuperLayer.cs +++ b/Mundus/Data/SuperLayers/ISuperLayer.cs @@ -3,7 +3,7 @@ using Mundus.Service.Tiles.Items; namespace Mundus.Data.SuperLayers { public interface ISuperLayer { - MobTile GetMobLayerTile(int yPpos, int xPos); + MobTile GetMobLayerTile(int yPos, int xPos); Structure GetStructureLayerTile(int yPos, int xPos); GroundTile GetGroundLayerTile(int yPos, int xPos); diff --git a/Mundus/Data/SuperLayers/Mobs/LMI.cs b/Mundus/Data/SuperLayers/Mobs/MI.cs index ce4bb66..c036981 100644 --- a/Mundus/Data/SuperLayers/Mobs/LMI.cs +++ b/Mundus/Data/SuperLayers/Mobs/MI.cs @@ -1,12 +1,13 @@ -using Mundus.Service.Mobs.LandMobs; +using Mundus.Data.SuperLayers;
+using Mundus.Service.Mobs.LandMobs; using Mundus.Service.Tiles.ItemPresets; namespace Mundus.Data.Superlayers.Mobs { - public static class LMI { //stands for Land Mob Instances + public static class MI { //stands for Land Mob Instances public static Player Player { get; private set; } public static void CreateInstances(int inventorySize) { - Player = new Player("player", 20, inventorySize); + Player = new Player("player", 20, inventorySize, LI.Land); } public static void CreateInventories(int screenInvSize) { diff --git a/Mundus/Icons/Land/Mobs/test1.jpg b/Mundus/Icons/Land/Mobs/test1.jpg Binary files differnew file mode 100644 index 0000000..9337a09 --- /dev/null +++ b/Mundus/Icons/Land/Mobs/test1.jpg diff --git a/Mundus/Mundus.csproj b/Mundus/Mundus.csproj index 3aef682..4f4c787 100644 --- a/Mundus/Mundus.csproj +++ b/Mundus/Mundus.csproj @@ -81,6 +81,7 @@ <EmbeddedResource Include="Icons\Land\Tools\rock_axe.png" />
<EmbeddedResource Include="Icons\Land\Tools\rock_shovel.png" />
<EmbeddedResource Include="Icons\Sky\Ground\s_sky.png" />
+ <EmbeddedResource Include="Icons\Land\Mobs\test1.jpg" />
</ItemGroup>
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
@@ -107,12 +108,8 @@ <Compile Include="Views\Dialogs\ExitDialog.cs" />
<Compile Include="gtk-gui\Mundus.Views.Dialogs.ExitDialog.cs" />
<Compile Include="Service\Tiles\ITile.cs" />
- <Compile Include="Service\Mobs\IMob.cs" />
- <Compile Include="Service\Tiles\MobTile.cs" />
- <Compile Include="Service\Mobs\LandMobs\Player.cs" />
<Compile Include="Service\Inventory.cs" />
<Compile Include="Views\Windows\IGameWindow.cs" />
- <Compile Include="Service\Mobs\MobMovement.cs" />
<Compile Include="Data\MapSizes.cs" />
<Compile Include="Service\SwitchItems.cs">
<IncludeInPackage>true</IncludeInPackage>
@@ -124,7 +121,7 @@ <Compile Include="Data\SuperLayers\Land.cs" />
<Compile Include="Data\SuperLayers\ISuperLayer.cs" />
<Compile Include="Data\SuperLayers\LI.cs" />
- <Compile Include="Data\SuperLayers\Mobs\LMI.cs" />
+ <Compile Include="Data\SuperLayers\Mobs\MI.cs" />
<Compile Include="Service\WindowController.cs" />
<Compile Include="Service\GameGenerator.cs" />
<Compile Include="Service\Tiles\Items\ItemTile.cs" />
@@ -133,9 +130,6 @@ <Compile Include="Data\Tiles\ToolTypes.cs" />
<Compile Include="Service\Tiles\Items\Material.cs" />
<Compile Include="Service\Tiles\Items\Gear.cs" />
- <Compile Include="Service\Mobs\MobFighting.cs" />
- <Compile Include="Service\Mobs\MobTerraforming.cs" />
- <Compile Include="Service\Mobs\MobStatsController.cs" />
<Compile Include="Service\Crafting\CraftingRecipe.cs" />
<Compile Include="Service\Crafting\CraftingController.cs" />
<Compile Include="Data\Crafting\RI.cs" />
@@ -150,6 +144,13 @@ <Compile Include="Service\SuperLayers\HeightController.cs" />
<Compile Include="Data\SuperLayers\Sky.cs" />
<Compile Include="Service\SuperLayers\Generators\SkySuperLayerGenerator.cs" />
+ <Compile Include="Service\Mobs\LandMobs\LandMobsPresets.cs" />
+ <Compile Include="Service\Mobs\MobTile.cs" />
+ <Compile Include="Service\Mobs\Controllers\MobFighting.cs" />
+ <Compile Include="Service\Mobs\Controllers\MobMovement.cs" />
+ <Compile Include="Service\Mobs\Controllers\MobStatsController.cs" />
+ <Compile Include="Service\Mobs\Controllers\MobTerraforming.cs" />
+ <Compile Include="Service\Mobs\LandMobs\Player.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Service\" />
@@ -174,6 +175,7 @@ <Folder Include="Icons\Land\Materials\" />
<Folder Include="Service\SuperLayers\Generators\" />
<Folder Include="Icons\Sky\Ground\" />
+ <Folder Include="Service\Mobs\Controllers\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
diff --git a/Mundus/Program.cs b/Mundus/Program.cs index d6b17e6..120e5a9 100644 --- a/Mundus/Program.cs +++ b/Mundus/Program.cs @@ -15,7 +15,7 @@ namespace Mundus { WI.CreateInstances(); DI.CreateInstances(); LI.CreateInstances(); - LMI.CreateInstances( 1 ); + MI.CreateInstances( 1 ); RI.CreateInstances(); WI.WMain.Show(); diff --git a/Mundus/Service/Calculate.cs b/Mundus/Service/Calculate.cs index 336d2da..43a3787 100644 --- a/Mundus/Service/Calculate.cs +++ b/Mundus/Service/Calculate.cs @@ -10,35 +10,35 @@ namespace Mundus.Service { *he isn't, it depends on the screen and map sizes.*/
//kind of hardcoded public static int CalculateMaxY(int size) { - int maxY = (LMI.Player.YPos - 2 >= 0) ? LMI.Player.YPos + 2 : size - 1; + int maxY = (MI.Player.YPos - 2 >= 0) ? MI.Player.YPos + 2 : size - 1; if (maxY >= MapSizes.CurrSize) maxY = MapSizes.CurrSize - 1; return maxY; } public static int CalculateStartY(int size) { - int startY = (LMI.Player.YPos - 2 <= MapSizes.CurrSize - size) ? LMI.Player.YPos - 2 : MapSizes.CurrSize - size; + int startY = (MI.Player.YPos - 2 <= MapSizes.CurrSize - size) ? MI.Player.YPos - 2 : MapSizes.CurrSize - size; if (startY < 0) startY = 0; return startY; } public static int CalculateMaxX(int size) { - int maxX = (LMI.Player.XPos - 2 >= 0) ? LMI.Player.XPos + 2 : size - 1; + int maxX = (MI.Player.XPos - 2 >= 0) ? MI.Player.XPos + 2 : size - 1; if (maxX >= MapSizes.CurrSize) maxX = MapSizes.CurrSize - 1; return maxX; } public static int CalculateStartX(int size) { - int startX = (LMI.Player.XPos - 2 <= MapSizes.CurrSize - size) ? LMI.Player.XPos - 2 : MapSizes.CurrSize - size; + int startX = (MI.Player.XPos - 2 <= MapSizes.CurrSize - size) ? MI.Player.XPos - 2 : MapSizes.CurrSize - size; if (startX < 0) startX = 0; return startX; }
//Screen buttons show only a certain part of the whole map
public static int CalculateYFromButton(int buttonYPos, int size) { - int newYPos = (LMI.Player.YPos - 2 >= 0) ? LMI.Player.YPos - 2 + buttonYPos : buttonYPos;
- if (LMI.Player.YPos > MapSizes.CurrSize - 3) newYPos = buttonYPos + MapSizes.CurrSize - size;
+ int newYPos = (MI.Player.YPos - 2 >= 0) ? MI.Player.YPos - 2 + buttonYPos : buttonYPos;
+ if (MI.Player.YPos > MapSizes.CurrSize - 3) newYPos = buttonYPos + MapSizes.CurrSize - size;
return newYPos;
}
public static int CalculateXFromButton(int buttonXPos, int size) { - int newXPos = (LMI.Player.XPos - 2 >= 0) ? LMI.Player.XPos - 2 + buttonXPos : buttonXPos;
- if (LMI.Player.XPos > MapSizes.CurrSize - 3) newXPos = buttonXPos + MapSizes.CurrSize - size;
+ int newXPos = (MI.Player.XPos - 2 >= 0) ? MI.Player.XPos - 2 + buttonXPos : buttonXPos;
+ if (MI.Player.XPos > MapSizes.CurrSize - 3) newXPos = buttonXPos + MapSizes.CurrSize - size;
return newXPos; } } diff --git a/Mundus/Service/Crafting/CraftingController.cs b/Mundus/Service/Crafting/CraftingController.cs index 4e998a1..3b9fb79 100644 --- a/Mundus/Service/Crafting/CraftingController.cs +++ b/Mundus/Service/Crafting/CraftingController.cs @@ -13,12 +13,12 @@ namespace Mundus.Service.Crafting { /// Gets all different items and their quantaties in the inventory. Stores that in memory. /// </summary> public static void FindAvalableItems() { - avalableItems = LMI.Player.Inventory.Items.Where(x => x != null) + avalableItems = MI.Player.Inventory.Items.Where(x => x != null) //Can't use distinct on non primative types, beause they also hold their memory location info (I think). //This is my way of getting only the "unique" item tiles. - .Select(x => x.stock_id).Distinct().Select(x => LMI.Player.Inventory.Items.Where(y => y != null).First(y => y.stock_id == x)) + .Select(x => x.stock_id).Distinct().Select(x => MI.Player.Inventory.Items.Where(y => y != null).First(y => y.stock_id == x)) //For each "unique" item tile (key), get how many there are of it in the player inventory (value) - .Select(x => new KeyValuePair<ItemTile, int>(x, LMI.Player.Inventory.Items.Where(y => y != null).Count(i => i.stock_id == x.stock_id))) + .Select(x => new KeyValuePair<ItemTile, int>(x, MI.Player.Inventory.Items.Where(y => y != null).Count(i => i.stock_id == x.stock_id))) .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); } @@ -41,10 +41,10 @@ namespace Mundus.Service.Crafting { public static void CraftItem(CraftingRecipe itemRecipe) { // Removes all items that are used to craft the result item foreach (var itemAndCount in itemRecipe.GetRequiredItemsAndCounts()) { - for(int i = 0, removedItems = 0; i < LMI.Player.Inventory.Items.Length && removedItems < itemAndCount.Value; i++) { - if (LMI.Player.Inventory.Items[i] != null) { - if (LMI.Player.Inventory.Items[i].stock_id == itemAndCount.Key.stock_id) { - LMI.Player.Inventory.Items[i] = null; + for(int i = 0, removedItems = 0; i < MI.Player.Inventory.Items.Length && removedItems < itemAndCount.Value; i++) { + if (MI.Player.Inventory.Items[i] != null) { + if (MI.Player.Inventory.Items[i].stock_id == itemAndCount.Key.stock_id) { + MI.Player.Inventory.Items[i] = null; removedItems++; } } @@ -65,7 +65,7 @@ namespace Mundus.Service.Crafting { if (itemRecipe.ResultItem.GetType() == typeof(Structure)) { tmp = new Structure((Structure)itemRecipe.ResultItem); } - LMI.Player.Inventory.AppendToItems(tmp); + MI.Player.Inventory.AppendToItems(tmp); Data.Windows.WI.SelWin.PrintInventory(); } diff --git a/Mundus/Service/GameGenerator.cs b/Mundus/Service/GameGenerator.cs index ea235b4..832f486 100644 --- a/Mundus/Service/GameGenerator.cs +++ b/Mundus/Service/GameGenerator.cs @@ -32,7 +32,7 @@ namespace Mundus.Service { public static void GameWindowInventorySetup() { WI.SelWin.SetDefaults(); WI.WPause.GameWindow = WI.SelWin; - LMI.CreateInventories(WI.SelWin.Size); + MI.CreateInventories(WI.SelWin.Size); WI.SelWin.PrintScreen(); WI.SelWin.PrintMainMenu(); WI.SelWin.Show(); diff --git a/Mundus/Service/Inventory.cs b/Mundus/Service/Inventory.cs index 7a45299..a94e9ec 100644 --- a/Mundus/Service/Inventory.cs +++ b/Mundus/Service/Inventory.cs @@ -90,7 +90,7 @@ namespace Mundus.Service { } public static ItemTile GetPlayerItem(string place, int index) { - return Data.Superlayers.Mobs.LMI.Player.Inventory.GetItemTile(place, index); + return Data.Superlayers.Mobs.MI.Player.Inventory.GetItemTile(place, index); } } } diff --git a/Mundus/Service/Mobs/MobFighting.cs b/Mundus/Service/Mobs/Controllers/MobFighting.cs index def8e4c..31742d1 100644 --- a/Mundus/Service/Mobs/MobFighting.cs +++ b/Mundus/Service/Mobs/Controllers/MobFighting.cs @@ -1,5 +1,5 @@ using System; -namespace Mundus.Service.Mobs { +namespace Mundus.Service.Mobs.Controllers { public class MobFighting { public MobFighting() { } diff --git a/Mundus/Service/Mobs/MobMovement.cs b/Mundus/Service/Mobs/Controllers/MobMovement.cs index c51bf1e..d906e23 100644 --- a/Mundus/Service/Mobs/MobMovement.cs +++ b/Mundus/Service/Mobs/Controllers/MobMovement.cs @@ -1,14 +1,36 @@ -using Mundus.Data;
+using System;
+using Mundus.Data;
using Mundus.Data.Superlayers.Mobs; using Mundus.Service.SuperLayers; +using Mundus.Service.Tiles; -namespace Mundus.Service.Mobs { +namespace Mundus.Service.Mobs.Controllers { public static class MobMovement {
+ private static Random rnd = new Random();
+
public static void MovePlayer(int yPos, int xPos, int size) { - ChangePosition(LMI.Player, yPos, xPos, size); + ChangePosition(MI.Player, yPos, xPos, size); + }
+
+ public static void MoveRandomlyMobsAtPlayerLayer() { + for(int y = 0; y < MapSizes.CurrSize; y++) { + for(int x = 0; x < MapSizes.CurrSize; x++) { + MobTile mob = MI.Player.CurrSuperLayer.GetMobLayerTile(y, x); + + if (mob != null) { + if (mob != MI.Player &&
+ rnd.Next(0, mob.RndMovementRate) == 1) { + int newYPos = rnd.Next(mob.YPos - 1, mob.YPos + 2); + int newXPos = rnd.Next(mob.XPos - 1, mob.XPos + 2); + + ChangePosition(mob, newYPos, newXPos, MapSizes.CurrSize); + } + } + } + } }
- public static void ChangePosition(IMob mob, int yPos, int xPos, int size) { + public static void ChangePosition(MobTile mob, int yPos, int xPos, int size) { if (InBoundaries(yPos, xPos)) { if (CanWalkAt(mob, yPos, xPos)) { ChangePosition(mob, yPos, xPos); @@ -16,7 +38,7 @@ namespace Mundus.Service.Mobs { } } - public static void ChangePosition(IMob mob, int yPos, int xPos) { + public static void ChangePosition(MobTile mob, int yPos, int xPos) { mob.CurrSuperLayer.RemoveMobFromPosition(mob.YPos, mob.XPos); if (mob.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null) { @@ -41,14 +63,14 @@ namespace Mundus.Service.Mobs { mob.YPos = yPos; mob.XPos = xPos; - mob.CurrSuperLayer.SetMobAtPosition(mob.Tile, yPos, xPos); + mob.CurrSuperLayer.SetMobAtPosition(mob, yPos, xPos); }
- private static bool CanWalkAt(IMob mob, int yPos, int xPos) {
+ private static bool CanWalkAt(MobTile mob, int yPos, int xPos) {
//Mobs can only walk on free ground (no structure on top) or walkable structures return (mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) == null || - mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos).IsWalkable) ||
- mob.CurrSuperLayer.GetMobLayerTile(yPos, xPos) != null; + mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos).IsWalkable) &&
+ mob.CurrSuperLayer.GetMobLayerTile(yPos, xPos) == null; }
private static bool InBoundaries(int yPos, int xPos) { diff --git a/Mundus/Service/Mobs/MobStatsController.cs b/Mundus/Service/Mobs/Controllers/MobStatsController.cs index 4b4af5e..df09d4b 100644 --- a/Mundus/Service/Mobs/MobStatsController.cs +++ b/Mundus/Service/Mobs/Controllers/MobStatsController.cs @@ -3,10 +3,10 @@ using Mundus.Data; using Mundus.Data.Superlayers.Mobs; using Mundus.Service.SuperLayers; -namespace Mundus.Service.Mobs { +namespace Mundus.Service.Mob.Controllers { public static class MobStatsController { public static int GetPlayerHealth() { - return LMI.Player.Health; + return MI.Player.Health; } public static string GetPlayerHearth(int index) { @@ -22,23 +22,23 @@ namespace Mundus.Service.Mobs { } public static void DamagePlayer(int healthPoints) { - LMI.Player.Health -= healthPoints; + MI.Player.Health -= healthPoints; - if (LMI.Player.Health <= 0) { + if (MI.Player.Health <= 0) { //do smth } } public static void TryHealPlayer(int healthPoints) { - LMI.Player.Health += healthPoints; + MI.Player.Health += healthPoints; - if (LMI.Player.Health > MapSizes.CurrSize / 5 * 4) { - LMI.Player.Health = MapSizes.CurrSize / 5 * 4; + if (MI.Player.Health > MapSizes.CurrSize / 5 * 4) { + MI.Player.Health = MapSizes.CurrSize / 5 * 4; } } public static string GetPlayerSuperLayerName() { - return LMI.Player.CurrSuperLayer.ToString(); + return MI.Player.CurrSuperLayer.ToString(); } /// <summary> @@ -46,7 +46,7 @@ namespace Mundus.Service.Mobs { /// </summary> /// <returns>Player.XPos</returns> public static int GetPlayerXCoord() { - return LMI.Player.XPos; + return MI.Player.XPos; } /// <summary> @@ -54,16 +54,16 @@ namespace Mundus.Service.Mobs { /// </summary> /// <returns>Player.YPos</returns> public static int GetPlayerYCoord() { - return LMI.Player.YPos; + return MI.Player.YPos; } public static bool ExistsHoleOnTopOfPlayer() { //There can't be a hole if there is nothing above layer - if (HeightController.GetLayerAboveMob(LMI.Player) == null) { + if (HeightController.GetLayerAboveMob(MI.Player) == null) { return false; } - return HeightController.GetLayerAboveMob(LMI.Player).GetGroundLayerTile(LMI.Player.YPos, LMI.Player.XPos) == null || - !HeightController.GetLayerAboveMob(LMI.Player).GetGroundLayerTile(LMI.Player.YPos, LMI.Player.XPos).Solid; + return HeightController.GetLayerAboveMob(MI.Player).GetGroundLayerTile(MI.Player.YPos, MI.Player.XPos) == null || + !HeightController.GetLayerAboveMob(MI.Player).GetGroundLayerTile(MI.Player.YPos, MI.Player.XPos).Solid; } } } diff --git a/Mundus/Service/Mobs/MobTerraforming.cs b/Mundus/Service/Mobs/Controllers/MobTerraforming.cs index 4805ab0..e83ca36 100644 --- a/Mundus/Service/Mobs/MobTerraforming.cs +++ b/Mundus/Service/Mobs/Controllers/MobTerraforming.cs @@ -5,18 +5,18 @@ using Mundus.Data.Tiles; using Mundus.Service.SuperLayers; using Mundus.Service.Tiles.Items; -namespace Mundus.Service.Mobs { +namespace Mundus.Service.Mobs.Controllers { public static class MobTerraforming {
public static void PlayerTerraformAt(int mapYPos, int mapXPos, string inventoryPlace, int inventoryIndex) { var selectedItemType = Inventory.GetPlayerItem(inventoryPlace, inventoryIndex).GetType(); if (selectedItemType == typeof(Structure) && PlayerCanBuildStructureAt(mapYPos, mapXPos)) { PlayerBuildStructureAt(mapYPos, mapXPos, inventoryPlace, inventoryIndex); - LMI.Player.Inventory.DeleteItemTile(inventoryPlace, inventoryIndex); + MI.Player.Inventory.DeleteItemTile(inventoryPlace, inventoryIndex); }
else if (selectedItemType == typeof(GroundTile) && PlayerCanPlaceGroundAt(mapYPos, mapXPos)) { PlayerPlaceGroundAt(mapYPos, mapXPos, inventoryPlace, inventoryIndex); - LMI.Player.Inventory.DeleteItemTile(inventoryPlace, inventoryIndex); + MI.Player.Inventory.DeleteItemTile(inventoryPlace, inventoryIndex); } else if (selectedItemType == typeof(Tool) && PlayerCanDestroyAt(mapYPos, mapXPos)) { PlayerDestroyAt(mapYPos, mapXPos, inventoryPlace, inventoryIndex); @@ -25,45 +25,45 @@ namespace Mundus.Service.Mobs { private static bool PlayerCanDestroyAt(int yPos, int xPos) {
- return LMI.Player.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) != null ||
- LMI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) != null;
+ return MI.Player.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) != null ||
+ MI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) != null;
}
private static void PlayerDestroyAt(int mapYPos, int mapXPos, string place, int index) {
- var selectedTool = (Tool)LMI.Player.Inventory.GetItemTile(place, index); + var selectedTool = (Tool)MI.Player.Inventory.GetItemTile(place, index); //Only shovels can destroy ground layer tiles, but not when there is something over the ground tile - if (selectedTool.Type == ToolTypes.Shovel && LMI.Player.CurrSuperLayer.GetStructureLayerTile(mapYPos, mapXPos) == null) { + if (selectedTool.Type == ToolTypes.Shovel && MI.Player.CurrSuperLayer.GetStructureLayerTile(mapYPos, mapXPos) == null) { PlayerTryDestroyGroundAt(mapYPos, mapXPos, selectedTool); } - else if (LMI.Player.CurrSuperLayer.GetStructureLayerTile(mapYPos, mapXPos) != null) { + else if (MI.Player.CurrSuperLayer.GetStructureLayerTile(mapYPos, mapXPos) != null) { PlayerTryDestroyStructureAt(mapYPos, mapXPos, selectedTool); } }
private static void PlayerTryDestroyGroundAt(int mapYPos, int mapXPos, Tool shovel) { - var selectedGround = LMI.Player.CurrSuperLayer.GetGroundLayerTile(mapYPos, mapXPos); + var selectedGround = MI.Player.CurrSuperLayer.GetGroundLayerTile(mapYPos, mapXPos); // Grdound tiles that shoud be unbreakable have negative required shovel class if (selectedGround.ReqShovelClass <= shovel.Class && selectedGround.ReqShovelClass >= 0) { - LMI.Player.CurrSuperLayer.SetGroundAtPosition(null, mapYPos, mapXPos); + MI.Player.CurrSuperLayer.SetGroundAtPosition(null, mapYPos, mapXPos); //When a shovel destroys ground tile, it destroys the structure below (if it is not walkable) - ISuperLayer under = HeightController.GetLayerUnderneathMob(LMI.Player); + ISuperLayer under = HeightController.GetLayerUnderneathMob(MI.Player); if (under != null && under.GetStructureLayerTile(mapYPos, mapXPos) != null) { if (!under.GetStructureLayerTile(mapYPos, mapXPos).IsWalkable) { under.RemoveStructureFromPosition(mapYPos, mapXPos); } } - if (LMI.Player.Inventory.Items.Contains(null)) { - LMI.Player.Inventory.AppendToItems(new GroundTile(selectedGround)); + if (MI.Player.Inventory.Items.Contains(null)) { + MI.Player.Inventory.AppendToItems(new GroundTile(selectedGround)); } } }
private static void PlayerTryDestroyStructureAt(int mapYPos, int mapXPos, Tool tool) { - var selStructure = LMI.Player.CurrSuperLayer.GetStructureLayerTile(mapYPos, mapXPos); + var selStructure = MI.Player.CurrSuperLayer.GetStructureLayerTile(mapYPos, mapXPos); if (selStructure.ReqToolType == tool.Type && selStructure.ReqToolClass <= tool.Class) { int damagePoints = 1 + (tool.Class - selStructure.ReqToolClass); @@ -73,50 +73,50 @@ namespace Mundus.Service.Mobs { if (selStructure.GetDrop() != selStructure) {
// The amount of dropped items it adds to inventory is that of the damage points.
// If the structure will "die" (health <= 0) before giving all items, it stops giving items. - for (int i = 0; i < damagePoints && i < selStructure.Health && LMI.Player.Inventory.Items.Contains(null); i++) { - LMI.Player.Inventory.AppendToItems(new Material((Material)selStructure.GetDrop())); + for (int i = 0; i < damagePoints && i < selStructure.Health && MI.Player.Inventory.Items.Contains(null); i++) { + MI.Player.Inventory.AppendToItems(new Material((Material)selStructure.GetDrop())); } } - else if (LMI.Player.Inventory.Items.Contains(null)) { - LMI.Player.Inventory.AppendToItems((Structure)selStructure.GetDrop()); + else if (MI.Player.Inventory.Items.Contains(null)) { + MI.Player.Inventory.AppendToItems((Structure)selStructure.GetDrop()); } // Damage to the structure is done after adding the dropped item/items. if (!selStructure.Damage(damagePoints)) { - LMI.Player.CurrSuperLayer.SetStructureAtPosition(null, mapYPos, mapXPos); + MI.Player.CurrSuperLayer.SetStructureAtPosition(null, mapYPos, mapXPos); } } }
private static bool PlayerCanPlaceGroundAt(int yPos, int xPos) { - return LMI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null &&
- LMI.Player.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) == null; + return MI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null &&
+ MI.Player.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) == null; }
private static void PlayerPlaceGroundAt(int yPos, int xPos, string inventoryPlace, int inventoryIndex) { - GroundTile toPlace = (GroundTile)LMI.Player.Inventory.GetItemTile(inventoryPlace, inventoryIndex);
+ GroundTile toPlace = (GroundTile)MI.Player.Inventory.GetItemTile(inventoryPlace, inventoryIndex);
- LMI.Player.CurrSuperLayer.SetGroundAtPosition(toPlace, yPos, xPos); + MI.Player.CurrSuperLayer.SetGroundAtPosition(toPlace, yPos, xPos); }
private static bool PlayerCanBuildStructureAt(int yPos, int xPos) {
- return LMI.Player.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) == null;
+ return MI.Player.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) == null;
}
private static void PlayerBuildStructureAt(int yPos, int xPos, string inventoryPlace, int inventoryIndex) { - Structure toBuild = (Structure)LMI.Player.Inventory.GetItemTile(inventoryPlace, inventoryIndex); + Structure toBuild = (Structure)MI.Player.Inventory.GetItemTile(inventoryPlace, inventoryIndex); // Climable structures will be placed under a hole (if they can be).
// Non climable structures won't be placed anywhere if there is a hole.
- if (toBuild.IsClimable && LMI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null &&
- HeightController.GetLayerUnderneathMob(LMI.Player).GetStructureLayerTile(yPos, xPos) == null)
+ if (toBuild.IsClimable && MI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null &&
+ HeightController.GetLayerUnderneathMob(MI.Player).GetStructureLayerTile(yPos, xPos) == null)
{
- HeightController.GetLayerUnderneathMob(LMI.Player).SetStructureAtPosition(toBuild, yPos, xPos);
+ HeightController.GetLayerUnderneathMob(MI.Player).SetStructureAtPosition(toBuild, yPos, xPos);
}
- else if (LMI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) != null) { - LMI.Player.CurrSuperLayer.SetStructureAtPosition(toBuild, yPos, xPos);
+ else if (MI.Player.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) != null) { + MI.Player.CurrSuperLayer.SetStructureAtPosition(toBuild, yPos, xPos);
}
} } diff --git a/Mundus/Service/Mobs/IMob.cs b/Mundus/Service/Mobs/IMob.cs deleted file mode 100644 index 9af9cb5..0000000 --- a/Mundus/Service/Mobs/IMob.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Mundus.Data.SuperLayers;
-using Mundus.Service.Tiles; - -namespace Mundus.Service.Mobs { - public interface IMob { - MobTile Tile { get; } - ISuperLayer CurrSuperLayer { get; set; } - int XPos { get; set; } - int YPos { get; set; }
- int Health { get; set; } - } -} diff --git a/Mundus/Service/Mobs/LandMobs/LandMobsPresets.cs b/Mundus/Service/Mobs/LandMobs/LandMobsPresets.cs new file mode 100644 index 0000000..7d3f2a8 --- /dev/null +++ b/Mundus/Service/Mobs/LandMobs/LandMobsPresets.cs @@ -0,0 +1,11 @@ +using System; +using Mundus.Data.SuperLayers; +using Mundus.Service.Tiles; + +namespace Mundus.Service.Mobs.LandMobs { + public static class LandMobsPresets { + public static MobTile GetACow() { + return new MobTile("L_test_icon_mob", 10, LI.Land); + } + } +} diff --git a/Mundus/Service/Mobs/LandMobs/Player.cs b/Mundus/Service/Mobs/LandMobs/Player.cs index 280a12f..c590332 100644 --- a/Mundus/Service/Mobs/LandMobs/Player.cs +++ b/Mundus/Service/Mobs/LandMobs/Player.cs @@ -1,22 +1,14 @@ using Mundus.Data.SuperLayers;
using Mundus.Service.Tiles; +using Mundus.Service.Tiles.Items; namespace Mundus.Service.Mobs.LandMobs { - public class Player : IMob { - public MobTile Tile { get; private set; } - public ISuperLayer CurrSuperLayer { get; set; } - public int YPos { get; set; } - public int XPos { get; set; } - public Inventory Inventory { get; set; } - public int Health { get; set; } + public class Player : MobTile { + public Inventory Inventory { get; set; }
- public Player(string stock_id, int health, int inventorySize) : this(new MobTile(stock_id), health, inventorySize) - { } - - public Player(MobTile tile, int health, int inventorySize) { - this.Tile = tile; - this.Inventory = new Inventory(inventorySize);
- this.Health = health; + public Player(string stock_id, int health, int inventorySize, ISuperLayer currentSuperLayer) : base(stock_id, health, currentSuperLayer) + {
+ this.Inventory = new Inventory(inventorySize); } } } diff --git a/Mundus/Service/Mobs/MobTile.cs b/Mundus/Service/Mobs/MobTile.cs new file mode 100644 index 0000000..7384a85 --- /dev/null +++ b/Mundus/Service/Mobs/MobTile.cs @@ -0,0 +1,34 @@ +using System;
+using Gtk; +using Mundus.Data.SuperLayers; +using Mundus.Service.Mobs; +using Mundus.Service.Mobs.Controllers; +using Mundus.Service.Tiles.Items; + +namespace Mundus.Service.Tiles { + public class MobTile : ITile { + public string stock_id { get; private set; } + public Image Texture { get; private set; } + + public ISuperLayer CurrSuperLayer { get; set; } + public int YPos { get; set; } + public int XPos { get; set; } + public int Health { get; set; } + public Material DroppedUponDeath { get; private set; }
+
+ /// <summary>
+ /// Specifies how big the chance of a mob moving (randomly) is. lower value means higher chance for movement.
+ /// </summary>
+ /// <value>The random movement limiter.</value>
+ public int RndMovementRate { get; private set; } + + public MobTile(string stock_id, int health, ISuperLayer currentSuperLayer, int rndMovementQualifier = 3, Material droppedUponDeath = null) { + this.stock_id = stock_id; + this.Texture = new Image(stock_id, IconSize.Dnd); + this.Health = health;
+ this.CurrSuperLayer = currentSuperLayer;
+ this.RndMovementRate = rndMovementQualifier; + this.DroppedUponDeath = droppedUponDeath; + } + } +} diff --git a/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs b/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs index 1788fe8..d34bd9a 100644 --- a/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs +++ b/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs @@ -1,6 +1,7 @@ using System; using Mundus.Data.Superlayers.Mobs; using Mundus.Data.SuperLayers; +using Mundus.Service.Mobs.LandMobs; using Mundus.Service.Tiles; using Mundus.Service.Tiles.ItemPresets; using Mundus.Service.Tiles.Items; @@ -10,21 +11,29 @@ namespace Mundus.Service.SuperLayers.Generators { private static Random rnd; public static void GenerateAllLayers(int size) { - LI.Land.SetMobLayer(GenerateMobLayer(size)); LI.Land.SetGroundLayer(GenerateGroundLayer(size)); LI.Land.SetStructureLayer(GenerateStructureLayer(size)); + LI.Land.SetMobLayer(GenerateMobLayer(size)); } private static MobTile[,] GenerateMobLayer(int size) { MobTile[,] tiles = new MobTile[size, size]; - for (int col = 0; col < size; col++) { - for (int row = 0; row < size; row++) { - if (col == size / 2 && row == size / 2) { - LMI.Player.YPos = row; - LMI.Player.XPos = col; - LMI.Player.CurrSuperLayer = LI.Land; - tiles[col, row] = LMI.Player.Tile; + for (int y = 0; y < size; y++) { + for (int x = 0; x < size; x++) { + if (LI.Land.GetGroundLayerTile(y, x) != null && + LI.Land.GetStructureLayerTile(y, x) == null) + { + if (y == size / 2 && x == size / 2) { + MI.Player.YPos = x; + MI.Player.XPos = y; + tiles[y, x] = MI.Player; + } + else if (rnd.Next(0, 20) == 1) { + tiles[y, x] = LandMobsPresets.GetACow(); + tiles[y, x].YPos = y; + tiles[y, x].XPos = x; + } } } } diff --git a/Mundus/Service/SuperLayers/HeightController.cs b/Mundus/Service/SuperLayers/HeightController.cs index 9d216f5..5788654 100644 --- a/Mundus/Service/SuperLayers/HeightController.cs +++ b/Mundus/Service/SuperLayers/HeightController.cs @@ -1,6 +1,7 @@ using System; using Mundus.Data.SuperLayers; using Mundus.Service.Mobs; +using Mundus.Service.Tiles; namespace Mundus.Service.SuperLayers { public static class HeightController { @@ -18,7 +19,7 @@ namespace Mundus.Service.SuperLayers { return null; } - public static ISuperLayer GetLayerUnderneathMob(IMob currentMob) { + public static ISuperLayer GetLayerUnderneathMob(MobTile currentMob) { return GetLayerUnderneath(currentMob.CurrSuperLayer); } @@ -32,7 +33,7 @@ namespace Mundus.Service.SuperLayers { return null; } - public static ISuperLayer GetLayerAboveMob(IMob currentMob) { + public static ISuperLayer GetLayerAboveMob(MobTile currentMob) { return GetLayerAbove(currentMob.CurrSuperLayer); } } diff --git a/Mundus/Service/SuperLayers/ImageController.cs b/Mundus/Service/SuperLayers/ImageController.cs index b939291..2912e41 100644 --- a/Mundus/Service/SuperLayers/ImageController.cs +++ b/Mundus/Service/SuperLayers/ImageController.cs @@ -9,7 +9,7 @@ namespace Mundus.Service.SuperLayers { //Set the image to be either the ground layer tile, "blank" icon, item layer tile, mob layer tile or don't set it to anything //Note: first the ground and the blank icons are printed, then over them are printed the item tiles and over them are mob tiles public static Image GetScreenImage(int row, int col, int layer) { - ISuperLayer superLayer = LMI.Player.CurrSuperLayer; + ISuperLayer superLayer = MI.Player.CurrSuperLayer; Image img = null; //Layer 0 is GroundLayer, 1 is ItemLayer and 2 is Moblayer @@ -32,18 +32,18 @@ namespace Mundus.Service.SuperLayers { public static Image GetGroundImage(int row, int col) { - ISuperLayer superLayer = LMI.Player.CurrSuperLayer; + ISuperLayer superLayer = MI.Player.CurrSuperLayer; Image img = new Image("L_hole", IconSize.Dnd); if (row >= 0 && col >= 0 && col < MapSizes.CurrSize && row < MapSizes.CurrSize && - superLayer.GetGroundLayerTile( row, col ) != null) { + superLayer.GetGroundLayerTile(row, col) != null) { img = superLayer.GetGroundLayerTile( row, col ).Texture; } return img; } public static Image GetStructureImage(int row, int col) { - ISuperLayer superLayer = LMI.Player.CurrSuperLayer; + ISuperLayer superLayer = MI.Player.CurrSuperLayer; Image img = new Image("blank", IconSize.Dnd ); if (IsInsideBoundaries(row, col) && @@ -61,16 +61,16 @@ namespace Mundus.Service.SuperLayers { public static Image GetHotbarImage(int index) { Image img = new Image("blank", IconSize.Dnd); - if (index < LMI.Player.Inventory.Hotbar.Length) { - if (LMI.Player.Inventory.Hotbar[index] != null) { + if (index < MI.Player.Inventory.Hotbar.Length) { + if (MI.Player.Inventory.Hotbar[index] != null) { // Structures have two icons, one when they are placed and one as an inventory item. // All other item types have only one icon (texture). - if (LMI.Player.Inventory.Hotbar[index].GetType() == typeof(Structure)) { - Structure tmp = (Structure)LMI.Player.Inventory.Hotbar[index]; + if (MI.Player.Inventory.Hotbar[index].GetType() == typeof(Structure)) { + Structure tmp = (Structure)MI.Player.Inventory.Hotbar[index]; img = new Image(tmp.inventory_stock_id, IconSize.Dnd); } else { - img = LMI.Player.Inventory.Hotbar[index].Texture; + img = MI.Player.Inventory.Hotbar[index].Texture; } } } @@ -80,16 +80,16 @@ namespace Mundus.Service.SuperLayers { public static Image GetInventoryItemImage(int index) { Image img = new Image("blank", IconSize.Dnd); - if (index < LMI.Player.Inventory.Items.Length) { - if (LMI.Player.Inventory.Items[index] != null) { + if (index < MI.Player.Inventory.Items.Length) { + if (MI.Player.Inventory.Items[index] != null) { // Structures have two icons, one when they are placed and one as an inventory item. // All other item types have only one icon (texture). - if (LMI.Player.Inventory.Items[index].GetType() == typeof(Structure)) { - Structure tmp = (Structure)LMI.Player.Inventory.Items[index]; + if (MI.Player.Inventory.Items[index].GetType() == typeof(Structure)) { + Structure tmp = (Structure)MI.Player.Inventory.Items[index]; img = new Image(tmp.inventory_stock_id, IconSize.Dnd); } else { - img = LMI.Player.Inventory.Items[index].Texture; + img = MI.Player.Inventory.Items[index].Texture; } } } @@ -99,9 +99,9 @@ namespace Mundus.Service.SuperLayers { public static Image GetAccessoryImage(int index) { Image img = new Image("blank_gear", IconSize.Dnd); - if (index < LMI.Player.Inventory.Accessories.Length) { - if (LMI.Player.Inventory.Accessories[index] != null) { - img = LMI.Player.Inventory.Accessories[index].Texture; + if (index < MI.Player.Inventory.Accessories.Length) { + if (MI.Player.Inventory.Accessories[index] != null) { + img = MI.Player.Inventory.Accessories[index].Texture; } } return img; @@ -110,9 +110,9 @@ namespace Mundus.Service.SuperLayers { public static Image GetGearImage(int index) { Image img = new Image("blank_gear", IconSize.Dnd); - if (index < LMI.Player.Inventory.Gear.Length) { - if (LMI.Player.Inventory.Gear[index] != null) { - img = LMI.Player.Inventory.Gear[index].Texture; + if (index < MI.Player.Inventory.Gear.Length) { + if (MI.Player.Inventory.Gear[index] != null) { + img = MI.Player.Inventory.Gear[index].Texture; } } return img; diff --git a/Mundus/Service/SwitchItems.cs b/Mundus/Service/SwitchItems.cs index 1efa01b..e1f5b64 100644 --- a/Mundus/Service/SwitchItems.cs +++ b/Mundus/Service/SwitchItems.cs @@ -12,10 +12,10 @@ namespace Mundus.Service { ItemTile[] newOrigin = null;
switch (originName.ToLower()) {
- case "hotbar": newOrigin = LMI.Player.Inventory.Hotbar; break;
- case "items": newOrigin = LMI.Player.Inventory.Items; break;
- case "accessories": newOrigin = LMI.Player.Inventory.Accessories; break;
- case "gear": newOrigin = LMI.Player.Inventory.Gear; break;
+ case "hotbar": newOrigin = MI.Player.Inventory.Hotbar; break;
+ case "items": newOrigin = MI.Player.Inventory.Items; break;
+ case "accessories": newOrigin = MI.Player.Inventory.Accessories; break;
+ case "gear": newOrigin = MI.Player.Inventory.Gear; break;
}
SetOrigin(newOrigin, originIndex);
}
@@ -30,10 +30,10 @@ namespace Mundus.Service { ItemTile[] destinationLocation = null;
switch (destination.ToLower()) {
- case "hotbar": destinationLocation = LMI.Player.Inventory.Hotbar; break;
- case "items": destinationLocation = LMI.Player.Inventory.Items; break;
- case "accessories": destinationLocation = LMI.Player.Inventory.Accessories; break;
- case "gear": destinationLocation = LMI.Player.Inventory.Gear; break;
+ case "hotbar": destinationLocation = MI.Player.Inventory.Hotbar; break;
+ case "items": destinationLocation = MI.Player.Inventory.Items; break;
+ case "accessories": destinationLocation = MI.Player.Inventory.Accessories; break;
+ case "gear": destinationLocation = MI.Player.Inventory.Gear; break;
}
var toTransfer = origin[oIndex];
diff --git a/Mundus/Service/Tiles/MobTile.cs b/Mundus/Service/Tiles/MobTile.cs deleted file mode 100644 index bb072d8..0000000 --- a/Mundus/Service/Tiles/MobTile.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Gtk; - -namespace Mundus.Service.Tiles { - public class MobTile : ITile { - public string stock_id { get; private set; } - public Image Texture { get; private set; } - - public MobTile(string stock_id) { - this.stock_id = stock_id; - this.Texture = new Image(stock_id, IconSize.Dnd); - } - } -} diff --git a/Mundus/Views/Windows/PauseWindow.cs b/Mundus/Views/Windows/PauseWindow.cs index 942bbdc..7cd5bf9 100644 --- a/Mundus/Views/Windows/PauseWindow.cs +++ b/Mundus/Views/Windows/PauseWindow.cs @@ -11,13 +11,9 @@ namespace Mundus.Views.Windows { } protected void OnDeleteEvent(object o, Gtk.DeleteEventArgs args) { - this.OnBtnBackClicked(this, null); - args.RetVal = true; - } - - protected void OnBtnBackClicked(object sender, EventArgs e) { WindowController.PauseWindowVisible = false; this.Hide(); + args.RetVal = true; } protected void OnBtnSettingsClicked(object sender, EventArgs e) { diff --git a/Mundus/Views/Windows/SettingsWindow.cs b/Mundus/Views/Windows/SettingsWindow.cs index 3877845..84b1b37 100644 --- a/Mundus/Views/Windows/SettingsWindow.cs +++ b/Mundus/Views/Windows/SettingsWindow.cs @@ -12,7 +12,8 @@ namespace Mundus.Views.Windows { private void OnDeleteEvent(object sender, DeleteEventArgs a) { //Return to the sender window (and dont destroy the settings window instance) - this.OnBtnBackClicked(this, null); + this.Hide(); + Sender.Show(); a.RetVal = true; } @@ -20,10 +21,5 @@ namespace Mundus.Views.Windows { this.Show(); this.Sender = sender; } - - private void OnBtnBackClicked(object sender, EventArgs e) { - this.Hide(); - Sender.Show(); - } } } diff --git a/Mundus/Views/Windows/SmallGameWindow.cs b/Mundus/Views/Windows/SmallGameWindow.cs index a63bfb4..a5eebd8 100644 --- a/Mundus/Views/Windows/SmallGameWindow.cs +++ b/Mundus/Views/Windows/SmallGameWindow.cs @@ -1,7 +1,9 @@ using System; using Gtk; using Mundus.Service; +using Mundus.Service.Mob.Controllers; using Mundus.Service.Mobs; +using Mundus.Service.Mobs.Controllers; using Mundus.Service.SuperLayers; using Mundus.Service.Tiles.Items; @@ -578,6 +580,7 @@ namespace Mundus.Views.Windows { if (!HasSelection()) { MobMovement.MovePlayer(mapYPos, mapXPos, Size); + MobMovement.MoveRandomlyMobsAtPlayerLayer(); } else { if (Inventory.GetPlayerItem(selPlace, selIndex) != null) { diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs index c7cf374..1e61604 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs @@ -8,6 +8,8 @@ namespace Mundus.Views.Windows private global::Gtk.Label lblTitle; + private global::Gtk.Label lblBuild; + private global::Gtk.HSeparator hSeparator; private global::Gtk.Button btnLoadGame; @@ -41,14 +43,26 @@ namespace Mundus.Views.Windows global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.lblTitle])); w1.Position = 0; // Container child vboxUI.Gtk.Box+BoxChild + this.lblBuild = new global::Gtk.Label(); + this.lblBuild.WidthRequest = 300; + this.lblBuild.HeightRequest = 20; + this.lblBuild.Name = "lblBuild"; + this.lblBuild.LabelProp = "Build 16-04-2020 No1"; + this.lblBuild.Justify = ((global::Gtk.Justification)(2)); + this.vboxUI.Add(this.lblBuild); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.lblBuild])); + w2.Position = 1; + w2.Expand = false; + w2.Fill = false; + // Container child vboxUI.Gtk.Box+BoxChild this.hSeparator = new global::Gtk.HSeparator(); this.hSeparator.HeightRequest = 5; this.hSeparator.Name = "hSeparator"; this.vboxUI.Add(this.hSeparator); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.hSeparator])); - w2.Position = 1; - w2.Expand = false; - w2.Fill = false; + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.hSeparator])); + w3.Position = 2; + w3.Expand = false; + w3.Fill = false; // Container child vboxUI.Gtk.Box+BoxChild this.btnLoadGame = new global::Gtk.Button(); this.btnLoadGame.WidthRequest = 300; @@ -60,8 +74,8 @@ namespace Mundus.Views.Windows this.btnLoadGame.BorderWidth = ((uint)(7)); this.btnLoadGame.Label = "Load Game"; this.vboxUI.Add(this.btnLoadGame); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnLoadGame])); - w3.Position = 2; + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnLoadGame])); + w4.Position = 3; // Container child vboxUI.Gtk.Box+BoxChild this.btnNewGame = new global::Gtk.Button(); this.btnNewGame.WidthRequest = 300; @@ -72,8 +86,8 @@ namespace Mundus.Views.Windows this.btnNewGame.BorderWidth = ((uint)(7)); this.btnNewGame.Label = "New Game"; this.vboxUI.Add(this.btnNewGame); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnNewGame])); - w4.Position = 3; + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnNewGame])); + w5.Position = 4; // Container child vboxUI.Gtk.Box+BoxChild this.btnTutorial = new global::Gtk.Button(); this.btnTutorial.WidthRequest = 300; @@ -84,10 +98,10 @@ namespace Mundus.Views.Windows this.btnTutorial.BorderWidth = ((uint)(7)); this.btnTutorial.Label = "Tutorial"; this.vboxUI.Add(this.btnTutorial); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnTutorial])); - w5.Position = 4; - w5.Expand = false; - w5.Fill = false; + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnTutorial])); + w6.Position = 5; + w6.Expand = false; + w6.Fill = false; // Container child vboxUI.Gtk.Box+BoxChild this.btnSettings = new global::Gtk.Button(); this.btnSettings.WidthRequest = 300; @@ -98,17 +112,17 @@ namespace Mundus.Views.Windows this.btnSettings.BorderWidth = ((uint)(7)); this.btnSettings.Label = "Settings"; this.vboxUI.Add(this.btnSettings); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnSettings])); - w6.Position = 5; - w6.Expand = false; - w6.Fill = false; + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vboxUI[this.btnSettings])); + w7.Position = 6; + w7.Expand = false; + w7.Fill = false; this.Add(this.vboxUI); if ((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 300; - this.DefaultHeight = 465; + this.DefaultHeight = 485; this.Show(); this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); this.btnNewGame.Clicked += new global::System.EventHandler(this.OnBtnNewGameClicked); diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs index f9b728b..5faf09a 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs @@ -8,10 +8,10 @@ namespace Mundus.Views.Windows private global::Gtk.HBox hbox1; - private global::Gtk.Button btnBack; - private global::Gtk.Label lblTitle; + private global::Gtk.Label lblBuild; + private global::Gtk.HSeparator hSeparator; private global::Gtk.Button btnSettings; @@ -40,32 +40,30 @@ namespace Mundus.Views.Windows this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 2; // Container child hbox1.Gtk.Box+BoxChild - this.btnBack = new global::Gtk.Button(); - this.btnBack.WidthRequest = 50; - this.btnBack.HeightRequest = 50; - this.btnBack.CanFocus = true; - this.btnBack.Name = "btnBack"; - this.btnBack.UseUnderline = true; - this.btnBack.Label = "Back"; - this.hbox1.Add(this.btnBack); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnBack])); - w1.Position = 0; - w1.Expand = false; - w1.Fill = false; - // Container child hbox1.Gtk.Box+BoxChild this.lblTitle = new global::Gtk.Label(); + this.lblTitle.HeightRequest = 50; this.lblTitle.Name = "lblTitle"; this.lblTitle.LabelProp = "Pause menu"; this.lblTitle.Justify = ((global::Gtk.Justification)(2)); this.hbox1.Add(this.lblTitle); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lblTitle])); - w2.Position = 1; + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lblTitle])); + w1.Position = 0; + w1.Padding = ((uint)(3)); + this.vbox1.Add(this.hbox1); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); + w2.Position = 0; w2.Expand = false; w2.Fill = false; - w2.Padding = ((uint)(3)); - this.vbox1.Add(this.hbox1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); - w3.Position = 0; + // Container child vbox1.Gtk.Box+BoxChild + this.lblBuild = new global::Gtk.Label(); + this.lblBuild.WidthRequest = 300; + this.lblBuild.HeightRequest = 20; + this.lblBuild.Name = "lblBuild"; + this.lblBuild.LabelProp = "Build 16-04-2020 No1"; + this.lblBuild.Justify = ((global::Gtk.Justification)(2)); + this.vbox1.Add(this.lblBuild); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.lblBuild])); + w3.Position = 1; w3.Expand = false; w3.Fill = false; // Container child vbox1.Gtk.Box+BoxChild @@ -74,7 +72,7 @@ namespace Mundus.Views.Windows this.hSeparator.Name = "hSeparator"; this.vbox1.Add(this.hSeparator); global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hSeparator])); - w4.Position = 1; + w4.Position = 2; w4.Expand = false; w4.Fill = false; // Container child vbox1.Gtk.Box+BoxChild @@ -87,7 +85,7 @@ namespace Mundus.Views.Windows this.btnSettings.Label = "Settings"; this.vbox1.Add(this.btnSettings); global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.btnSettings])); - w5.Position = 2; + w5.Position = 3; w5.Expand = false; w5.Fill = false; // Container child vbox1.Gtk.Box+BoxChild @@ -100,7 +98,7 @@ namespace Mundus.Views.Windows this.btnSave.Label = "Save"; this.vbox1.Add(this.btnSave); global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.btnSave])); - w6.Position = 3; + w6.Position = 4; w6.Expand = false; w6.Fill = false; // Container child vbox1.Gtk.Box+BoxChild @@ -113,7 +111,7 @@ namespace Mundus.Views.Windows this.btnSaveExit.Label = "Save & Exit"; this.vbox1.Add(this.btnSaveExit); global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.btnSaveExit])); - w7.Position = 4; + w7.Position = 5; w7.Expand = false; w7.Fill = false; // Container child vbox1.Gtk.Box+BoxChild @@ -126,7 +124,7 @@ namespace Mundus.Views.Windows this.btnExit.Label = "Exit"; this.vbox1.Add(this.btnExit); global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.btnExit])); - w8.Position = 5; + w8.Position = 6; w8.Expand = false; w8.Fill = false; this.Add(this.vbox1); @@ -134,11 +132,10 @@ namespace Mundus.Views.Windows { this.Child.ShowAll(); } - this.DefaultWidth = 191; - this.DefaultHeight = 285; + this.DefaultWidth = 300; + this.DefaultHeight = 311; this.Show(); this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); - this.btnBack.Clicked += new global::System.EventHandler(this.OnBtnBackClicked); this.btnSettings.Clicked += new global::System.EventHandler(this.OnBtnSettingsClicked); this.btnSave.Clicked += new global::System.EventHandler(this.OnBtnSaveClicked); this.btnSaveExit.Clicked += new global::System.EventHandler(this.OnBtnSaveExitClicked); diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs index 8aa5bd5..94e0260 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs @@ -6,14 +6,10 @@ namespace Mundus.Views.Windows { private global::Gtk.Table tbUI; - private global::Gtk.Button btnBack; - private global::Gtk.HSeparator hSeparator; private global::Gtk.Label lblBlank1; - private global::Gtk.Label lblBlank2; - private global::Gtk.Label lblBlank3; private global::Gtk.Label lblBlank4; @@ -32,107 +28,80 @@ namespace Mundus.Views.Windows this.Resizable = false; this.AllowGrow = false; // Container child Mundus.Views.Windows.SettingsWindow.Gtk.Container+ContainerChild - this.tbUI = new global::Gtk.Table(((uint)(4)), ((uint)(7)), false); + this.tbUI = new global::Gtk.Table(((uint)(4)), ((uint)(6)), false); this.tbUI.Name = "tbUI"; this.tbUI.RowSpacing = ((uint)(3)); this.tbUI.ColumnSpacing = ((uint)(3)); // Container child tbUI.Gtk.Table+TableChild - this.btnBack = new global::Gtk.Button(); - this.btnBack.WidthRequest = 50; - this.btnBack.HeightRequest = 50; - this.btnBack.CanFocus = true; - this.btnBack.Name = "btnBack"; - this.btnBack.UseUnderline = true; - this.btnBack.BorderWidth = ((uint)(3)); - this.btnBack.Label = "Back"; - this.tbUI.Add(this.btnBack); - global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.tbUI[this.btnBack])); - w1.LeftAttach = ((uint)(1)); - w1.RightAttach = ((uint)(2)); - w1.XOptions = ((global::Gtk.AttachOptions)(0)); - w1.YOptions = ((global::Gtk.AttachOptions)(0)); - // Container child tbUI.Gtk.Table+TableChild this.hSeparator = new global::Gtk.HSeparator(); this.hSeparator.HeightRequest = 5; this.hSeparator.Name = "hSeparator"; this.tbUI.Add(this.hSeparator); - global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.tbUI[this.hSeparator])); - w2.TopAttach = ((uint)(1)); - w2.BottomAttach = ((uint)(2)); - w2.LeftAttach = ((uint)(1)); - w2.RightAttach = ((uint)(6)); - w2.XOptions = ((global::Gtk.AttachOptions)(4)); - w2.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.tbUI[this.hSeparator])); + w1.TopAttach = ((uint)(1)); + w1.BottomAttach = ((uint)(2)); + w1.LeftAttach = ((uint)(1)); + w1.RightAttach = ((uint)(5)); + w1.XOptions = ((global::Gtk.AttachOptions)(4)); + w1.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblBlank1 = new global::Gtk.Label(); this.lblBlank1.WidthRequest = 40; this.lblBlank1.Name = "lblBlank1"; this.tbUI.Add(this.lblBlank1); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank1])); - w3.LeftAttach = ((uint)(2)); - w3.RightAttach = ((uint)(3)); - w3.XOptions = ((global::Gtk.AttachOptions)(4)); - w3.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child tbUI.Gtk.Table+TableChild - this.lblBlank2 = new global::Gtk.Label(); - this.lblBlank2.WidthRequest = 40; - this.lblBlank2.Name = "lblBlank2"; - this.tbUI.Add(this.lblBlank2); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank2])); - w4.LeftAttach = ((uint)(4)); - w4.RightAttach = ((uint)(5)); - w4.XOptions = ((global::Gtk.AttachOptions)(4)); - w4.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank1])); + w2.LeftAttach = ((uint)(1)); + w2.RightAttach = ((uint)(2)); + w2.XOptions = ((global::Gtk.AttachOptions)(4)); + w2.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblBlank3 = new global::Gtk.Label(); this.lblBlank3.WidthRequest = 40; this.lblBlank3.Name = "lblBlank3"; this.tbUI.Add(this.lblBlank3); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank3])); - w5.LeftAttach = ((uint)(5)); - w5.RightAttach = ((uint)(6)); - w5.XOptions = ((global::Gtk.AttachOptions)(4)); - w5.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank3])); + w3.LeftAttach = ((uint)(4)); + w3.RightAttach = ((uint)(5)); + w3.XOptions = ((global::Gtk.AttachOptions)(4)); + w3.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblBlank4 = new global::Gtk.Label(); this.lblBlank4.WidthRequest = 5; this.lblBlank4.HeightRequest = 50; this.lblBlank4.Name = "lblBlank4"; this.tbUI.Add(this.lblBlank4); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank4])); - w6.XOptions = ((global::Gtk.AttachOptions)(4)); - w6.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank4])); + w4.XOptions = ((global::Gtk.AttachOptions)(4)); + w4.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblBlank5 = new global::Gtk.Label(); this.lblBlank5.WidthRequest = 5; this.lblBlank5.HeightRequest = 50; this.lblBlank5.Name = "lblBlank5"; this.tbUI.Add(this.lblBlank5); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank5])); - w7.LeftAttach = ((uint)(6)); - w7.RightAttach = ((uint)(7)); - w7.XOptions = ((global::Gtk.AttachOptions)(4)); - w7.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank5])); + w5.LeftAttach = ((uint)(5)); + w5.RightAttach = ((uint)(6)); + w5.XOptions = ((global::Gtk.AttachOptions)(4)); + w5.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblTitle = new global::Gtk.Label(); this.lblTitle.Name = "lblTitle"; this.lblTitle.LabelProp = "Settings (replace with picture)"; this.tbUI.Add(this.lblTitle); - global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblTitle])); - w8.LeftAttach = ((uint)(3)); - w8.RightAttach = ((uint)(4)); - w8.XOptions = ((global::Gtk.AttachOptions)(4)); - w8.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblTitle])); + w6.LeftAttach = ((uint)(2)); + w6.RightAttach = ((uint)(4)); + w6.YOptions = ((global::Gtk.AttachOptions)(4)); this.Add(this.tbUI); if ((this.Child != null)) { this.Child.ShowAll(); } - this.DefaultWidth = 386; + this.DefaultWidth = 333; this.DefaultHeight = 300; this.Show(); this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); - this.btnBack.Clicked += new global::System.EventHandler(this.OnBtnBackClicked); } } } diff --git a/Mundus/gtk-gui/generated.cs b/Mundus/gtk-gui/generated.cs index ba06be5..61d0d0f 100644 --- a/Mundus/gtk-gui/generated.cs +++ b/Mundus/gtk-gui/generated.cs @@ -72,6 +72,8 @@ namespace Stetic w1.Add("U_stone", w30); global::Gtk.IconSet w31 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Sky.Ground.s_sky.png")); w1.Add("S_sky", w31); + global::Gtk.IconSet w32 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Mobs.test1.jpg")); + w1.Add("L_test_icon_mob", w32); w1.AddDefault(); } } diff --git a/Mundus/gtk-gui/gui.stetic b/Mundus/gtk-gui/gui.stetic index f9bceff..bb61167 100644 --- a/Mundus/gtk-gui/gui.stetic +++ b/Mundus/gtk-gui/gui.stetic @@ -157,6 +157,11 @@ <property name="Image">resource:Mundus.Icons.Sky.Ground.s_sky.png</property> </source> </icon-set> + <icon-set id="L_test_icon_mob"> + <source> + <property name="Image">resource:Mundus.Icons.Land.Mobs.test1.jpg</property> + </source> + </icon-set> </icon-factory> <widget class="Gtk.Window" id="Mundus.Views.Windows.NewGameWindow" design-size="581 275"> <property name="MemberName" /> @@ -519,6 +524,7 @@ <property name="WidthRequest">90</property> <property name="CanFocus">True</property> <property name="Label">Creative</property> + <property name="Active">True</property> <property name="DrawIndicator">True</property> <property name="HasLabel">True</property> <property name="UseUnderline">True</property> @@ -547,6 +553,7 @@ <property name="WidthRequest">90</property> <property name="CanFocus">True</property> <property name="Label">Easy</property> + <property name="Active">True</property> <property name="DrawIndicator">True</property> <property name="HasLabel">True</property> <property name="UseUnderline">True</property> @@ -628,6 +635,7 @@ <property name="WidthRequest">90</property> <property name="CanFocus">True</property> <property name="Label">Large</property> + <property name="Active">True</property> <property name="DrawIndicator">True</property> <property name="HasLabel">True</property> <property name="UseUnderline">True</property> @@ -683,6 +691,7 @@ <property name="MemberName" /> <property name="CanFocus">True</property> <property name="Label">Large</property> + <property name="Active">True</property> <property name="DrawIndicator">True</property> <property name="HasLabel">True</property> <property name="UseUnderline">True</property> @@ -5281,7 +5290,7 @@ <placeholder /> </child> </widget> - <widget class="Gtk.Window" id="Mundus.Views.Windows.SettingsWindow" design-size="386 300"> + <widget class="Gtk.Window" id="Mundus.Views.Windows.SettingsWindow" design-size="333 300"> <property name="MemberName" /> <property name="Title">Settings</property> <property name="WindowPosition">CenterOnParent</property> @@ -5292,7 +5301,7 @@ <widget class="Gtk.Table" id="tbUI"> <property name="MemberName" /> <property name="NRows">4</property> - <property name="NColumns">7</property> + <property name="NColumns">6</property> <property name="RowSpacing">3</property> <property name="ColumnSpacing">3</property> <child> @@ -5338,38 +5347,6 @@ <placeholder /> </child> <child> - <placeholder /> - </child> - <child> - <placeholder /> - </child> - <child> - <widget class="Gtk.Button" id="btnBack"> - <property name="MemberName" /> - <property name="WidthRequest">50</property> - <property name="HeightRequest">50</property> - <property name="CanFocus">True</property> - <property name="Type">TextOnly</property> - <property name="Label">Back</property> - <property name="UseUnderline">True</property> - <property name="BorderWidth">3</property> - <signal name="Clicked" handler="OnBtnBackClicked" /> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="XOptions">0</property> - <property name="YOptions">0</property> - <property name="XExpand">False</property> - <property name="XFill">False</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">False</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> <widget class="Gtk.HSeparator" id="hSeparator"> <property name="MemberName" /> <property name="HeightRequest">5</property> @@ -5378,7 +5355,7 @@ <property name="TopAttach">1</property> <property name="BottomAttach">2</property> <property name="LeftAttach">1</property> - <property name="RightAttach">6</property> + <property name="RightAttach">5</property> <property name="AutoSize">True</property> <property name="XOptions">Fill</property> <property name="YOptions">Fill</property> @@ -5396,8 +5373,8 @@ <property name="WidthRequest">40</property> </widget> <packing> - <property name="LeftAttach">2</property> - <property name="RightAttach">3</property> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> <property name="AutoSize">True</property> <property name="XOptions">Fill</property> <property name="YOptions">Fill</property> @@ -5410,7 +5387,7 @@ </packing> </child> <child> - <widget class="Gtk.Label" id="lblBlank2"> + <widget class="Gtk.Label" id="lblBlank3"> <property name="MemberName" /> <property name="WidthRequest">40</property> </widget> @@ -5429,25 +5406,6 @@ </packing> </child> <child> - <widget class="Gtk.Label" id="lblBlank3"> - <property name="MemberName" /> - <property name="WidthRequest">40</property> - </widget> - <packing> - <property name="LeftAttach">5</property> - <property name="RightAttach">6</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> <widget class="Gtk.Label" id="lblBlank4"> <property name="MemberName" /> <property name="WidthRequest">5</property> @@ -5472,8 +5430,8 @@ <property name="HeightRequest">50</property> </widget> <packing> - <property name="LeftAttach">6</property> - <property name="RightAttach">7</property> + <property name="LeftAttach">5</property> + <property name="RightAttach">6</property> <property name="AutoSize">True</property> <property name="XOptions">Fill</property> <property name="YOptions">Fill</property> @@ -5491,12 +5449,11 @@ <property name="LabelProp">Settings (replace with picture)</property> </widget> <packing> - <property name="LeftAttach">3</property> + <property name="LeftAttach">2</property> <property name="RightAttach">4</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> + <property name="AutoSize">False</property> <property name="YOptions">Fill</property> - <property name="XExpand">False</property> + <property name="XExpand">True</property> <property name="XFill">True</property> <property name="XShrink">False</property> <property name="YExpand">False</property> @@ -5507,7 +5464,7 @@ </widget> </child> </widget> - <widget class="Gtk.Window" id="Mundus.Views.Windows.PauseWindow" design-size="191 285"> + <widget class="Gtk.Window" id="Mundus.Views.Windows.PauseWindow" design-size="300 311"> <property name="MemberName" /> <property name="Title">PauseWindow</property> <property name="WindowPosition">CenterOnParent</property> @@ -5523,34 +5480,15 @@ <property name="MemberName" /> <property name="Spacing">2</property> <child> - <widget class="Gtk.Button" id="btnBack"> - <property name="MemberName" /> - <property name="WidthRequest">50</property> - <property name="HeightRequest">50</property> - <property name="CanFocus">True</property> - <property name="Type">TextOnly</property> - <property name="Label">Back</property> - <property name="UseUnderline">True</property> - <signal name="Clicked" handler="OnBtnBackClicked" /> - </widget> - <packing> - <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> - </packing> - </child> - <child> <widget class="Gtk.Label" id="lblTitle"> <property name="MemberName" /> + <property name="HeightRequest">50</property> <property name="LabelProp">Pause menu</property> <property name="Justify">Center</property> </widget> <packing> - <property name="Position">1</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> + <property name="Position">0</property> + <property name="AutoSize">False</property> <property name="Padding">3</property> </packing> </child> @@ -5563,12 +5501,27 @@ </packing> </child> <child> + <widget class="Gtk.Label" id="lblBuild"> + <property name="MemberName" /> + <property name="WidthRequest">300</property> + <property name="HeightRequest">20</property> + <property name="LabelProp">Build 16-04-2020 No1</property> + <property name="Justify">Center</property> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> <widget class="Gtk.HSeparator" id="hSeparator"> <property name="MemberName" /> <property name="HeightRequest">5</property> </widget> <packing> - <property name="Position">1</property> + <property name="Position">2</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -5586,7 +5539,7 @@ <signal name="Clicked" handler="OnBtnSettingsClicked" /> </widget> <packing> - <property name="Position">2</property> + <property name="Position">3</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -5604,7 +5557,7 @@ <signal name="Clicked" handler="OnBtnSaveClicked" /> </widget> <packing> - <property name="Position">3</property> + <property name="Position">4</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -5622,7 +5575,7 @@ <signal name="Clicked" handler="OnBtnSaveExitClicked" /> </widget> <packing> - <property name="Position">4</property> + <property name="Position">5</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -5640,7 +5593,7 @@ <signal name="Clicked" handler="OnBtnExitClicked" /> </widget> <packing> - <property name="Position">5</property> + <property name="Position">6</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -6725,7 +6678,7 @@ </widget> </child> </widget> - <widget class="Gtk.Window" id="Mundus.Views.Windows.MainWindow" design-size="300 465"> + <widget class="Gtk.Window" id="Mundus.Views.Windows.MainWindow" design-size="300 485"> <property name="MemberName" /> <property name="Title">Mundus</property> <property name="WindowPosition">CenterOnParent</property> @@ -6749,12 +6702,27 @@ </packing> </child> <child> + <widget class="Gtk.Label" id="lblBuild"> + <property name="MemberName" /> + <property name="WidthRequest">300</property> + <property name="HeightRequest">20</property> + <property name="LabelProp">Build 16-04-2020 No1</property> + <property name="Justify">Center</property> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> <widget class="Gtk.HSeparator" id="hSeparator"> <property name="MemberName" /> <property name="HeightRequest">5</property> </widget> <packing> - <property name="Position">1</property> + <property name="Position">2</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -6773,7 +6741,7 @@ <property name="BorderWidth">7</property> </widget> <packing> - <property name="Position">2</property> + <property name="Position">3</property> <property name="AutoSize">False</property> </packing> </child> @@ -6790,7 +6758,7 @@ <signal name="Clicked" handler="OnBtnNewGameClicked" /> </widget> <packing> - <property name="Position">3</property> + <property name="Position">4</property> <property name="AutoSize">False</property> </packing> </child> @@ -6807,7 +6775,7 @@ <signal name="Clicked" handler="OnBtnTutorialClicked" /> </widget> <packing> - <property name="Position">4</property> + <property name="Position">5</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> @@ -6826,7 +6794,7 @@ <signal name="Clicked" handler="OnBtnSettingsClicked" /> </widget> <packing> - <property name="Position">5</property> + <property name="Position">6</property> <property name="AutoSize">True</property> <property name="Expand">False</property> <property name="Fill">False</property> |
