-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui_core.py
More file actions
31 lines (27 loc) · 1.09 KB
/
Copy pathgui_core.py
File metadata and controls
31 lines (27 loc) · 1.09 KB
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
import threading
from gui import pygameForm, GUI, InputWidget, TextDisplayWidget, territoryDisplay
from gui_menu import StartMenu
class GUICore(pygameForm):
def func(self, obj):
self.tbox.Print(obj.value)
if obj.value == 'Attack':
self.territoryDisplay.changeOwnership(1, self.parent.core.player)
obj.value = ''
def begin(self):
self.name = 'GUICore'
self.Menu = StartMenu(self)
self.AddSet(self.Menu.array)
self.AddWidget(InputWidget(self, '', (0, 420), name='textbox one', OnEnter= lambda obj: self.func(obj)))
self.tbox = TextDisplayWidget(self, 'buffer', (0, 400))
self.tbox.Print('Testing...')
self.tbox.Print('Testing2...')
self.tbox.Print('Testing3...')
self.tbox.activate()
self.AddWidget(self.tbox)
#self._widgets[2].activate()
self.tbox.Print('Testing3...')
self.territoryDisplay = territoryDisplay(self, 'lands')
self.AddWidget(self.territoryDisplay)
self.territoryDisplay.activate()
return True
print __name__