comparison gamelib/gamescreen.py @ 478:a9925aaf5f61 1.0.1

i18n and Russian translation
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 08 Mar 2011 12:29:14 +0200
parents c72946d3a59a
children 2f1952748cdb
comparison
equal deleted inserted replaced
477:51055400a9a8 478:a9925aaf5f61
14 from cursor import CursorWidget 14 from cursor import CursorWidget
15 from state import initial_state, handle_result 15 from state import initial_state, handle_result
16 from widgets import (MessageDialog, BoomButton, HandButton, PopupMenu, 16 from widgets import (MessageDialog, BoomButton, HandButton, PopupMenu,
17 PopupMenuButton) 17 PopupMenuButton)
18 18
19 from gamelib.i18n import _
19 20
20 class InventoryView(PaletteView): 21 class InventoryView(PaletteView):
21 22
22 sel_color = Color("yellow") 23 sel_color = Color("yellow")
23 sel_width = 2 24 sel_width = 2
136 self.screen = screen 137 self.screen = screen
137 self.state = screen.state 138 self.state = screen.state
138 self.border_width = 5 139 self.border_width = 5
139 self.border_color = (0, 0, 0) 140 self.border_color = (0, 0, 0)
140 # parent only gets set when we get added to the scene 141 # parent only gets set when we get added to the scene
141 self.close = BoomButton('Close', self.close_but, screen) 142 self.close = BoomButton(_('Close'), self.close_but, screen)
142 self.add(self.close) 143 self.add(self.close)
143 144
144 def close_but(self): 145 def close_but(self):
145 self.parent.clear_detail() 146 self.parent.clear_detail()
146 147
208 self.state = initial_state() 209 self.state = initial_state()
209 self.state_widget = StateWidget(self) 210 self.state_widget = StateWidget(self)
210 self.add(self.state_widget) 211 self.add(self.state_widget)
211 212
212 self.popup_menu = PopupMenu(self) 213 self.popup_menu = PopupMenu(self)
213 self.menubutton = PopupMenuButton('Menu', 214 self.menubutton = PopupMenuButton(_('Menu'),
214 action=self.popup_menu.show_menu) 215 action=self.popup_menu.show_menu)
215 216
216 self.handbutton = HandButton(action=self.hand_pressed) 217 self.handbutton = HandButton(action=self.hand_pressed)
217 218
218 self.inventory = InventoryView(self) 219 self.inventory = InventoryView(self)