add event type for on_close
This commit is contained in:
parent
021ad2d5de
commit
45531c431b
@ -223,7 +223,7 @@ class ClientWindow(Window):
|
||||
print("==========client stop. KeyboardInterrupt info==========")
|
||||
traceback.print_exc()
|
||||
print("==========client stop. KeyboardInterrupt info end==========")
|
||||
self.dispatch_event("on_close")
|
||||
self.dispatch_event("on_close", 'input')
|
||||
sys.exit(0)
|
||||
|
||||
@new_thread('window save_info')
|
||||
@ -388,7 +388,7 @@ class ClientWindow(Window):
|
||||
if symbol == key.ESCAPE and not (modifiers & ~(key.MOD_NUMLOCK |
|
||||
key.MOD_CAPSLOCK |
|
||||
key.MOD_SCROLLLOCK)):
|
||||
self.dispatch_event('on_close')
|
||||
self.dispatch_event('on_close', 'window')
|
||||
if symbol == key.SLASH:
|
||||
self.input_box._set_focus(True)
|
||||
self.logger.debug(
|
||||
|
@ -29,6 +29,7 @@ mod.load.info = "mod id: {} version: {}"
|
||||
mod.load.faild.info = "Mod load failed: {} error info: {}"
|
||||
mod.load.faild.no_mod_class = "Can't find Mod class"
|
||||
mod.load.done = "All Mod loaded"
|
||||
mod.event.error = "Mod evenet {} caught error: {} Mod: {}"
|
||||
|
||||
[client]
|
||||
setup.start = "Client start loading"
|
||||
@ -71,8 +72,8 @@ os.pid_is = "Server PID: {} PPID: {}"
|
||||
|
||||
[game]
|
||||
input = "console"
|
||||
command = "in game commands"
|
||||
window = "window"
|
||||
command = "in game commands"
|
||||
require_DR_rs = "require DR_rs module"
|
||||
|
||||
[client.sr1_render]
|
||||
|
@ -72,8 +72,8 @@ os.pid_is = "服务端 PID: {} PPID: {}"
|
||||
|
||||
[game]
|
||||
input = "控制台"
|
||||
command = "游戏内命令行"
|
||||
window = "窗口"
|
||||
command = "游戏内命令行"
|
||||
require_DR_rs = "需要 DR_rs 模块"
|
||||
|
||||
[client.sr1_render]
|
||||
|
Loading…
Reference in New Issue
Block a user