Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | |||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// GUI integration | // GUI integration | ||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// display progress / description in loading screen | // display progress / description in loading screen | ||||
void GUI_DisplayLoadProgress(int percent, const wchar_t* pending_task) | void GUI_DisplayLoadProgress(int percent, const wchar_t* pending_task) | ||||
{ | { | ||||
g_GUI->GetActiveGUI()->GetScriptInterface()->SetGlobal("g_Progress", percent, true, false, true); | g_GUI->GetActiveGUI()->GetScriptInterface()->SetGlobal("g_Progress", percent, false, false, true); | ||||
g_GUI->GetActiveGUI()->GetScriptInterface()->SetGlobal("g_LoadDescription", pending_task, true, false, true); | g_GUI->GetActiveGUI()->GetScriptInterface()->SetGlobal("g_LoadDescription", pending_task, false, false, true); | ||||
Itms: This is better than what I committed in D1716. Indeed, the progress bars are **not** constants… | |||||
Not Done Inline Actionselexis: The complaint in D1716 is that these JS variables should not be defined in C++ to begin with… | |||||
Not Done Inline ActionsStill that doesn't really prevent committing this. wraitii: Still that doesn't really prevent committing this. | |||||
Not Done Inline ActionsOh you're right elexis! I'll review that one and remove this part of the diff. Itms: Oh you're right elexis! I'll review that one and remove this part of the diff. | |||||
Not Done Inline Actionselexis: If I understand correctly, the SM upgrade needs either D1716 or this (D1844), or both, but this… | |||||
Done Inline ActionsThe upgrade needs this, because some tests fail if we keep some properties permanent, thus not hotloadable. Improving SetGlobal is indeed a nice side effect that should be committed as well. Itms: The upgrade needs this, because some tests fail if we keep some properties permanent, thus not… | |||||
Not Done Inline Actionselexis: I meant D1754 (not D1716). (So this patch doesn't add another workaround and D1844 would only… | |||||
Done Inline ActionsAh yes. Indeed, I can either commit this patch which "upgrades" the workaround before D1754; or if D1754 is in, this patch will be a bit shorter because there will be no call to SetGlobal to upgrade anymore. D1754 doesn't block the SM upgrade (but it's a good opportunity to commit it because it's nice). Itms: Ah yes. Indeed, I can either commit this patch which "upgrades" the workaround before D1754; or… | |||||
g_GUI->GetActiveGUI()->SendEventToAll("progress"); | g_GUI->GetActiveGUI()->SendEventToAll("progress"); | ||||
} | } | ||||
void Render() | void Render() | ||||
{ | { | ||||
PROFILE3("render"); | PROFILE3("render"); | ||||
▲ Show 20 Lines • Show All 1,470 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
This is better than what I committed in D1716. Indeed, the progress bars are not constants, and we are not hotloading them, we are merely updating them.