aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-03-09 19:52:55 +0200
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-03-09 19:52:55 +0200
commitaca492ea4a70acf24642b3c7f4336c026c24170c (patch)
tree3c5fd605cf4ae1ef58ac8219b1cb4d548e6444cf
parent247068241f4d4c0c70605791c520a85995a0ff39 (diff)
downloadMundus-aca492ea4a70acf24642b3c7f4336c026c24170c.tar
Mundus-aca492ea4a70acf24642b3c7f4336c026c24170c.tar.gz
Mundus-aca492ea4a70acf24642b3c7f4336c026c24170c.zip
Remade the file structure, changed what is done by what file, implimented inventory, implimented functionality for most other game window buttons
-rw-r--r--Mundus/Controllers/Mob/MobMoving.cs21
-rw-r--r--Mundus/Data/Dialogues/DI.cs (renamed from Mundus/Models/DI.cs)6
-rw-r--r--Mundus/Data/MapSizes.cs (renamed from Mundus/Models/MapSizes.cs)2
-rw-r--r--Mundus/Data/SuperLayers/ISuperLayer.cs (renamed from Mundus/Models/SuperLayers/ISuperLayer.cs)7
-rw-r--r--Mundus/Data/SuperLayers/LI.cs (renamed from Mundus/Models/Tiles/LI.cs)5
-rw-r--r--Mundus/Data/SuperLayers/Land.cs (renamed from Mundus/Models/SuperLayers/Land.cs)6
-rw-r--r--Mundus/Data/SuperLayers/Mobs/LMI.cs15
-rw-r--r--Mundus/Data/Windows/WI.cs (renamed from Mundus/Models/WI.cs)5
-rw-r--r--Mundus/Models/Mobs/Land_Mobs/LMI.cs11
-rw-r--r--Mundus/Models/Mobs/Land_Mobs/Player.cs20
-rw-r--r--Mundus/Mundus.csproj59
-rw-r--r--Mundus/Program.cs26
-rw-r--r--Mundus/Service/Calculate.cs32
-rw-r--r--Mundus/Service/GameGenerator.cs40
-rw-r--r--Mundus/Service/Inventory.cs47
-rw-r--r--Mundus/Service/Mobs/IMob.cs (renamed from Mundus/Models/Mobs/IMob.cs)7
-rw-r--r--Mundus/Service/Mobs/LandMobs/Player.cs20
-rw-r--r--Mundus/Service/Mobs/MobMoving.cs31
-rw-r--r--Mundus/Service/SuperLayers/ImageController.cs99
-rw-r--r--Mundus/Service/SuperLayers/LandSuperLayerGenerator.cs (renamed from Mundus/Controllers/Map/LandSuperLayerGenerator.cs)11
-rw-r--r--Mundus/Service/SwitchItems.cs51
-rw-r--r--Mundus/Service/Tiles/GroundTile.cs (renamed from Mundus/Models/Tiles/GroundTile.cs)5
-rw-r--r--Mundus/Service/Tiles/ITile.cs (renamed from Mundus/Models/Tiles/ITile.cs)5
-rw-r--r--Mundus/Service/Tiles/ItemTile.cs (renamed from Mundus/Models/Tiles/ItemTile.cs)5
-rw-r--r--Mundus/Service/Tiles/MobTile.cs (renamed from Mundus/Models/Tiles/MobTile.cs)5
-rw-r--r--Mundus/Service/WindowController.cs35
-rw-r--r--Mundus/Views/Dialogs/ExitDialog.cs3
-rw-r--r--Mundus/Views/Windows/CraftingWindow.cs3
-rw-r--r--Mundus/Views/Windows/IGameWindow.cs (renamed from Mundus/Views/Windows/Interfaces/IGameWindow.cs)7
-rw-r--r--Mundus/Views/Windows/LargeGameWindow.cs7
-rw-r--r--Mundus/Views/Windows/MainWindow.cs9
-rw-r--r--Mundus/Views/Windows/MediumGameWindow.cs3
-rw-r--r--Mundus/Views/Windows/MusicWindow.cs1
-rw-r--r--Mundus/Views/Windows/NewGameWindow.cs32
-rw-r--r--Mundus/Views/Windows/PauseWindow.cs8
-rw-r--r--Mundus/Views/Windows/SettingsWindow.cs1
-rw-r--r--Mundus/Views/Windows/SmallGameWindow.cs644
-rw-r--r--Mundus/gtk-gui/Mundus.Views.Windows.MusicWindow.cs5
-rw-r--r--Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs4
-rw-r--r--Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs5
-rw-r--r--Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs44
-rw-r--r--Mundus/gtk-gui/gui.stetic51
42 files changed, 1039 insertions, 364 deletions
diff --git a/Mundus/Controllers/Mob/MobMoving.cs b/Mundus/Controllers/Mob/MobMoving.cs
deleted file mode 100644
index 99fabab..0000000
--- a/Mundus/Controllers/Mob/MobMoving.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using Mundus.Models.Mobs;
-using Mundus.Models.SuperLayers;
-
-namespace Mundus.Controllers.Mob {
- public static class MobMoving {
- public static void MoveMob(IMob mob, int yPos, int xPos) {
-
- }
-
- private static void ChangePosition(IMob mob, int yPos, int xPos) {
- if (mob.CurrSuperLayer.GetItemLayerTile( yPos, xPos ) == null ||
- mob.CurrSuperLayer.GetItemLayerTile( yPos, xPos ).IsWalkable) {
- mob.CurrSuperLayer.RemoveMobFromPosition( mob.YPos, mob.XPos );
- mob.YPos = yPos;
- mob.XPos = xPos;
- mob.CurrSuperLayer.SetMobAtPosition( mob.Tile, yPos, xPos );
- }
- }
- }
-}
diff --git a/Mundus/Models/DI.cs b/Mundus/Data/Dialogues/DI.cs
index 6f91709..2f5bd3d 100644
--- a/Mundus/Models/DI.cs
+++ b/Mundus/Data/Dialogues/DI.cs
@@ -1,7 +1,7 @@
-using System;
-using Mundus.Views.Dialogs;
+using Mundus.Views.Dialogs;
+using Gtk;
-namespace Mundus.Models {
+namespace Mundus.Data.Dialogues {
public static class DI { //stands for Dialogue Instances
public static ExitDialog DExit { get; private set; }
diff --git a/Mundus/Models/MapSizes.cs b/Mundus/Data/MapSizes.cs
index b9fd5e5..19025a1 100644
--- a/Mundus/Models/MapSizes.cs
+++ b/Mundus/Data/MapSizes.cs
@@ -1,4 +1,4 @@
-namespace Mundus.Models {
+namespace Mundus.Data {
public static class MapSizes {
//These are the map sizes that are generated
public const int SMALL = 5;
diff --git a/Mundus/Models/SuperLayers/ISuperLayer.cs b/Mundus/Data/SuperLayers/ISuperLayer.cs
index 8040f91..2b0af02 100644
--- a/Mundus/Models/SuperLayers/ISuperLayer.cs
+++ b/Mundus/Data/SuperLayers/ISuperLayer.cs
@@ -1,9 +1,6 @@
-using System;
-using System.Collections.Generic;
-using Mundus.Models.Tiles;
-using Gtk;
+using Mundus.Service.Tiles;
-namespace Mundus.Models.SuperLayers {
+namespace Mundus.Data.SuperLayers {
public interface ISuperLayer {
MobTile GetMobLayerTile(int yPpos, int xPos);
ItemTile GetItemLayerTile(int yPos, int xPos);
diff --git a/Mundus/Models/Tiles/LI.cs b/Mundus/Data/SuperLayers/LI.cs
index 1e741dc..9f43ee3 100644
--- a/Mundus/Models/Tiles/LI.cs
+++ b/Mundus/Data/SuperLayers/LI.cs
@@ -1,7 +1,4 @@
-using System;
-using Mundus.Models.SuperLayers;
-
-namespace Mundus.Models.Tiles {
+namespace Mundus.Data.SuperLayers {
public static class LI { //stands for Layer Instances
//add other layers
public static Land Land { get; private set; }
diff --git a/Mundus/Models/SuperLayers/Land.cs b/Mundus/Data/SuperLayers/Land.cs
index 5507374..069b7cb 100644
--- a/Mundus/Models/SuperLayers/Land.cs
+++ b/Mundus/Data/SuperLayers/Land.cs
@@ -1,8 +1,6 @@
-using System;
-using System.Collections.Generic;
-using Mundus.Models.Tiles;
+using Mundus.Service.Tiles;
-namespace Mundus.Models.SuperLayers {
+namespace Mundus.Data.SuperLayers {
public class Land : ISuperLayer {
private static MobTile[,] mobLayer;
private static ItemTile[,] itemLayer;
diff --git a/Mundus/Data/SuperLayers/Mobs/LMI.cs b/Mundus/Data/SuperLayers/Mobs/LMI.cs
new file mode 100644
index 0000000..86f59f2
--- /dev/null
+++ b/Mundus/Data/SuperLayers/Mobs/LMI.cs
@@ -0,0 +1,15 @@
+using Mundus.Service.Mobs.LandMobs;
+
+namespace Mundus.Data.Superlayers.Mobs {
+ public static class LMI { //stands for Land Mob Instances
+ public static Player Player { get; private set; }
+
+ public static void CreateInstances(int inventorySize) {
+ Player = new Player("player", inventorySize);
+ }
+
+ public static void CreateInventories(int screenInvSize) {
+ Player.Inventory.SetNewSizes(screenInvSize);
+ }
+ }
+}
diff --git a/Mundus/Models/WI.cs b/Mundus/Data/Windows/WI.cs
index b31a70c..65cf86e 100644
--- a/Mundus/Models/WI.cs
+++ b/Mundus/Data/Windows/WI.cs
@@ -1,7 +1,6 @@
-using System;
-using Mundus.Views.Windows;
+using Mundus.Views.Windows;
-namespace Mundus.Models {
+namespace Mundus.Data.Windows {
public static class WI { //stands for Window Instances
public static MainWindow WMain { get; private set; }
public static NewGameWindow WNewGame { get; private set; }
diff --git a/Mundus/Models/Mobs/Land_Mobs/LMI.cs b/Mundus/Models/Mobs/Land_Mobs/LMI.cs
deleted file mode 100644
index 5b98954..0000000
--- a/Mundus/Models/Mobs/Land_Mobs/LMI.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace Mundus.Models.Mobs.Land_Mobs {
- public static class LMI { //stands for Land Mob Instances
- public static Player Player { get; private set; }
-
- public static void CreateInstances() {
- Player = new Player("player");
- }
- }
-}
diff --git a/Mundus/Models/Mobs/Land_Mobs/Player.cs b/Mundus/Models/Mobs/Land_Mobs/Player.cs
deleted file mode 100644
index af00e7a..0000000
--- a/Mundus/Models/Mobs/Land_Mobs/Player.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using Gtk;
-using Mundus.Models.SuperLayers;
-using Mundus.Models.Tiles;
-
-namespace Mundus.Models.Mobs.Land_Mobs {
- 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 Player(string stock_id) : this(new MobTile(stock_id))
- { }
-
- public Player(MobTile tile) {
- this.Tile = tile;
- }
- }
-}
diff --git a/Mundus/Mundus.csproj b/Mundus/Mundus.csproj
index 2e8b062..fbddcf9 100644
--- a/Mundus/Mundus.csproj
+++ b/Mundus/Mundus.csproj
@@ -79,42 +79,47 @@
<Compile Include="gtk-gui\Mundus.Views.Windows.MusicWindow.cs" />
<Compile Include="Views\Windows\MainWindow.cs" />
<Compile Include="gtk-gui\Mundus.Views.Windows.MainWindow.cs" />
- <Compile Include="Models\WI.cs" />
<Compile Include="Views\Dialogs\ExitDialog.cs" />
<Compile Include="gtk-gui\Mundus.Views.Dialogs.ExitDialog.cs" />
- <Compile Include="Models\DI.cs" />
- <Compile Include="Views\Windows\Interfaces\IGameWindow.cs" />
- <Compile Include="Models\SuperLayers\Land.cs" />
- <Compile Include="Models\SuperLayers\ISuperLayer.cs" />
- <Compile Include="Models\Tiles\GroundTile.cs" />
- <Compile Include="Models\Tiles\ItemTile.cs" />
- <Compile Include="Models\Tiles\ITile.cs" />
- <Compile Include="Controllers\Map\LandSuperLayerGenerator.cs" />
- <Compile Include="Models\MapSizes.cs" />
- <Compile Include="Models\Mobs\IMob.cs" />
- <Compile Include="Controllers\Mob\MobMoving.cs" />
- <Compile Include="Models\Tiles\MobTile.cs" />
- <Compile Include="Models\Tiles\LI.cs" />
- <Compile Include="Models\Mobs\Land_Mobs\LMI.cs" />
- <Compile Include="Models\Mobs\Land_Mobs\Player.cs" />
+ <Compile Include="Service\Tiles\GroundTile.cs" />
+ <Compile Include="Service\Tiles\ItemTile.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\MobMoving.cs" />
+ <Compile Include="Data\MapSizes.cs" />
+ <Compile Include="Service\SuperLayers\LandSuperLayerGenerator.cs" />
+ <Compile Include="Service\SwitchItems.cs" />
+ <Compile Include="Service\SuperLayers\ImageController.cs" />
+ <Compile Include="Service\Calculate.cs" />
+ <Compile Include="Data\Windows\WI.cs" />
+ <Compile Include="Data\Dialogues\DI.cs" />
+ <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="Service\WindowController.cs" />
+ <Compile Include="Service\GameGenerator.cs" />
</ItemGroup>
<ItemGroup>
- <Folder Include="Models\" />
+ <Folder Include="Service\" />
<Folder Include="Views\" />
- <Folder Include="Controllers\" />
+ <Folder Include="Data\" />
<Folder Include="Views\Windows\" />
<Folder Include="Views\Dialogs\" />
- <Folder Include="Views\Windows\Interfaces\" />
- <Folder Include="Models\SuperLayers\" />
- <Folder Include="Models\Tiles\" />
- <Folder Include="Views\Icons\" />
- <Folder Include="Controllers\Map\" />
- <Folder Include="Views\Icons\Land\Ground\" />
+ <Folder Include="Service\SuperLayers\" />
+ <Folder Include="Service\Tiles\" />
<Folder Include="Icons\Land\Ground\" />
<Folder Include="Icons\Land\Items\" />
- <Folder Include="Models\Mobs\" />
- <Folder Include="Controllers\Mob\" />
- <Folder Include="Models\Mobs\Land_Mobs\" />
+ <Folder Include="Service\Mobs\" />
+ <Folder Include="Service\Mobs\LandMobs\" />
+ <Folder Include="Data\Windows\" />
+ <Folder Include="Data\Dialogues\" />
+ <Folder Include="Data\SuperLayers\" />
+ <Folder Include="Data\SuperLayers\Mobs\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Mundus/Program.cs b/Mundus/Program.cs
index d141816..b2c6271 100644
--- a/Mundus/Program.cs
+++ b/Mundus/Program.cs
@@ -1,37 +1,23 @@
-using System.ComponentModel;
-using System.Threading;
-using System.Threading.Tasks;
-using Gtk;
-using Mundus.Models;
-using Mundus.Models.Mobs.Land_Mobs;
-using Mundus.Models.Tiles;
-using Mundus.Views.Windows;
+using Gtk;
+using Mundus.Data.Dialogues;
+using Mundus.Data.Superlayers.Mobs;
+using Mundus.Data.SuperLayers;
+using Mundus.Data.Windows;
namespace Mundus {
public static class MainClass {
public static bool runGame = true;
public static void Main(string[] args) {
- Initialize();
- }
-
- private static void Initialize() {
Application.Init();
//All windows that are used by user (instances) are saved and created in WindowInstances.cs
WI.CreateInstances();
DI.CreateInstances();
LI.CreateInstances();
- LMI.CreateInstances();
+ LMI.CreateInstances( 1 );
WI.WMain.Show();
Application.Run();
}
-
- public static void RunGameLoop() {
- while (runGame) {
- WI.WSGame.PrintScreen();
- Thread.Sleep( 100 );
- }
- }
}
}
diff --git a/Mundus/Service/Calculate.cs b/Mundus/Service/Calculate.cs
new file mode 100644
index 0000000..7ccaf79
--- /dev/null
+++ b/Mundus/Service/Calculate.cs
@@ -0,0 +1,32 @@
+using Mundus.Data;
+using Mundus.Data.Superlayers.Mobs;
+
+namespace Mundus.Service {
+ public static class Calculate {
+ /*Depending on whether you are on the edge of the map or in the center, the screen renders a bit differently.
+ *On the edge it doesn't follow the player and only shows the corner "chunk". In the other parts it follows the
+ *the player, making sure he stays in the center of the screen.
+ *This means that when the player is followed, rendered part of the map depend on the player position, but when
+ *he isn't, it depends on the screen and map sizes.*/
+ public static int CalculateMaxY(int size) {
+ int maxY = (LMI.Player.YPos - 2 >= 0) ? LMI.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;
+ 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;
+ 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;
+ if (startX < 0) startX = 0;
+ return startX;
+ }
+ }
+}
diff --git a/Mundus/Service/GameGenerator.cs b/Mundus/Service/GameGenerator.cs
new file mode 100644
index 0000000..4baf325
--- /dev/null
+++ b/Mundus/Service/GameGenerator.cs
@@ -0,0 +1,40 @@
+using System;
+using Mundus.Data;
+using Mundus.Data.Superlayers.Mobs;
+using Mundus.Data.Windows;
+using Mundus.Service.SuperLayers;
+using Mundus.Views.Windows;
+
+namespace Mundus.Service {
+ public static class GameGenerator {
+ public static void GenerateMap(string size) {
+ switch (size.ToLower()) {
+ case "small": MapSizes.CurrSize = MapSizes.SMALL; break;
+ case "medium": MapSizes.CurrSize = MapSizes.MEDIUM; break;
+ case "large": MapSizes.CurrSize = MapSizes.LARGE; break;
+ default: throw new ArgumentException( "Map size must be \"small\", \"medium\" or \"large\"" );
+ }
+
+ //Add the other layers
+ LandSuperLayerGenerator.GenerateAllLayers( MapSizes.CurrSize );
+ }
+
+ public static void GameWindowInventorySetup(string size) {
+ switch (size.ToLower()) {
+ case "small": GameWindowInventorySetup(WI.WSGame); break;
+ case "medium": GameWindowInventorySetup(WI.WMGame); break;
+ case "large": GameWindowInventorySetup(WI.WLGame); break;
+ default: throw new ArgumentException("Screen & inventory size must be \"small\", \"medium\" or \"large\"");
+ }
+ }
+
+ public static void GameWindowInventorySetup(IGameWindow gameWindow) {
+ LMI.CreateInventories(gameWindow.Size);
+ WI.WPause.GameWindow = gameWindow;
+ gameWindow.SetDefaults();
+ gameWindow.PrintScreen();
+ gameWindow.PrintInventory();
+ gameWindow.Show();
+ }
+ }
+}
diff --git a/Mundus/Service/Inventory.cs b/Mundus/Service/Inventory.cs
new file mode 100644
index 0000000..b0e0257
--- /dev/null
+++ b/Mundus/Service/Inventory.cs
@@ -0,0 +1,47 @@
+using Mundus.Service.Tiles;
+
+namespace Mundus.Service {
+ public class Inventory {
+ public ItemTile[] Hotbar { get; set; }
+ public ItemTile[] Items { get; set; }
+ public ItemTile[] Accessories { get; set; }
+ public ItemTile[] Gear { get; set; }
+
+ public Inventory(int screenInvSize) {
+ this.SetNewSizes(screenInvSize);
+ }
+
+ public void SetNewSizes(int screenInvSize) {
+ this.Hotbar = new ItemTile[screenInvSize];
+ this.Items = new ItemTile[screenInvSize * screenInvSize];
+ this.Accessories = new ItemTile[screenInvSize * 2];
+ this.Gear = new ItemTile[screenInvSize];
+ }
+
+ public void AddItem(string place, ItemTile newItem) {
+ ItemTile[] tmp = null;
+ switch (place.ToLower()) {
+ case "hotbar": tmp = this.Hotbar; break;
+ case "items": tmp = this.Items; break;
+ case "accessories": tmp = this.Accessories; break;
+ case "gear": tmp = this.Gear; break;
+ }
+
+ for (int i = 0; i < tmp.Length; i++) {
+ if (tmp[i] == null) {
+ tmp[i] = newItem;
+ break;
+ }
+ }
+ }
+
+ public void RemoveItem(string place, int index) {
+ switch (place.ToLower()) {
+ case "hotbar": this.Hotbar[index] = null; break;
+ case "items": this.Items[index] = null; break;
+ case "accessories": this.Accessories[index] = null; break;
+ case "gear": this.Gear[index] = null; break;
+ }
+ }
+ }
+}
diff --git a/Mundus/Models/Mobs/IMob.cs b/Mundus/Service/Mobs/IMob.cs
index 2f66fc6..e84e367 100644
--- a/Mundus/Models/Mobs/IMob.cs
+++ b/Mundus/Service/Mobs/IMob.cs
@@ -1,8 +1,7 @@
-using System;
-using Mundus.Models.SuperLayers;
-using Mundus.Models.Tiles;
+using Mundus.Data.SuperLayers;
+using Mundus.Service.Tiles;
-namespace Mundus.Models.Mobs {
+namespace Mundus.Service.Mobs {
public interface IMob {
MobTile Tile { get; }
ISuperLayer CurrSuperLayer { get; set; }
diff --git a/Mundus/Service/Mobs/LandMobs/Player.cs b/Mundus/Service/Mobs/LandMobs/Player.cs
new file mode 100644
index 0000000..9a52dd0
--- /dev/null
+++ b/Mundus/Service/Mobs/LandMobs/Player.cs
@@ -0,0 +1,20 @@
+using Mundus.Data.SuperLayers;
+using Mundus.Service.Tiles;
+
+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 Player(string stock_id, int inventorySize) : this(new MobTile(stock_id), inventorySize)
+ { }
+
+ public Player(MobTile tile, int inventorySize) {
+ this.Tile = tile;
+ this.Inventory = new Inventory(inventorySize);
+ }
+ }
+}
diff --git a/Mundus/Service/Mobs/MobMoving.cs b/Mundus/Service/Mobs/MobMoving.cs
new file mode 100644
index 0000000..7628edc
--- /dev/null
+++ b/Mundus/Service/Mobs/MobMoving.cs
@@ -0,0 +1,31 @@
+using Mundus.Data;
+using Mundus.Data.Superlayers.Mobs;
+
+namespace Mundus.Service.Mobs {
+ public static class MobMoving {
+ public static void MovePlayer(int yPos, int xPos, int size) {
+ ChangePosition(LMI.Player, yPos, xPos, size);
+ }
+
+ public static void ChangePosition(IMob mob, int buttonYPos, int buttonXPos, 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 newXPos = (LMI.Player.XPos - 2 >= 0) ? LMI.Player.XPos - 2 + buttonXPos : buttonXPos;
+ if (LMI.Player.XPos > MapSizes.CurrSize - 3) newXPos = buttonXPos + MapSizes.CurrSize - size;
+
+ if (newYPos >= 0 && newXPos >= 0 && newYPos < MapSizes.CurrSize && newXPos < MapSizes.CurrSize) {
+ ChangePosition(mob, newYPos, newXPos);
+ }
+ }
+
+ public static void ChangePosition(IMob mob, int yPos, int xPos) {
+ if (mob.CurrSuperLayer.GetItemLayerTile( yPos, xPos ) == null ||
+ mob.CurrSuperLayer.GetItemLayerTile( yPos, xPos ).IsWalkable) {
+ mob.CurrSuperLayer.RemoveMobFromPosition( mob.YPos, mob.XPos );
+ mob.YPos = yPos;
+ mob.XPos = xPos;
+ mob.CurrSuperLayer.SetMobAtPosition( mob.Tile, yPos, xPos );
+ }
+ }
+ }
+}
diff --git a/Mundus/Service/SuperLayers/ImageController.cs b/Mundus/Service/SuperLayers/ImageController.cs
new file mode 100644
index 0000000..c66f29d
--- /dev/null
+++ b/Mundus/Service/SuperLayers/ImageController.cs
@@ -0,0 +1,99 @@
+using Gtk;
+using Mundus.Data;
+using Mundus.Data.Superlayers.Mobs;
+using Mundus.Data.SuperLayers;
+
+namespace Mundus.Service.SuperLayers {
+ public static class ImageController {
+ //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;
+ Image img = null;
+
+ //Layer 0 is GroundLayer, 1 is ItemLayer and 2 is Moblayer
+ if (layer == 0) {
+ if (superLayer.GetGroundLayerTile( row, col ) == null) {
+ img = new Image( "blank", IconSize.Dnd );
+ }
+ else {
+ img = new Image( superLayer.GetGroundLayerTile( row, col ).stock_id, IconSize.Dnd );
+ }
+ }
+ else if (layer == 1 &&
+ superLayer.GetItemLayerTile( row, col ) != null) {
+ img = new Image( superLayer.GetItemLayerTile( row, col ).stock_id, IconSize.Dnd );
+ }
+ else if (layer == 2 &&
+ superLayer.GetMobLayerTile( row, col ) != null) {
+ img = new Image( superLayer.GetMobLayerTile( row, col ).stock_id, IconSize.Dnd );
+ }
+ return img;
+ }
+
+ //Return a tile if it exists, otherwise return the "blank" icon
+ public static Image GetGroundImage(int row, int col) {
+ ISuperLayer superLayer = LMI.Player.CurrSuperLayer;
+ Image img = new Image("blank", IconSize.Dnd);
+
+ if (row >= 0 && col >= 0 && col < MapSizes.CurrSize && row < MapSizes.CurrSize &&
+ superLayer.GetGroundLayerTile( row, col ) != null) {
+ img = superLayer.GetGroundLayerTile( row, col ).Texture;
+ }
+ return img;
+ }
+
+ //Return a tile if it exists, otherwise return the "blank" icon
+ public static Image GetItemImage(int row, int col) {
+ ISuperLayer superLayer = LMI.Player.CurrSuperLayer;
+ Image img = new Image( "blank", IconSize.Dnd );
+
+ if (row >= 0 && col >= 0 && col < MapSizes.CurrSize && row < MapSizes.CurrSize &&
+ superLayer.GetItemLayerTile( row, col ) != null) {
+ img = superLayer.GetItemLayerTile( row, col ).Texture;
+ }
+ return img;
+ }
+
+ 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) {
+ img = LMI.Player.Inventory.Hotbar[index].Texture;
+ }
+ }
+ return img;
+ }
+
+ 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) {
+ img = LMI.Player.Inventory.Items[index].Texture;
+ }
+ }
+ return img;
+ }
+
+ public static Image GetAccessoryImage(int index) {
+ Image img = new Image("blank", IconSize.Dnd);
+ if (index < LMI.Player.Inventory.Accessories.Length) {
+ if (LMI.Player.Inventory.Accessories[index] != null) {
+ img = LMI.Player.Inventory.Accessories[index].Texture;
+ }
+ }
+ return img;
+ }
+
+ public static Image GetGearImage(int index) {
+ Image img = new Image( "blank", IconSize.Dnd );
+ if (index < LMI.Player.Inventory.Gear.Length) {
+ if (LMI.Player.Inventory.Gear[index] != null) {
+ img = LMI.Player.Inventory.Gear[index].Texture;
+ }
+ }
+ return img;
+ }
+ }
+}
diff --git a/Mundus/Controllers/Map/LandSuperLayerGenerator.cs b/Mundus/Service/SuperLayers/LandSuperLayerGenerator.cs
index b19be6d..8446ced 100644
--- a/Mundus/Controllers/Map/LandSuperLayerGenerator.cs
+++ b/Mundus/Service/SuperLayers/LandSuperLayerGenerator.cs
@@ -1,10 +1,9 @@
using System;
-using Mundus.Models;
-using Mundus.Models.Tiles;
-using Mundus.Models.SuperLayers;
-using Mundus.Models.Mobs.Land_Mobs;
+using Mundus.Data.Superlayers.Mobs;
+using Mundus.Data.SuperLayers;
+using Mundus.Service.Tiles;
-namespace Mundus.Controllers.Map {
+namespace Mundus.Service.SuperLayers {
public static class LandSuperLayerGenerator {
private static Random rnd;
@@ -47,7 +46,7 @@ namespace Mundus.Controllers.Map {
for (int col = 0; col < size; col++) {
for (int row = 0; row < size; row++) {
- if (rnd.Next( 0, 5 ) == 1) {
+ if (rnd.Next( 0, 50 ) == 1) {
tiles[col, row] = new ItemTile("boulder");
}
}
diff --git a/Mundus/Service/SwitchItems.cs b/Mundus/Service/SwitchItems.cs
new file mode 100644
index 0000000..4a2d2fd
--- /dev/null
+++ b/Mundus/Service/SwitchItems.cs
@@ -0,0 +1,51 @@
+using Mundus.Data.Superlayers.Mobs;
+using Mundus.Service.Tiles;
+
+namespace Mundus.Service {
+ public static class SwitchItems {
+ private static ItemTile[] origin = null;
+ private static int oIndex = -1;
+
+ public static void SetOrigin(string originName, int originIndex) {
+ 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;
+ }
+ SetOrigin(newOrigin, originIndex);
+ }
+
+ public static void SetOrigin(ItemTile[] newOrigin, int originIndex) {
+ origin = newOrigin;
+ oIndex = originIndex;
+ }
+
+ public static void ReplaceItems(string destnation, int destinationIndex) {
+ ItemTile[] destinationLocation = null;
+
+ switch (destnation.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;
+ }
+ ReplaceItems(destinationLocation, destinationIndex);
+ }
+
+ public static void ReplaceItems(ItemTile[] destination, int destinationIndex) {
+ var toTransfer = origin[oIndex];
+ origin[oIndex] = destination[destinationIndex];
+ destination[destinationIndex] = toTransfer;
+
+ origin = null;
+ oIndex = -1;
+ }
+
+ public static bool HasOrigin() {
+ return origin != null && oIndex != -1;
+ }
+ }
+}
diff --git a/Mundus/Models/Tiles/GroundTile.cs b/Mundus/Service/Tiles/GroundTile.cs
index 2314c9d..d5d3a42 100644
--- a/Mundus/Models/Tiles/GroundTile.cs
+++ b/Mundus/Service/Tiles/GroundTile.cs
@@ -1,7 +1,6 @@
-using System;
-using Gtk;
+using Gtk;
-namespace Mundus.Models.Tiles {
+namespace Mundus.Service.Tiles {
public class GroundTile : ITile {
public string stock_id { get; private set; }
public Image Texture { get; private set; }
diff --git a/Mundus/Models/Tiles/ITile.cs b/Mundus/Service/Tiles/ITile.cs
index fc5d032..c6c4d17 100644
--- a/Mundus/Models/Tiles/ITile.cs
+++ b/Mundus/Service/Tiles/ITile.cs
@@ -1,7 +1,6 @@
-using System;
-using Gtk;
+using Gtk;
-namespace Mundus.Models.Tiles {
+namespace Mundus.Service.Tiles {
public interface ITile {
string stock_id { get; }
Image Texture { get; }
diff --git a/Mundus/Models/Tiles/ItemTile.cs b/Mundus/Service/Tiles/ItemTile.cs
index 92e1d08..67134a4 100644
--- a/Mundus/Models/Tiles/ItemTile.cs
+++ b/Mundus/Service/Tiles/ItemTile.cs
@@ -1,7 +1,6 @@
-using System;
-using Gtk;
+using Gtk;
-namespace Mundus.Models.Tiles {
+namespace Mundus.Service.Tiles {
public class ItemTile {
public string stock_id { get; private set; }
public Image Texture { get; private set; }
diff --git a/Mundus/Models/Tiles/MobTile.cs b/Mundus/Service/Tiles/MobTile.cs
index fc8453d..bb072d8 100644
--- a/Mundus/Models/Tiles/MobTile.cs
+++ b/Mundus/Service/Tiles/MobTile.cs
@@ -1,7 +1,6 @@
-using System;
-using Gtk;
+using Gtk;
-namespace Mundus.Models.Tiles {
+namespace Mundus.Service.Tiles {
public class MobTile : ITile {
public string stock_id { get; private set; }
public Image Texture { get; private set; }
diff --git a/Mundus/Service/WindowController.cs b/Mundus/Service/WindowController.cs
new file mode 100644
index 0000000..d317fc6
--- /dev/null
+++ b/Mundus/Service/WindowController.cs
@@ -0,0 +1,35 @@
+using Gtk;
+using Mundus.Data.Windows;
+
+namespace Mundus.Service {
+ public static class WindowController {
+ public static void ShowSettingsWindow(Window sender) {
+ sender.Hide();
+ WI.WSettings.Show(sender);
+ }
+
+ public static void ShowNewGameWindow(Window sender) {
+ sender.Hide();
+ WI.WNewGame.SetDefaults();
+ WI.WNewGame.Show();
+ }
+
+ public static void ShowMainWindow(Window sender) {
+ sender.Hide();
+ WI.WMain.Show();
+ }
+
+ public static bool PauseWindowVisible { get; set; }
+
+ public static void ShowPauseWindow() {
+ WI.WPause.Show();
+ WI.WPause.Present();
+ PauseWindowVisible = true;
+ }
+
+ public static void ShowMusicWindow() {
+ WI.WMusic.Show();
+ WI.WMusic.Present();
+ }
+ }
+}
diff --git a/Mundus/Views/Dialogs/ExitDialog.cs b/Mundus/Views/Dialogs/ExitDialog.cs
index e51c7fb..3bbc69d 100644
--- a/Mundus/Views/Dialogs/ExitDialog.cs
+++ b/Mundus/Views/Dialogs/ExitDialog.cs
@@ -1,5 +1,4 @@
-using System;
-namespace Mundus.Views.Dialogs {
+namespace Mundus.Views.Dialogs {
public partial class ExitDialog : Gtk.Dialog {
public ExitDialog() {
this.Build();
diff --git a/Mundus/Views/Windows/CraftingWindow.cs b/Mundus/Views/Windows/CraftingWindow.cs
index 2fca5d3..d4123ac 100644
--- a/Mundus/Views/Windows/CraftingWindow.cs
+++ b/Mundus/Views/Windows/CraftingWindow.cs
@@ -1,5 +1,4 @@
-using System;
-namespace Mundus.Views.Windows {
+namespace Mundus.Views.Windows {
public partial class CraftingWindow : Gtk.Window {
public CraftingWindow() :
base( Gtk.WindowType.Toplevel ) {
diff --git a/Mundus/Views/Windows/Interfaces/IGameWindow.cs b/Mundus/Views/Windows/IGameWindow.cs
index 8b6019d..98c2997 100644
--- a/Mundus/Views/Windows/Interfaces/IGameWindow.cs
+++ b/Mundus/Views/Windows/IGameWindow.cs
@@ -1,8 +1,7 @@
-using System;
-using Gtk;
-
-namespace Mundus.Views.Windows.Interfaces {
+namespace Mundus.Views.Windows {
public interface IGameWindow {
+ int Size { get; }
+
//Events that are generated from designer window
void OnDeleteEvent(object o, Gtk.DeleteEventArgs args);
diff --git a/Mundus/Views/Windows/LargeGameWindow.cs b/Mundus/Views/Windows/LargeGameWindow.cs
index 19f5aa3..746c679 100644
--- a/Mundus/Views/Windows/LargeGameWindow.cs
+++ b/Mundus/Views/Windows/LargeGameWindow.cs
@@ -1,9 +1,10 @@
-using System;
-using Mundus.Views.Windows.Interfaces;
+using System;
using Gtk;
namespace Mundus.Views.Windows {
- public partial class LargeGameWindow : Gtk.Window, IGameWindow {
+ public partial class LargeGameWindow : Gtk.Window, IGameWindow {
+ public int Size { get; private set; }
+
public LargeGameWindow() : base( Gtk.WindowType.Toplevel ) {
this.Build();
}
diff --git a/Mundus/Views/Windows/MainWindow.cs b/Mundus/Views/Windows/MainWindow.cs
index 229dc11..d2d36b4 100644
--- a/Mundus/Views/Windows/MainWindow.cs
+++ b/Mundus/Views/Windows/MainWindow.cs
@@ -1,6 +1,6 @@
using System;
using Gtk;
-using Mundus.Models;
+using Mundus.Service;
namespace Mundus.Views.Windows {
public partial class MainWindow : Gtk.Window {
@@ -13,14 +13,11 @@ namespace Mundus.Views.Windows {
}
private void OnBtnNewGameClicked(object sender, EventArgs e) {
- this.Hide();
- WI.WNewGame.SetDefaults();
- WI.WNewGame.Show();
+ WindowController.ShowNewGameWindow(this);
}
private void OnBtnSettingsClicked(object sender, EventArgs e) {
- this.Hide();
- WI.WSettings.Show(this);
+ WindowController.ShowSettingsWindow(this);
}
protected void OnBtnTutorialClicked(object sender, EventArgs e) {
diff --git a/Mundus/Views/Windows/MediumGameWindow.cs b/Mundus/Views/Windows/MediumGameWindow.cs
index 7fdb5cb..d1cd5df 100644
--- a/Mundus/Views/Windows/MediumGameWindow.cs
+++ b/Mundus/Views/Windows/MediumGameWindow.cs
@@ -1,9 +1,10 @@
using System;
using Gtk;
-using Mundus.Views.Windows.Interfaces;
namespace Mundus.Views.Windows {
public partial class MediumGameWindow : Gtk.Window, IGameWindow {
+ public int Size { get; private set; }
+
public MediumGameWindow() : base( Gtk.WindowType.Toplevel ) {
this.Build();
}
diff --git a/Mundus/Views/Windows/MusicWindow.cs b/Mundus/Views/Windows/MusicWindow.cs
index bc1226d..1dd8904 100644
--- a/Mundus/Views/Windows/MusicWindow.cs
+++ b/Mundus/Views/Windows/MusicWindow.cs
@@ -1,7 +1,6 @@
using System;
using System.Media;
using Gtk;
-using System.Linq;
namespace Mundus.Views.Windows {
public partial class MusicWindow : Gtk.Window {
diff --git a/Mundus/Views/Windows/NewGameWindow.cs b/Mundus/Views/Windows/NewGameWindow.cs
index beed05a..abce12d 100644
--- a/Mundus/Views/Windows/NewGameWindow.cs
+++ b/Mundus/Views/Windows/NewGameWindow.cs
@@ -1,8 +1,6 @@
using System;
using Gtk;
-using Mundus.Models;
-using Mundus.Controllers.Map;
-using Mundus.Views.Windows.Interfaces;
+using Mundus.Service;
namespace Mundus.Views.Windows {
public partial class NewGameWindow : Gtk.Window {
@@ -16,8 +14,7 @@ namespace Mundus.Views.Windows {
}
private void OnBtnBackClicked(object sender, EventArgs e) {
- this.Hide();
- WI.WMain.Show();
+ WindowController.ShowMainWindow(this);
}
//You can choose your Map size only in creative, it is predetermined by screen & inventory size in survival.
@@ -78,7 +75,7 @@ namespace Mundus.Views.Windows {
}
private void OnBtnGenerateClicked(object sender, EventArgs e) {
- //TODO: add settings to a model
+ //TODO: save settings somewhere
this.Hide();
this.MapGenerate();
@@ -86,43 +83,40 @@ namespace Mundus.Views.Windows {
}
private void MapGenerate() {
+ string size;
if (rbMSmall.Active) {
- MapSizes.CurrSize = MapSizes.SMALL;
+ size = "small";
}
else if (rbMMedium.Active) {
- MapSizes.CurrSize = MapSizes.MEDIUM;
+ size = "medium";
}
else if (rbMLarge.Active) {
- MapSizes.CurrSize = MapSizes.LARGE;
+ size = "large";
}
else {
throw new ArgumentException("No map size was selected");
}
-
- //Add the other layers
- LandSuperLayerGenerator.GenerateAllLayers( MapSizes.CurrSize );
+ GameGenerator.GenerateMap(size);
}
//Does the inital steps that are required by all windows upon game generation
private void ScreenInventorySetup() {
- IGameWindow gameWindow;
+ string gameWindow;
if (rbSmall.Active) {
- gameWindow = WI.WSGame;
+ gameWindow = "small";
}
else if (rbMedium.Active) {
- gameWindow = WI.WMGame;
+ gameWindow = "medium";
}
else if (rbLarge.Active) {
- gameWindow = WI.WLGame;
+ gameWindow = "large";
}
else {
throw new ArgumentException("No screen & inventory size was selected");
}
- gameWindow.SetDefaults();
- gameWindow.PrintScreen();
- gameWindow.Show();
+ GameGenerator.GameWindowInventorySetup(gameWindow);
}
}
}
diff --git a/Mundus/Views/Windows/PauseWindow.cs b/Mundus/Views/Windows/PauseWindow.cs
index 0e55902..942bbdc 100644
--- a/Mundus/Views/Windows/PauseWindow.cs
+++ b/Mundus/Views/Windows/PauseWindow.cs
@@ -1,7 +1,6 @@
using System;
using Gtk;
-using Mundus.Models;
-using Mundus.Views.Windows.Interfaces;
+using Mundus.Service;
namespace Mundus.Views.Windows {
public partial class PauseWindow : Gtk.Window {
@@ -17,13 +16,12 @@ namespace Mundus.Views.Windows {
}
protected void OnBtnBackClicked(object sender, EventArgs e) {
- //TODO: resume game cycle
+ WindowController.PauseWindowVisible = false;
this.Hide();
}
protected void OnBtnSettingsClicked(object sender, EventArgs e) {
- this.Hide();
- WI.WSettings.Show(this);
+ WindowController.ShowSettingsWindow(this);
}
protected void OnBtnSaveClicked(object sender, EventArgs e) {
diff --git a/Mundus/Views/Windows/SettingsWindow.cs b/Mundus/Views/Windows/SettingsWindow.cs
index 793ecde..3877845 100644
--- a/Mundus/Views/Windows/SettingsWindow.cs
+++ b/Mundus/Views/Windows/SettingsWindow.cs
@@ -1,6 +1,5 @@
using System;
using Gtk;
-using Mundus.Models;
namespace Mundus.Views.Windows {
public partial class SettingsWindow : Gtk.Window {
diff --git a/Mundus/Views/Windows/SmallGameWindow.cs b/Mundus/Views/Windows/SmallGameWindow.cs
index e57a30e..c4668ed 100644
--- a/Mundus/Views/Windows/SmallGameWindow.cs
+++ b/Mundus/Views/Windows/SmallGameWindow.cs
@@ -1,18 +1,14 @@
using System;
using Gtk;
-using Mundus.Models;
-using Mundus.Models.Tiles;
-using Mundus.Models.SuperLayers;
-using Mundus.Views.Windows.Interfaces;
-using Mundus.Models.Mobs.Land_Mobs;
-using Mundus.Controllers.Mob;
-using System.ComponentModel;
+using Mundus.Service;
+using Mundus.Service.Mobs;
+using Mundus.Service.SuperLayers;
namespace Mundus.Views.Windows {
public partial class SmallGameWindow : Gtk.Window, IGameWindow {
- /*Constant for the height and width of the game screen, map screens and inventory screen
+ /*Value for the height and width of the game screen, map screens and inventory screen
*and the width of stats, hotbar, accessories, gear & items on the ground menus*/
- public const int SIZE = 5;
+ public int Size { get; private set; }
public SmallGameWindow() : base( Gtk.WindowType.Toplevel ) {
this.Build();
@@ -20,35 +16,34 @@ namespace Mundus.Views.Windows {
public void OnDeleteEvent(object o, Gtk.DeleteEventArgs args) {
//Open exit dialogue if you haven't saved in a while
- if (false) { //TODO: check if you have saved
- //TODO: pause game cycle
-
- ResponseType rt = (ResponseType)DI.DExit.Run();
- DI.DExit.Hide();
-
- if(rt == ResponseType.Cancel || rt == ResponseType.DeleteEvent) {
- //cancel the exit procedure and keep the window open
- args.RetVal = true;
- return;
- }
- else if (rt == ResponseType.Accept) {
- //TODO: call code for saving the game
- }
- }
+ //if () { //TODO: check if you have saved
+ // //TODO: pause game cycle
+
+ // ResponseType rt = (ResponseType)DI.DExit.Run();
+ // DI.DExit.Hide();
+
+ // if(rt == ResponseType.Cancel || rt == ResponseType.DeleteEvent) {
+ // //cancel the exit procedure and keep the window open
+ // args.RetVal = true;
+ // return;
+ // }
+ // else if (rt == ResponseType.Accept) {
+ // //TODO: call code for saving the game
+ // }
+ //}
Application.Quit();
}
public void SetDefaults() {
+ this.Size = 5;
this.SetMapMenuVisibility(false);
this.SetInvMenuVisibility(false);
- WI.WPause.GameWindow = this;
-
}
protected void OnBtnPauseClicked(object sender, EventArgs e) {
//TODO: add code that stops (pauses) game cycle
- WI.WPause.Show();
+ WindowController.ShowPauseWindow();
}
protected void OnBtnMapClicked(object sender, EventArgs e) {
@@ -211,36 +206,16 @@ namespace Mundus.Views.Windows {
}
protected void OnBtnMusicClicked(object sender, EventArgs e) {
- WI.WMusic.Show();
+ WindowController.ShowMusicWindow();
}
public void PrintScreen() {
- ISuperLayer superLayer = LMI.Player.CurrSuperLayer;
-
- for(int i = 0; i < 3; i++) {
- int btn = 1;
- for (int row = this.CalculateStartY(), maxY = this.CalculateMaxY(); row <= maxY; row++) {
- for (int col = this.CalculateStartX(), maxX = this.CalculateMaxX(); col <= maxX; col++, btn++) {
- //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
- Image img = new Image();
-
- if (i == 0) {
- if (superLayer.GetGroundLayerTile( row, col ) == null) {
- img = new Image( "blank", IconSize.Dnd );
- }
- else {
- img = new Image( superLayer.GetGroundLayerTile( row, col ).stock_id, IconSize.Dnd );
- }
- }
- else if (i == 1) {
- if (superLayer.GetItemLayerTile( row, col ) == null) continue;
- img = new Image( superLayer.GetItemLayerTile( row, col ).stock_id, IconSize.Dnd );
- }
- else {
- if (superLayer.GetMobLayerTile( row, col ) == null) continue;
- img = new Image( superLayer.GetMobLayerTile( row, col ).stock_id, IconSize.Dnd );
- }
+ for(int layer = 0; layer < 3; layer++) {
+ for (int row = Calculate.CalculateStartY(Size), maxY = Calculate.CalculateMaxY(Size), btn = 1; row <= maxY; row++) {
+ for (int col = Calculate.CalculateStartX(Size), maxX = Calculate.CalculateMaxX(Size); col <= maxX; col++, btn++) {
+ Image img = ImageController.GetScreenImage(row, col, layer);
+
+ if (img == null) continue;
switch (btn) {
case 1: btnP1.Image = img; break;
@@ -275,25 +250,10 @@ namespace Mundus.Views.Windows {
}
public void PrintMap() {
- //TODO: get the superlayer that the player is in
- ISuperLayer superLayer = LI.Land;
-
- string sName;
-
//Prints the "Ground layer" in map menu
- int img = 1;
- for (int row = this.CalculateStartY(), maxY = this.CalculateMaxY(); row <= maxY; row++) {
- for (int col = this.CalculateStartX(), maxX = this.CalculateMaxX(); col <= maxX; col++, img++) {
- //Print a tile if it exists, otherwise print the "blank" icon
- if (row < 0 || col < 0 || col >= MapSizes.CurrSize || row >= MapSizes.CurrSize) {
- sName = "blank";
- }
- else if (superLayer.GetGroundLayerTile( row, col ) == null) {
- sName = "blank";
- }
- else {
- sName = superLayer.GetGroundLayerTile( row, col ).stock_id;
- }
+ for (int row = Calculate.CalculateStartY(Size), maxY = Calculate.CalculateMaxY(Size), img = 1; row <= maxY; row++) {
+ for (int col = Calculate.CalculateStartX(Size), maxX = Calculate.CalculateMaxX(Size); col <= maxX; col++, img++) {
+ string sName = ImageController.GetGroundImage(row, col).Stock;
switch (img) {
case 1: imgG1.SetFromStock( sName, IconSize.Dnd ); break;
@@ -326,19 +286,9 @@ namespace Mundus.Views.Windows {
}
//Prints the "Item layer" in map menu
- img = 1;
- for (int row = this.CalculateStartY(), maxY = this.CalculateMaxY(); row <= maxY; row++) {
- for (int col = this.CalculateStartX(), maxX = this.CalculateMaxX(); col <= maxX; col++, img++) {
- //Print a tile if it exists, otherwise print the "blank" icon
- if (row < 0 || col < 0 || col >= MapSizes.CurrSize || row >= MapSizes.CurrSize) {
- sName = "blank";
- }
- else if (superLayer.GetItemLayerTile( row, col ) == null) {
- sName = "blank";
- }
- else {
- sName = superLayer.GetItemLayerTile( row, col ).stock_id;
- }
+ for (int row = Calculate.CalculateStartY(Size), maxY = Calculate.CalculateMaxY(Size), img = 1; row <= maxY; row++) {
+ for (int col = Calculate.CalculateStartX(Size), maxX = Calculate.CalculateMaxX(Size); col <= maxX; col++, img++) {
+ string sName = ImageController.GetItemImage(row, col).Stock;
switch (img) {
case 1: imgI1.SetFromStock( sName, IconSize.Dnd ); break;
@@ -372,125 +322,220 @@ namespace Mundus.Views.Windows {
}
public void PrintInventory() {
+ //Prints hotbar
+ for (int i = 0; i < Size; i++) {
+ Image img = ImageController.GetHotbarImage(i);
+
+ switch (i + 1) {
+ case 1: btnH1.Image = img; break;
+ case 2: btnH2.Image = img; break;
+ case 3: btnH3.Image = img; break;
+ case 4: btnH4.Image = img; break;
+ case 5: btnH5.Image = img; break;
+ }
+ }
- }
+ //Prints the actual inventory (items)
+ for (int row = 0; row < Size; row++) {
+ for (int col = 0; col < Size; col++) {
+ Image img = ImageController.GetInventoryItemImage(row * 5 + col);
+
+ switch (row * 5 + col + 1) {
+ case 1: btnI1.Image = img; break;
+ case 2: btnI2.Image = img; break;
+ case 3: btnI3.Image = img; break;
+ case 4: btnI4.Image = img; break;
+ case 5: btnI5.Image = img; break;
+ case 6: btnI6.Image = img; break;
+ case 7: btnI7.Image = img; break;
+ case 8: btnI8.Image = img; break;
+ case 9: btnI9.Image = img; break;
+ case 10: btnI10.Image = img; break;
+ case 11: btnI11.Image = img; break;
+ case 12: btnI12.Image = img; break;
+ case 13: btnI13.Image = img; break;
+ case 14: btnI14.Image = img; break;
+ case 15: btnI15.Image = img; break;
+ case 16: btnI16.Image = img; break;
+ case 17: btnI17.Image = img; break;
+ case 18: btnI18.Image = img; break;
+ case 19: btnI19.Image = img; break;
+ case 20: btnI20.Image = img; break;
+ case 21: btnI21.Image = img; break;
+ case 22: btnI22.Image = img; break;
+ case 23: btnI23.Image = img; break;
+ case 24: btnI24.Image = img; break;
+ case 25: btnI25.Image = img; break;
+ }
+ }
+ }
- protected void OnBtnH1Clicked(object sender, EventArgs e) {
- this.PrintScreen();
+ //Prints accessories
+ for (int row = 0; row < 2; row++) {
+ for (int col = 0; col < Size; col++) {
+ Image img = ImageController.GetAccessoryImage(row * 5 + col);
+
+ switch (row * 5 + col + 1) {
+ case 1: btnA1.Image = img; break;
+ case 2: btnA2.Image = img; break;
+ case 3: btnA3.Image = img; break;
+ case 4: btnA4.Image = img; break;
+ case 5: btnA5.Image = img; break;
+ case 6: btnA6.Image = img; break;
+ case 7: btnA7.Image = img; break;
+ case 8: btnA8.Image = img; break;
+ case 9: btnA9.Image = img; break;
+ case 10: btnA10.Image = img; break;
+ }
+ }
+ }
+
+ //Prints gear
+ for (int i = 0; i < Size; i++) {
+ Image img = ImageController.GetGearImage(i);
+
+ switch (i + 1) {
+ case 1: btnG1.Image = img; break;
+ case 2: btnG2.Image = img; break;
+ case 3: btnG3.Image = img; break;
+ case 4: btnG4.Image = img; break;
+ case 5: btnG5.Image = img; break;
+ }
+ }
}
+ //Screen buttons
protected void OnBtnP1Clicked(object sender, EventArgs e) {
- ChangePosition(1);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(1);
+ }
}
-
protected void OnBtnP2Clicked(object sender, EventArgs e) {
- ChangePosition(2);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(2);
+ }
}
-
protected void OnBtnP3Clicked(object sender, EventArgs e) {
- ChangePosition(3);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(3);
+ }
}
-
protected void OnBtnP4Clicked(object sender, EventArgs e) {
- ChangePosition(4);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(4);
+ }
}
-
protected void OnBtnP5Clicked(object sender, EventArgs e) {
- ChangePosition(5);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(5);
+ }
}
-
protected void OnBtnP6Clicked(object sender, EventArgs e) {
- ChangePosition(6);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(6);
+ }
}
-
protected void OnBtnP7Clicked(object sender, EventArgs e) {
- ChangePosition(7);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(7);
+ }
}
-
protected void OnBtnP8Clicked(object sender, EventArgs e) {
- ChangePosition(8);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(8);
+ }
}
-
protected void OnBtnP9Clicked(object sender, EventArgs e) {
- ChangePosition(9);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(9);
+ }
}
-
protected void OnBtnP10Clicked(object sender, EventArgs e) {
- ChangePosition(10);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(10);
+ }
}
-
protected void OnBtnP11Clicked(object sender, EventArgs e) {
- ChangePosition(11);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(11);
+ }
}
-
protected void OnBtnP12Clicked(object sender, EventArgs e) {
- ChangePosition(12);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(12);
+ }
}
-
protected void OnBtnP13Clicked(object sender, EventArgs e) {
- ChangePosition(13);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(13);
+ }
}
-
protected void OnBtnP14Clicked(object sender, EventArgs e) {
- ChangePosition(14);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(14);
+ }
}
-
protected void OnBtnP15Clicked(object sender, EventArgs e) {
- ChangePosition(15);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(15);
+ }
}
-
protected void OnBtnP16Clicked(object sender, EventArgs e) {
- ChangePosition(16);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(16);
+ }
}
-
protected void OnBtnP17Clicked(object sender, EventArgs e) {
- ChangePosition(17);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(17);
+ }
}
-
protected void OnBtnP18Clicked(object sender, EventArgs e) {
- ChangePosition(18);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(18);
+ }
}
-
protected void OnBtnP19Clicked(object sender, EventArgs e) {
- ChangePosition(19);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(19);
+ }
}
-
protected void OnBtnP20Clicked(object sender, EventArgs e) {
- ChangePosition(20);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(20);
+ }
}
-
protected void OnBtnP21Clicked(object sender, EventArgs e) {
- ChangePosition(21);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(21);
+ }
}
-
protected void OnBtnP22Clicked(object sender, EventArgs e) {
- ChangePosition(22);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(22);
+ }
}
-
protected void OnBtnP23Clicked(object sender, EventArgs e) {
- ChangePosition(23);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(23);
+ }
}
-
protected void OnBtnP24Clicked(object sender, EventArgs e) {
- ChangePosition(24);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(24);
+ }
}
-
protected void OnBtnP25Clicked(object sender, EventArgs e) {
- ChangePosition(25);
+ if (!WindowController.PauseWindowVisible) {
+ ChangePosition(25);
+ }
}
private void ChangePosition(int button) {
int buttonYPos = (button - 1) / 5;
int buttonXPos = button - buttonYPos * 5 - 1;
- 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 newXPos = (LMI.Player.XPos - 2 >= 0) ? LMI.Player.XPos - 2 + buttonXPos : buttonXPos;
- if (LMI.Player.XPos > MapSizes.CurrSize - 3) newXPos = buttonXPos + MapSizes.CurrSize - SIZE;
-
- if (newYPos >= 0 && newXPos >= 0 && newYPos < MapSizes.CurrSize && newXPos < MapSizes.CurrSize) {
- MobMoving.MoveMob( LMI.Player, newYPos, newXPos );
- }
+ MobMoving.MovePlayer(buttonYPos, buttonXPos, Size);
this.PrintScreen();
if (this.MapMenuIsVisible()) {
@@ -498,30 +543,297 @@ namespace Mundus.Views.Windows {
}
}
- /*Depending on whether you are on the edge of the map or in the center, the screen renders a bit differently.
- *On the edge it doesn't follow the player and only shows the corner "chunk". In the other parts it follows the
- *the player, making sure he stays in the center of the screen.
- *This means that when the player is followed, rendered part of the map depend on the player position, but when
- *he isn't, it depends on the screen and map sizes.*/
- private int CalculateMaxY() {
- int maxY = (LMI.Player.YPos - 2 >= 0) ? LMI.Player.YPos + 2 : SIZE - 1;
- if (maxY >= MapSizes.CurrSize) maxY = MapSizes.CurrSize - 1;
- return maxY;
+ //Hotbar buttons
+ protected void OnBtnH1Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("hotbar", 0);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnH2Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("hotbar", 1);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnH3Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("hotbar", 2);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnH4Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("hotbar", 3);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnH5Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("hotbar", 4);
+ this.PrintInventory();
+ }
+ }
+
+ //Inventory (items) buttons
+ protected void OnBtnI1Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 0);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI2Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 1);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI3Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 2);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI4Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 3);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI5Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 4);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI6Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 5);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI7Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 6);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI8Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 7);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI9Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 8);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI10Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 9);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI11Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 10);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI12Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 11);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI13Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 12);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI14Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 13);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI15Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 14);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI16Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 15);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI17Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 16);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI18Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 17);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI19Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 18);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI20Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 19);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI21Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 20);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI22Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 21);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI23Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 22);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI24Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 23);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnI25Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("items", 24);
+ this.PrintInventory();
+ }
+ }
+
+ //Accessories buttons
+ protected void OnBtnA1Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 0);
+ this.PrintInventory();
+ }
}
- private int CalculateStartY() {
- int startY = (LMI.Player.YPos - 2 <= MapSizes.CurrSize - SIZE) ? LMI.Player.YPos - 2 : MapSizes.CurrSize - SIZE;
- if (startY < 0) startY = 0;
- return startY;
+ protected void OnBtnA2Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 1);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnA3Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 2);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnA4Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 3);
+ this.PrintInventory();
+ }
}
- private int CalculateMaxX() {
- int maxX = (LMI.Player.XPos - 2 >= 0) ? LMI.Player.XPos + 2 : SIZE - 1;
- if (maxX >= MapSizes.CurrSize) maxX = MapSizes.CurrSize - 1;
- return maxX;
+ protected void OnBtnA5Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 4);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnA6Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 5);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnA7Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 6);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnA8Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 7);
+ this.PrintInventory();
+ }
+ }
+ protected void OnBtnA9Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 8);
+ this.PrintInventory();
+ }
}
- private int CalculateStartX() {
- int startX = (LMI.Player.XPos - 2 <= MapSizes.CurrSize - SIZE) ? LMI.Player.XPos - 2 : MapSizes.CurrSize - SIZE;
- if (startX < 0) startX = 0;
- return startX;
+ protected void OnBtnA10Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("accessories", 9);
+ this.PrintInventory();
+ }
+ }
+
+ //Gear buttons
+ protected void OnBtnG1Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("gear", 0);
+ this.PrintInventory();
+ }
+ }
+
+ protected void OnBtnG2Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("gear", 1);
+ this.PrintInventory();
+ }
+ }
+
+ protected void OnBtnG3Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("gear", 2);
+ this.PrintInventory();
+ }
+ }
+
+ protected void OnBtnG4Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("gear", 3);
+ this.PrintInventory();
+ }
+ }
+
+ protected void OnBtnG5Clicked(object sender, EventArgs e) {
+ if (!WindowController.PauseWindowVisible) {
+ this.SelectItem("gear", 4);
+ this.PrintInventory();
+ }
+ }
+
+
+ private void SelectItem(string place, int position) {
+ if (SwitchItems.HasOrigin()) {
+ SwitchItems.ReplaceItems(place, position);
+ } else {
+ SwitchItems.SetOrigin(place, position);
+ }
+
+ this.PrintInventory();
}
}
}
diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.MusicWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.MusicWindow.cs
index 90238a1..04e5edd 100644
--- a/Mundus/gtk-gui/Mundus.Views.Windows.MusicWindow.cs
+++ b/Mundus/gtk-gui/Mundus.Views.Windows.MusicWindow.cs
@@ -40,6 +40,7 @@ namespace Mundus.Views.Windows
global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default");
this.UIManager.InsertActionGroup(w1, 0);
this.AddAccelGroup(this.UIManager.AccelGroup);
+ this.HeightRequest = 600;
this.Name = "Mundus.Views.Windows.MusicWindow";
this.Title = global::Mono.Unix.Catalog.GetString("MusicWindow");
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
@@ -173,7 +174,6 @@ namespace Mundus.Views.Windows
this.lblBlank1.WidthRequest = 5;
this.lblBlank1.HeightRequest = 50;
this.lblBlank1.Name = "lblBlank1";
- this.lblBlank1.LabelProp = "";
this.tbUI.Add(this.lblBlank1);
global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank1]));
w10.XOptions = ((global::Gtk.AttachOptions)(4));
@@ -183,7 +183,6 @@ namespace Mundus.Views.Windows
this.lblBlank2.WidthRequest = 5;
this.lblBlank2.HeightRequest = 50;
this.lblBlank2.Name = "lblBlank2";
- this.lblBlank2.LabelProp = "";
this.tbUI.Add(this.lblBlank2);
global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank2]));
w11.LeftAttach = ((uint)(6));
@@ -222,7 +221,7 @@ namespace Mundus.Views.Windows
this.Child.ShowAll();
}
this.DefaultWidth = 406;
- this.DefaultHeight = 549;
+ this.DefaultHeight = 600;
this.Show();
this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.fcMusic.SelectionChanged += new global::System.EventHandler(this.OnFcMusicSelectionChanged);
diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs
index a6b7187..f9559ad 100644
--- a/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs
+++ b/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs
@@ -246,6 +246,7 @@ namespace Mundus.Views.Windows
this.rbCreative.WidthRequest = 90;
this.rbCreative.CanFocus = true;
this.rbCreative.Name = "rbCreative";
+ this.rbCreative.Active = true;
this.rbCreative.DrawIndicator = true;
this.rbCreative.UseUnderline = true;
this.rbCreative.Group = new global::GLib.SList(global::System.IntPtr.Zero);
@@ -262,6 +263,7 @@ namespace Mundus.Views.Windows
this.rbEasy.WidthRequest = 90;
this.rbEasy.CanFocus = true;
this.rbEasy.Name = "rbEasy";
+ this.rbEasy.Active = true;
this.rbEasy.DrawIndicator = true;
this.rbEasy.UseUnderline = true;
this.rbEasy.Group = new global::GLib.SList(global::System.IntPtr.Zero);
@@ -310,6 +312,7 @@ namespace Mundus.Views.Windows
this.rbLarge.WidthRequest = 90;
this.rbLarge.CanFocus = true;
this.rbLarge.Name = "rbLarge";
+ this.rbLarge.Active = true;
this.rbLarge.DrawIndicator = true;
this.rbLarge.UseUnderline = true;
this.rbLarge.Group = new global::GLib.SList(global::System.IntPtr.Zero);
@@ -341,6 +344,7 @@ namespace Mundus.Views.Windows
this.rbMLarge = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("Large"));
this.rbMLarge.CanFocus = true;
this.rbMLarge.Name = "rbMLarge";
+ this.rbMLarge.Active = true;
this.rbMLarge.DrawIndicator = true;
this.rbMLarge.UseUnderline = true;
this.rbMLarge.Group = new global::GLib.SList(global::System.IntPtr.Zero);
diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs
index f036d61..cbfd583 100644
--- a/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs
+++ b/Mundus/gtk-gui/Mundus.Views.Windows.SettingsWindow.cs
@@ -67,7 +67,6 @@ namespace Mundus.Views.Windows
this.lblBlank1 = new global::Gtk.Label();
this.lblBlank1.WidthRequest = 40;
this.lblBlank1.Name = "lblBlank1";
- this.lblBlank1.LabelProp = "";
this.tbUI.Add(this.lblBlank1);
global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank1]));
w3.LeftAttach = ((uint)(2));
@@ -78,7 +77,6 @@ namespace Mundus.Views.Windows
this.lblBlank2 = new global::Gtk.Label();
this.lblBlank2.WidthRequest = 40;
this.lblBlank2.Name = "lblBlank2";
- this.lblBlank2.LabelProp = "";
this.tbUI.Add(this.lblBlank2);
global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank2]));
w4.LeftAttach = ((uint)(4));
@@ -89,7 +87,6 @@ namespace Mundus.Views.Windows
this.lblBlank3 = new global::Gtk.Label();
this.lblBlank3.WidthRequest = 40;
this.lblBlank3.Name = "lblBlank3";
- this.lblBlank3.LabelProp = "";
this.tbUI.Add(this.lblBlank3);
global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank3]));
w5.LeftAttach = ((uint)(5));
@@ -101,7 +98,6 @@ namespace Mundus.Views.Windows
this.lblBlank4.WidthRequest = 5;
this.lblBlank4.HeightRequest = 50;
this.lblBlank4.Name = "lblBlank4";
- this.lblBlank4.LabelProp = "";
this.tbUI.Add(this.lblBlank4);
global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank4]));
w6.XOptions = ((global::Gtk.AttachOptions)(4));
@@ -111,7 +107,6 @@ namespace Mundus.Views.Windows
this.lblBlank5.WidthRequest = 5;
this.lblBlank5.HeightRequest = 50;
this.lblBlank5.Name = "lblBlank5";
- this.lblBlank5.LabelProp = "";
this.tbUI.Add(this.lblBlank5);
global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblBlank5]));
w7.LeftAttach = ((uint)(6));
diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs
index 2d73b26..7338701 100644
--- a/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs
+++ b/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs
@@ -2937,7 +2937,51 @@ namespace Mundus.Views.Windows
this.btnMusic.Clicked += new global::System.EventHandler(this.OnBtnMusicClicked);
this.btnMap.Clicked += new global::System.EventHandler(this.OnBtnMapClicked);
this.btnInv.Clicked += new global::System.EventHandler(this.OnBtnInvClicked);
+ this.btnI9.Clicked += new global::System.EventHandler(this.OnBtnI9Clicked);
+ this.btnI8.Clicked += new global::System.EventHandler(this.OnBtnI8Clicked);
+ this.btnI7.Clicked += new global::System.EventHandler(this.OnBtnI7Clicked);
+ this.btnI6.Clicked += new global::System.EventHandler(this.OnBtnI6Clicked);
+ this.btnI5.Clicked += new global::System.EventHandler(this.OnBtnI5Clicked);
+ this.btnI4.Clicked += new global::System.EventHandler(this.OnBtnI4Clicked);
+ this.btnI3.Clicked += new global::System.EventHandler(this.OnBtnI3Clicked);
+ this.btnI25.Clicked += new global::System.EventHandler(this.OnBtnI25Clicked);
+ this.btnI24.Clicked += new global::System.EventHandler(this.OnBtnI24Clicked);
+ this.btnI23.Clicked += new global::System.EventHandler(this.OnBtnI23Clicked);
+ this.btnI22.Clicked += new global::System.EventHandler(this.OnBtnI22Clicked);
+ this.btnI21.Clicked += new global::System.EventHandler(this.OnBtnI21Clicked);
+ this.btnI20.Clicked += new global::System.EventHandler(this.OnBtnI20Clicked);
+ this.btnI2.Clicked += new global::System.EventHandler(this.OnBtnI2Clicked);
+ this.btnI19.Clicked += new global::System.EventHandler(this.OnBtnI19Clicked);
+ this.btnI18.Clicked += new global::System.EventHandler(this.OnBtnI18Clicked);
+ this.btnI17.Clicked += new global::System.EventHandler(this.OnBtnI17Clicked);
+ this.btnI16.Clicked += new global::System.EventHandler(this.OnBtnI16Clicked);
+ this.btnI15.Clicked += new global::System.EventHandler(this.OnBtnI15Clicked);
+ this.btnI14.Clicked += new global::System.EventHandler(this.OnBtnI14Clicked);
+ this.btnI13.Clicked += new global::System.EventHandler(this.OnBtnI13Clicked);
+ this.btnI12.Clicked += new global::System.EventHandler(this.OnBtnI12Clicked);
+ this.btnI11.Clicked += new global::System.EventHandler(this.OnBtnI11Clicked);
+ this.btnI10.Clicked += new global::System.EventHandler(this.OnBtnI10Clicked);
+ this.btnI1.Clicked += new global::System.EventHandler(this.OnBtnI1Clicked);
+ this.btnH5.Clicked += new global::System.EventHandler(this.OnBtnH5Clicked);
+ this.btnH4.Clicked += new global::System.EventHandler(this.OnBtnH4Clicked);
+ this.btnH3.Clicked += new global::System.EventHandler(this.OnBtnH3Clicked);
+ this.btnH2.Clicked += new global::System.EventHandler(this.OnBtnH2Clicked);
this.btnH1.Clicked += new global::System.EventHandler(this.OnBtnH1Clicked);
+ this.btnG5.Clicked += new global::System.EventHandler(this.OnBtnG5Clicked);
+ this.btnG4.Clicked += new global::System.EventHandler(this.OnBtnG4Clicked);
+ this.btnG3.Clicked += new global::System.EventHandler(this.OnBtnG3Clicked);
+ this.btnG2.Clicked += new global::System.EventHandler(this.OnBtnG2Clicked);
+ this.btnG1.Clicked += new global::System.EventHandler(this.OnBtnG1Clicked);
+ this.btnA9.Clicked += new global::System.EventHandler(this.OnBtnA9Clicked);
+ this.btnA8.Clicked += new global::System.EventHandler(this.OnBtnA8Clicked);
+ this.btnA7.Clicked += new global::System.EventHandler(this.OnBtnA7Clicked);
+ this.btnA6.Clicked += new global::System.EventHandler(this.OnBtnA6Clicked);
+ this.btnA5.Clicked += new global::System.EventHandler(this.OnBtnA5Clicked);
+ this.btnA4.Clicked += new global::System.EventHandler(this.OnBtnA4Clicked);
+ this.btnA3.Clicked += new global::System.EventHandler(this.OnBtnA3Clicked);
+ this.btnA2.Clicked += new global::System.EventHandler(this.OnBtnA2Clicked);
+ this.btnA10.Clicked += new global::System.EventHandler(this.OnBtnA10Clicked);
+ this.btnA1.Clicked += new global::System.EventHandler(this.OnBtnA1Clicked);
}
}
}
diff --git a/Mundus/gtk-gui/gui.stetic b/Mundus/gtk-gui/gui.stetic
index 2ddfeb3..d103fc5 100644
--- a/Mundus/gtk-gui/gui.stetic
+++ b/Mundus/gtk-gui/gui.stetic
@@ -389,7 +389,6 @@
<property name="WidthRequest">90</property>
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Creative</property>
- <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -418,7 +417,6 @@
<property name="WidthRequest">90</property>
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Easy</property>
- <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -500,7 +498,6 @@
<property name="WidthRequest">90</property>
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Large</property>
- <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -556,7 +553,6 @@
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Large</property>
- <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -1200,6 +1196,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA1Clicked" />
</widget>
<packing>
<property name="TopAttach">8</property>
@@ -1226,6 +1223,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA10Clicked" />
</widget>
<packing>
<property name="TopAttach">9</property>
@@ -1252,6 +1250,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA2Clicked" />
</widget>
<packing>
<property name="TopAttach">8</property>
@@ -1278,6 +1277,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA3Clicked" />
</widget>
<packing>
<property name="TopAttach">8</property>
@@ -1304,6 +1304,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA4Clicked" />
</widget>
<packing>
<property name="TopAttach">8</property>
@@ -1330,6 +1331,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA5Clicked" />
</widget>
<packing>
<property name="TopAttach">8</property>
@@ -1356,6 +1358,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA6Clicked" />
</widget>
<packing>
<property name="TopAttach">9</property>
@@ -1382,6 +1385,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA7Clicked" />
</widget>
<packing>
<property name="TopAttach">9</property>
@@ -1408,6 +1412,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA8Clicked" />
</widget>
<packing>
<property name="TopAttach">9</property>
@@ -1434,6 +1439,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnA9Clicked" />
</widget>
<packing>
<property name="TopAttach">9</property>
@@ -1460,6 +1466,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnG1Clicked" />
</widget>
<packing>
<property name="TopAttach">11</property>
@@ -1486,6 +1493,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnG2Clicked" />
</widget>
<packing>
<property name="TopAttach">11</property>
@@ -1512,6 +1520,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnG3Clicked" />
</widget>
<packing>
<property name="TopAttach">11</property>
@@ -1538,6 +1547,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnG4Clicked" />
</widget>
<packing>
<property name="TopAttach">11</property>
@@ -1564,6 +1574,7 @@
<property name="Type">TextAndIcon</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
+ <signal name="Clicked" handler="OnBtnG5Clicked" />
</widget>
<packing>
<property name="TopAttach">11</property>
@@ -1697,6 +1708,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnH2Clicked" />
</widget>
<packing>
<property name="TopAttach">10</property>
@@ -1724,6 +1736,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnH3Clicked" />
</widget>
<packing>
<property name="TopAttach">10</property>
@@ -1751,6 +1764,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnH4Clicked" />
</widget>
<packing>
<property name="TopAttach">10</property>
@@ -1778,6 +1792,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnH5Clicked" />
</widget>
<packing>
<property name="TopAttach">10</property>
@@ -1805,6 +1820,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI1Clicked" />
</widget>
<packing>
<property name="TopAttach">1</property>
@@ -1832,6 +1848,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI10Clicked" />
</widget>
<packing>
<property name="TopAttach">2</property>
@@ -1859,6 +1876,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI11Clicked" />
</widget>
<packing>
<property name="TopAttach">3</property>
@@ -1886,6 +1904,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI12Clicked" />
</widget>
<packing>
<property name="TopAttach">3</property>
@@ -1913,6 +1932,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI13Clicked" />
</widget>
<packing>
<property name="TopAttach">3</property>
@@ -1940,6 +1960,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI14Clicked" />
</widget>
<packing>
<property name="TopAttach">3</property>
@@ -1967,6 +1988,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI15Clicked" />
</widget>
<packing>
<property name="TopAttach">3</property>
@@ -1994,6 +2016,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI16Clicked" />
</widget>
<packing>
<property name="TopAttach">4</property>
@@ -2021,6 +2044,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI17Clicked" />
</widget>
<packing>
<property name="TopAttach">4</property>
@@ -2048,6 +2072,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI18Clicked" />
</widget>
<packing>
<property name="TopAttach">4</property>
@@ -2075,6 +2100,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI19Clicked" />
</widget>
<packing>
<property name="TopAttach">4</property>
@@ -2102,6 +2128,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI2Clicked" />
</widget>
<packing>
<property name="TopAttach">1</property>
@@ -2129,6 +2156,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI20Clicked" />
</widget>
<packing>
<property name="TopAttach">4</property>
@@ -2156,6 +2184,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI21Clicked" />
</widget>
<packing>
<property name="TopAttach">5</property>
@@ -2183,6 +2212,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI22Clicked" />
</widget>
<packing>
<property name="TopAttach">5</property>
@@ -2210,6 +2240,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI23Clicked" />
</widget>
<packing>
<property name="TopAttach">5</property>
@@ -2237,6 +2268,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI24Clicked" />
</widget>
<packing>
<property name="TopAttach">5</property>
@@ -2264,6 +2296,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI25Clicked" />
</widget>
<packing>
<property name="TopAttach">5</property>
@@ -2291,6 +2324,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI3Clicked" />
</widget>
<packing>
<property name="TopAttach">1</property>
@@ -2318,6 +2352,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI4Clicked" />
</widget>
<packing>
<property name="TopAttach">1</property>
@@ -2345,6 +2380,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI5Clicked" />
</widget>
<packing>
<property name="TopAttach">1</property>
@@ -2372,6 +2408,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI6Clicked" />
</widget>
<packing>
<property name="TopAttach">2</property>
@@ -2399,6 +2436,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI7Clicked" />
</widget>
<packing>
<property name="TopAttach">2</property>
@@ -2426,6 +2464,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI8Clicked" />
</widget>
<packing>
<property name="TopAttach">2</property>
@@ -2453,6 +2492,7 @@
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<property name="Relief">Half</property>
+ <signal name="Clicked" handler="OnBtnI9Clicked" />
</widget>
<packing>
<property name="TopAttach">2</property>
@@ -5682,9 +5722,10 @@
<placeholder />
</child>
</widget>
- <widget class="Gtk.Window" id="Mundus.Views.Windows.MusicWindow" design-size="406 549">
+ <widget class="Gtk.Window" id="Mundus.Views.Windows.MusicWindow" design-size="406 600">
<action-group name="Default" />
<property name="MemberName" />
+ <property name="HeightRequest">600</property>
<property name="Title" translatable="yes">MusicWindow</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="Resizable">False</property>