mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
stop_on_ready
This commit is contained in:
parent
32790419f4
commit
9620592938
@ -131,6 +131,7 @@ P3DInstance(P3D_request_ready_func *func,
|
|||||||
_allow_python_dev = false;
|
_allow_python_dev = false;
|
||||||
_keep_user_env = (_fparams.lookup_token_int("keep_user_env") != 0);
|
_keep_user_env = (_fparams.lookup_token_int("keep_user_env") != 0);
|
||||||
_auto_start = (_fparams.lookup_token_int("auto_start") != 0);
|
_auto_start = (_fparams.lookup_token_int("auto_start") != 0);
|
||||||
|
_stop_on_ready = (_fparams.lookup_token_int("stop_on_ready") != 0);
|
||||||
_auto_install = true;
|
_auto_install = true;
|
||||||
if (_fparams.has_token("auto_install")) {
|
if (_fparams.has_token("auto_install")) {
|
||||||
_auto_install = (_fparams.lookup_token_int("auto_install") != 0);
|
_auto_install = (_fparams.lookup_token_int("auto_install") != 0);
|
||||||
@ -1960,7 +1961,9 @@ scan_app_desc_file(TiXmlDocument *doc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nout << "_auto_install = " << _auto_install
|
nout << "_auto_install = " << _auto_install
|
||||||
<< ", _auto_start = " << _auto_start << "\n";
|
<< ", _auto_start = " << _auto_start
|
||||||
|
<< ", _stop_on_ready = " << _stop_on_ready
|
||||||
|
<< "\n";
|
||||||
|
|
||||||
if (_hidden && _got_wparams) {
|
if (_hidden && _got_wparams) {
|
||||||
_wparams.set_window_type(P3D_WT_hidden);
|
_wparams.set_window_type(P3D_WT_hidden);
|
||||||
@ -2465,7 +2468,8 @@ make_splash_window() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_wparams.get_window_type() != P3D_WT_embedded &&
|
if (_wparams.get_window_type() != P3D_WT_embedded &&
|
||||||
!_stuff_to_download && _auto_install && _auto_start && _p3d_trusted) {
|
!_stuff_to_download && _auto_install &&
|
||||||
|
(_auto_start || _stop_on_ready) && _p3d_trusted) {
|
||||||
// If it's a toplevel or fullscreen window, then we don't want a
|
// If it's a toplevel or fullscreen window, then we don't want a
|
||||||
// splash window unless we have stuff to download, or a button to
|
// splash window unless we have stuff to download, or a button to
|
||||||
// display.
|
// display.
|
||||||
@ -2869,9 +2873,17 @@ ready_to_start() {
|
|||||||
|
|
||||||
_panda_script_object->set_string_property("status", "ready");
|
_panda_script_object->set_string_property("status", "ready");
|
||||||
send_notify("onready");
|
send_notify("onready");
|
||||||
|
|
||||||
|
P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
|
||||||
|
if (_stop_on_ready) {
|
||||||
|
// If we've got the "stop_on_ready" token, then exit abruptly
|
||||||
|
// now, instead of displaying the splash window.
|
||||||
|
request_stop_main_thread();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_auto_start) {
|
if (_auto_start) {
|
||||||
set_background_image(IT_launch);
|
set_background_image(IT_launch);
|
||||||
P3DInstanceManager *inst_mgr = P3DInstanceManager::get_global_ptr();
|
|
||||||
inst_mgr->start_instance(this);
|
inst_mgr->start_instance(this);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -284,6 +284,7 @@ private:
|
|||||||
bool _keep_user_env;
|
bool _keep_user_env;
|
||||||
bool _auto_install;
|
bool _auto_install;
|
||||||
bool _auto_start;
|
bool _auto_start;
|
||||||
|
bool _stop_on_ready;
|
||||||
bool _auth_button_clicked;
|
bool _auth_button_clicked;
|
||||||
bool _failed;
|
bool _failed;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user