Permalink
Browse files

refactoring of the engine package (partial)

  • Loading branch information...
cflavio committed Oct 3, 2017
1 parent af782b9 commit 2d7033ed88572d15e1ca09f1fc6b12b55eaff433
Showing with 7 additions and 7 deletions.
  1. +2 −2 menu/inputpage.py
  2. +1 −1 menu/optionpage.py
  3. +1 −1 yorg/event.py
  4. +2 −2 yorg/yorg.py
  5. +1 −1 yyagl
View
@@ -5,7 +5,7 @@
from direct.gui.DirectLabel import DirectLabel
from direct.gui.DirectButton import DirectButton
from yyagl.engine.gui.page import Page, PageGui, PageFacade
from yyagl.engine.joystick import has_pygame
from yyagl.engine.joystick import JoystickMgr
from yyagl.gameobject import GameObject
from .thankspage import ThanksPageGui
@@ -33,7 +33,7 @@ def bld_page(self):
indicatorValue=self.joystick,
indicator_frameColor=menu_args.text_fg,
**menu_args.checkbtn_args)
if not has_pygame():
if not JoystickMgr.has_support():
self.joypad_cb['state'] = DISABLED
buttons_data = [
(_('Accelerate'), 'forward', .6),
View
@@ -102,7 +102,7 @@ def on_input_btn(self):
def update_texts(self):
PageGui.update_texts(self)
curr_lang = self.eng.lang_mgr.curr_lang
curr_lang = self.eng.lang_mgr.lang
self.lang_opt.set({'en': 0, 'it': 1}[curr_lang], fCommand=0)
def __change_lang(self, arg):
View
@@ -9,7 +9,7 @@ def __init__(self, mdt):
if not self.eng.is_runtime:
self.accept('f12', self.eng.phys_mgr.toggle_debug)
fname = 'yorg_' + strftime('%y_%m_%d_%H_%M_%S') + '.png'
self.accept('f10', self.eng.base.win.saveScreenshot, [fname])
self.accept('f10', base.win.saveScreenshot, [fname])
base.accept('escape-up', self.mdt.fsm.demand, ['Exit'])
if not self.eng.is_runtime:
self.accept('f9', self.eng.profiler.toggle)
View
@@ -52,7 +52,7 @@ def __init__(self):
'multiplayer': 0,
'win_orig': '',
'profiling': 0,
'py_profiling_percall': 0,
'pyprof_percall': 0,
'race_start_time': 3.5,
'countdown_seconds': 3}}
opt_path = ''
@@ -76,7 +76,7 @@ def __init__(self):
cursor_scale=((256/352.0) * .08, 1, .08), cursor_hotspot=(.1, .06),
volume=self.options['settings']['volume'],
profiling=opt_dev['profiling'],
py_profiling_percall=opt_dev['py_profiling_percall'])
pyprof_percall=opt_dev['pyprof_percall'])
init_lst = [
[('fsm', YorgFsm, [self])],
[('logic', YorgLogic, [self])],

0 comments on commit 2d7033e

Please sign in to comment.