Permalink
Browse files

added logo display to main form

  • Loading branch information...
1 parent 87bb098 commit d78ca9aad6bdfac6dba543af2555b4fbadabfda6 Joseph Dillon committed May 19, 2012
Showing with 14 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +7 −0 GUIManager.cs
  3. +4 −1 default.build
  4. +1 −1 glade/main.glade
  5. +1 −1 raytrace/render.ini
  6. BIN {glade → resources}/logo.png
View
@@ -11,3 +11,4 @@ Icon?
Thumbs.db
*~
#*#
+*.pov-state
View
@@ -25,6 +25,8 @@
using Gtk;
using Glade;
using System;
+using System.IO;
+using System.Reflection;
using System.Threading;
namespace Tetris
@@ -45,6 +47,8 @@ class GUIManager
Button fourPlayer;
[Widget]
Button about;
+ [Widget]
+ Image logo;
[STAThread]
static void Main(string[] args)
@@ -62,6 +66,9 @@ static void Main(string[] args)
};
foreach(Glade.XML gxmlC in gxml)
gxmlC.Autoconnect(this);
+ Stream logoStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("logo.png");
+ logo.Pixbuf = new Gdk.Pixbuf(logoStream);
+ logoStream.Close();
onePlayer.Clicked += onePlayerClick;
twoPlayer.Clicked += twoPlayerClick;
View
@@ -6,6 +6,9 @@
<delete dir="bin" failonerror="false" />
<delete dir="lib" failonerror="false" />
</target>
+ <target name="povray" description="runs povray to regenerate icons, logos, and textures (only required if .pov files were modified)">
+ <exec program="raytrace/render.sh" workingdir="raytrace" />
+ </target>
<target name="lib" description="downloads and builds all external libraries">
<mkdir dir="lib" />
<mkdir dir="bin" />
@@ -86,7 +89,7 @@
<package name="glade-sharp-2.0" />
</pkg-references>
<resources>
- <include name="glade/logo.png" />
+ <include name="resources/*.png" />
<include name="glade/*.glade" />
</resources>
<sources>
View
@@ -13,7 +13,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkImage" id="image1_1">
+ <widget class="GtkImage" id="logo">
<property name="width_request">440</property>
<property name="height_request">250</property>
<property name="visible">True</property>
View
@@ -8,7 +8,7 @@ Antialias_Threshold=0.1
Jitter_Amount=0.5
Jitter=On
Input_File_Name=logo.pov
-Output_File_Name=../glade/logo.png
+Output_File_Name=../resources/logo.png
[256x256]
Width=256
Height=256
File renamed without changes

0 comments on commit d78ca9a

Please sign in to comment.