def confirm_command(self): # 16:9 if self.radio_button_var[0] == 0: props = WindowProperties() props.clearSize() props.setTitle('Chess Classic') props.setSize(DEFAULT16x9SCREEN_W, DEFAULT16x9SCREEN_H) #props.setFixedSize(True) self.render_fsm_ref.win.requestProperties(props) # 4:3 if self.radio_button_var[0] == 1: props = WindowProperties() props.clearSize() props.setTitle('Chess Classic') props.setSize(DEFAULT4x3SCREEN_W, DEFAULT4x3SCREEN_H) #props.setFixedSize(True) self.render_fsm_ref.win.requestProperties(props)
def __init__(self): ShowBase.__init__(self) self.cur_window_width = DEFAULT16x9SCREEN_W self.cur_window_height = DEFAULT16x9SCREEN_H props = WindowProperties() props.clearSize() props.setTitle('Chess Classic') props.setSize(self.cur_window_width, self.cur_window_height) #props.setFixedSize(True) self.win.requestProperties(props) self.taskMgr.add(self.mouse_task, 'mouseTask') self.accept("mouse1", self.mouse_press) self.accept("mouse1-up", self.mouse_release) self.accept("escape", sys.exit) self.cur_state = None # user data obtain fucntins self.process_login = None self.process_find_player = None self.process_registration = None self.process_skin_select = None self.process_confirm_auth = None self.process_continue_online_game = None self.process_offline_with_firend = None self.process_offline_with_computer = None self.process_reset_save_data_friend = None self.process_reset_save_data_computer = None self.on_offline_game_exit = None self.process_set_move_player = None self.on_application_exit = None self.on_press_giveup_button = None self.get_hist_movement_manager = None self.get_cur_turn_side = None self.whiteside_pack_name = None self.blackside_pack_name = None self.is_client_connected_to_server = False self.is_game_played = False self.on_update_now = False self.is_clearing = False self.state_priority = -1 self.cur_state_key = "" self.on_game_exit = None self.side = Side.WHITE self.login = '' self.email = '' self.avail_packs = ['pack0'] # sound self.sound = Sound(self) # play default self.sound.turn(SoundTypes.MAIN, False) self.sound.turn(SoundTypes.WIN, False) self.check_move_func_for_pawn_swap = None self.win_pack = None self.prev_render_not_message_state_key = None self.message = None self.get_loacal_player_rating = None self.init_sky_sphere() self.camera_m = CameraMenu(base.camera, base.camLens) self.taskMgr.add(self.camera_m.update_on_task_rotate, 'camRotTask') self.on_match_making_state = None self.start_game_by_pairing = None self.refresh_matchmaking_pairlist = None