aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mundus/Data/Crafting/RI.cs8
-rw-r--r--Mundus/Icons/Land/Tools/stone_axe.pngbin0 -> 4339 bytes
-rw-r--r--Mundus/Icons/Project files/blank_multiplication.pngbin0 -> 4339 bytes
-rw-r--r--Mundus/Icons/Project files/blank_multiplication.xcfbin0 -> 1593 bytes
-rw-r--r--Mundus/Icons/Project files/stone_axe.xcfbin0 -> 2599 bytes
-rw-r--r--Mundus/Icons/Project files/stone_pickaxe.xcfbin3028 -> 3051 bytes
-rw-r--r--Mundus/Icons/UI/Blanks/blank_multiplication.pngbin0 -> 4339 bytes
-rw-r--r--Mundus/Mundus.csproj2
-rw-r--r--Mundus/Service/Tiles/ItemPresets/ToolPresets.cs4
-rw-r--r--Mundus/gtk-gui/Mundus.Views.Windows.CraftingWindow.cs5
-rw-r--r--Mundus/gtk-gui/generated.cs51
-rw-r--r--Mundus/gtk-gui/gui.stetic15
12 files changed, 81 insertions, 4 deletions
diff --git a/Mundus/Data/Crafting/RI.cs b/Mundus/Data/Crafting/RI.cs
index 3ffd72e..00a54b8 100644
--- a/Mundus/Data/Crafting/RI.cs
+++ b/Mundus/Data/Crafting/RI.cs
@@ -10,14 +10,14 @@ namespace Mundus.Data.Crafting {
public static List<CraftingRecipe> AllRecipies { get; private set; }
public static CraftingRecipe StonePickAxe { get; private set; }
- public static CraftingRecipe Hand { get; private set; }
+ public static CraftingRecipe StoneAxe { get; private set; }
public static void CreateInstances() {
- StonePickAxe = new CraftingRecipe(ToolPresets.GetAStonePickaxe(), 2, MaterialPresets.GetALandRock(), 2, MaterialPresets.GetAStick());
- Hand = new CraftingRecipe(new Tool("blank_hand", ToolTypes.Axe, 10), 5, MaterialPresets.GetALandRock());
+ StonePickAxe = new CraftingRecipe(ToolPresets.GetAStonePickaxe(), 4, MaterialPresets.GetALandRock(), 2, MaterialPresets.GetAStick());
+ StoneAxe = new CraftingRecipe(ToolPresets.GetAStoneAxe(), 3, MaterialPresets.GetALandRock(), 2, MaterialPresets.GetAStick());
AllRecipies = new List<CraftingRecipe> {
- StonePickAxe, Hand
+ StonePickAxe, StoneAxe
};
}
}
diff --git a/Mundus/Icons/Land/Tools/stone_axe.png b/Mundus/Icons/Land/Tools/stone_axe.png
new file mode 100644
index 0000000..1c93f9f
--- /dev/null
+++ b/Mundus/Icons/Land/Tools/stone_axe.png
Binary files differ
diff --git a/Mundus/Icons/Project files/blank_multiplication.png b/Mundus/Icons/Project files/blank_multiplication.png
new file mode 100644
index 0000000..2867e8d
--- /dev/null
+++ b/Mundus/Icons/Project files/blank_multiplication.png
Binary files differ
diff --git a/Mundus/Icons/Project files/blank_multiplication.xcf b/Mundus/Icons/Project files/blank_multiplication.xcf
new file mode 100644
index 0000000..49bdcfe
--- /dev/null
+++ b/Mundus/Icons/Project files/blank_multiplication.xcf
Binary files differ
diff --git a/Mundus/Icons/Project files/stone_axe.xcf b/Mundus/Icons/Project files/stone_axe.xcf
new file mode 100644
index 0000000..59729da
--- /dev/null
+++ b/Mundus/Icons/Project files/stone_axe.xcf
Binary files differ
diff --git a/Mundus/Icons/Project files/stone_pickaxe.xcf b/Mundus/Icons/Project files/stone_pickaxe.xcf
index a23d5d1..fcfeca5 100644
--- a/Mundus/Icons/Project files/stone_pickaxe.xcf
+++ b/Mundus/Icons/Project files/stone_pickaxe.xcf
Binary files differ
diff --git a/Mundus/Icons/UI/Blanks/blank_multiplication.png b/Mundus/Icons/UI/Blanks/blank_multiplication.png
new file mode 100644
index 0000000..1e2d3ae
--- /dev/null
+++ b/Mundus/Icons/UI/Blanks/blank_multiplication.png
Binary files differ
diff --git a/Mundus/Mundus.csproj b/Mundus/Mundus.csproj
index 0b3a8a8..48549fa 100644
--- a/Mundus/Mundus.csproj
+++ b/Mundus/Mundus.csproj
@@ -68,6 +68,8 @@
<EmbeddedResource Include="Icons\Land\Materials\land_rock.png" />
<EmbeddedResource Include="Icons\Land\Materials\stick.png" />
<EmbeddedResource Include="Icons\Land\Tools\stone_pickaxe.png" />
+ <EmbeddedResource Include="Icons\Land\Tools\stone_axe.png" />
+ <EmbeddedResource Include="Icons\UI\Blanks\blank_multiplication.png" />
</ItemGroup>
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
diff --git a/Mundus/Service/Tiles/ItemPresets/ToolPresets.cs b/Mundus/Service/Tiles/ItemPresets/ToolPresets.cs
index 933b6be..e938bbc 100644
--- a/Mundus/Service/Tiles/ItemPresets/ToolPresets.cs
+++ b/Mundus/Service/Tiles/ItemPresets/ToolPresets.cs
@@ -7,5 +7,9 @@ namespace Mundus.Service.Tiles.ItemPresets {
public static Tool GetAStonePickaxe() {
return new Tool("stone_pickaxe", ToolTypes.Pickaxe, 2);
}
+
+ public static Tool GetAStoneAxe() {
+ return new Tool("stone_axe", ToolTypes.Axe, 2);
+ }
}
}
diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.CraftingWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.CraftingWindow.cs
index 09218da..bbc8d6c 100644
--- a/Mundus/gtk-gui/Mundus.Views.Windows.CraftingWindow.cs
+++ b/Mundus/gtk-gui/Mundus.Views.Windows.CraftingWindow.cs
@@ -201,6 +201,7 @@ namespace Mundus.Views.Windows
this.imgM1.WidthRequest = 50;
this.imgM1.HeightRequest = 50;
this.imgM1.Name = "imgM1";
+ this.imgM1.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "blank_multiplication", global::Gtk.IconSize.Dnd);
this.tbUI.Add(this.imgM1);
global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.tbUI[this.imgM1]));
w10.TopAttach = ((uint)(1));
@@ -214,6 +215,7 @@ namespace Mundus.Views.Windows
this.imgM2.WidthRequest = 50;
this.imgM2.HeightRequest = 50;
this.imgM2.Name = "imgM2";
+ this.imgM2.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "blank_multiplication", global::Gtk.IconSize.Dnd);
this.tbUI.Add(this.imgM2);
global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.tbUI[this.imgM2]));
w11.TopAttach = ((uint)(2));
@@ -227,6 +229,7 @@ namespace Mundus.Views.Windows
this.imgM3.WidthRequest = 50;
this.imgM3.HeightRequest = 50;
this.imgM3.Name = "imgM3";
+ this.imgM3.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "blank_multiplication", global::Gtk.IconSize.Dnd);
this.tbUI.Add(this.imgM3);
global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.tbUI[this.imgM3]));
w12.TopAttach = ((uint)(3));
@@ -240,6 +243,7 @@ namespace Mundus.Views.Windows
this.imgM4.WidthRequest = 50;
this.imgM4.HeightRequest = 50;
this.imgM4.Name = "imgM4";
+ this.imgM4.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "blank_multiplication", global::Gtk.IconSize.Dnd);
this.tbUI.Add(this.imgM4);
global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.tbUI[this.imgM4]));
w13.TopAttach = ((uint)(4));
@@ -253,6 +257,7 @@ namespace Mundus.Views.Windows
this.imgM5.WidthRequest = 50;
this.imgM5.HeightRequest = 50;
this.imgM5.Name = "imgM5";
+ this.imgM5.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "blank_multiplication", global::Gtk.IconSize.Dnd);
this.tbUI.Add(this.imgM5);
global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.tbUI[this.imgM5]));
w14.TopAttach = ((uint)(5));
diff --git a/Mundus/gtk-gui/generated.cs b/Mundus/gtk-gui/generated.cs
index 7a0a83c..48cf89a 100644
--- a/Mundus/gtk-gui/generated.cs
+++ b/Mundus/gtk-gui/generated.cs
@@ -44,11 +44,62 @@ namespace Stetic
w1.Add("stick", w16);
global::Gtk.IconSet w17 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Tools.stone_pickaxe.png"));
w1.Add("stone_pickaxe", w17);
+ global::Gtk.IconSet w18 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Tools.stone_axe.png"));
+ w1.Add("stone_axe", w18);
+ global::Gtk.IconSet w19 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.UI.Blanks.blank_multiplication.png"));
+ w1.Add("blank_multiplication", w19);
w1.AddDefault();
}
}
}
+ internal class IconLoader
+ {
+ public static Gdk.Pixbuf LoadIcon(Gtk.Widget widget, string name, Gtk.IconSize size)
+ {
+ Gdk.Pixbuf res = widget.RenderIcon(name, size, null);
+ if ((res != null))
+ {
+ return res;
+ }
+ else
+ {
+ int sz;
+ int sy;
+ global::Gtk.Icon.SizeLookup(size, out sz, out sy);
+ try
+ {
+ return Gtk.IconTheme.Default.LoadIcon(name, sz, 0);
+ }
+ catch (System.Exception)
+ {
+ if ((name != "gtk-missing-image"))
+ {
+ return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size);
+ }
+ else
+ {
+ Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz);
+ Gdk.GC gc = new Gdk.GC(pmap);
+ gc.RgbFgColor = new Gdk.Color(255, 255, 255);
+ pmap.DrawRectangle(gc, true, 0, 0, sz, sz);
+ gc.RgbFgColor = new Gdk.Color(0, 0, 0);
+ pmap.DrawRectangle(gc, false, 0, 0, (sz - 1), (sz - 1));
+ gc.SetLineAttributes(3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
+ gc.RgbFgColor = new Gdk.Color(255, 0, 0);
+ pmap.DrawLine(gc, (sz / 4), (sz / 4), ((sz - 1)
+ - (sz / 4)), ((sz - 1)
+ - (sz / 4)));
+ pmap.DrawLine(gc, ((sz - 1)
+ - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1)
+ - (sz / 4)));
+ return Gdk.Pixbuf.FromDrawable(pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
+ }
+ }
+ }
+ }
+ }
+
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup(System.Type type)
diff --git a/Mundus/gtk-gui/gui.stetic b/Mundus/gtk-gui/gui.stetic
index 76d19f5..77c203a 100644
--- a/Mundus/gtk-gui/gui.stetic
+++ b/Mundus/gtk-gui/gui.stetic
@@ -87,6 +87,16 @@
<property name="Image">resource:Mundus.Icons.Land.Tools.stone_pickaxe.png</property>
</source>
</icon-set>
+ <icon-set id="stone_axe">
+ <source>
+ <property name="Image">resource:Mundus.Icons.Land.Tools.stone_axe.png</property>
+ </source>
+ </icon-set>
+ <icon-set id="blank_multiplication">
+ <source>
+ <property name="Image">resource:Mundus.Icons.UI.Blanks.blank_multiplication.png</property>
+ </source>
+ </icon-set>
</icon-factory>
<widget class="Gtk.Window" id="Mundus.Views.Windows.NewGameWindow" design-size="581 275">
<property name="MemberName" />
@@ -5986,6 +5996,7 @@
<property name="MemberName" />
<property name="WidthRequest">50</property>
<property name="HeightRequest">50</property>
+ <property name="Pixbuf">stock:blank_multiplication Dnd</property>
</widget>
<packing>
<property name="TopAttach">1</property>
@@ -6008,6 +6019,7 @@
<property name="MemberName" />
<property name="WidthRequest">50</property>
<property name="HeightRequest">50</property>
+ <property name="Pixbuf">stock:blank_multiplication Dnd</property>
</widget>
<packing>
<property name="TopAttach">2</property>
@@ -6030,6 +6042,7 @@
<property name="MemberName" />
<property name="WidthRequest">50</property>
<property name="HeightRequest">50</property>
+ <property name="Pixbuf">stock:blank_multiplication Dnd</property>
</widget>
<packing>
<property name="TopAttach">3</property>
@@ -6052,6 +6065,7 @@
<property name="MemberName" />
<property name="WidthRequest">50</property>
<property name="HeightRequest">50</property>
+ <property name="Pixbuf">stock:blank_multiplication Dnd</property>
</widget>
<packing>
<property name="TopAttach">4</property>
@@ -6074,6 +6088,7 @@
<property name="MemberName" />
<property name="WidthRequest">50</property>
<property name="HeightRequest">50</property>
+ <property name="Pixbuf">stock:blank_multiplication Dnd</property>
</widget>
<packing>
<property name="TopAttach">5</property>