summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rhlibrary/main.go2
-rw-r--r--src/rhlibrary/mainwindow.go6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/rhlibrary/main.go b/src/rhlibrary/main.go
index cbc5deb..a48fd14 100644
--- a/src/rhlibrary/main.go
+++ b/src/rhlibrary/main.go
@@ -86,7 +86,7 @@ func main() {
player, _ := NewPlayer("/home/equinox/helsinki/rivenhell/contrib/rhlibrary/snd")
player.Play(1, 1)
- mw, err := NewMainWindow()
+ mw, err := NewMainWindow(640, 360)
if err != nil {
rhl.Println("Error initilizing Main Window:", err)
return
diff --git a/src/rhlibrary/mainwindow.go b/src/rhlibrary/mainwindow.go
index bfa0ac7..67620df 100644
--- a/src/rhlibrary/mainwindow.go
+++ b/src/rhlibrary/mainwindow.go
@@ -41,10 +41,8 @@ func (mw *MainWindow) ShowAndRun() {
gtk.Main()
}
-func NewMainWindow() (mw *MainWindow, err error) {
+func NewMainWindow(width, height int) (mw *MainWindow, err error) {
mw = &MainWindow{}
- // Create a new toplevel window, set its title, and connect it to the
- // "destroy" signal to exit the GTK main loop when it is destroyed.
if mw.win, err = gtk.WindowNew(gtk.WINDOW_TOPLEVEL); err != nil {
return
}
@@ -59,6 +57,6 @@ func NewMainWindow() (mw *MainWindow, err error) {
}
mw.win.Add(l)
- mw.win.SetDefaultSize(800, 600)
+ mw.win.SetDefaultSize(width, height)
return
}