-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTerrain_Gui.py
49 lines (35 loc) · 1.38 KB
/
Terrain_Gui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import threading
import math
import pygtk
pygtk.require('2.0')
import gtk
import terrain_generator
from terrain_viewer import TerrainView
from terrain_data_viewer import TerrainDataView
from terrain_controller import TerrainController
from terrain_viewer_controller import TerrainViewController
from dice_gui import DiceGui
class TerrainGui():
def __init__(self):
self.top = gtk.Fixed()
self.content = gtk.Table(rows=5, columns=4)
self.top.add(self.content)
seperator = gtk.VSeparator()
self.content.attach(seperator,1,2,0,4)
seperator = gtk.VSeparator()
self.content.attach(seperator,3,4,0,4)
seperator = gtk.HSeparator()
self.content.attach(seperator,2,3,1,2)
self.terrain_view = TerrainView()
self.content.attach(self.terrain_view.top,2,3,0,1)
self.terrain_data = TerrainDataView()
self.content.attach(self.terrain_data.top,4,5,0,2)
self.terrain_controller = TerrainController(self.terrain_view, self.terrain_data)
self.content.attach(self.terrain_controller.top,0,1,0,4)
self.terrain_view_controller = TerrainViewController(self.terrain_view)
self.content.attach(self.terrain_view_controller.top,2,3,2,4)
self.dice = DiceGui()
self.content.attach(self.dice.top,4,5,3,4)
@property
def top(self):
return self.top