mirror of https://github.com/godotengine/godot
Added web support for all missing splash screen properties
show_image, fullsize and use_filter are now supported too. bg_color, image and minimum_display_time were already supported previously.
This commit is contained in:
parent
bdf625bd54
commit
8de13860e8
|
|
@ -52,6 +52,20 @@ body {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#status-splash.show-image--false {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#status-splash.fullsize--true {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
#status-splash.use-filter--false {
|
||||||
|
image-rendering: pixelated;
|
||||||
|
}
|
||||||
|
|
||||||
#status-progress, #status-notice {
|
#status-progress, #status-notice {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
@ -88,7 +102,7 @@ body {
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<div id="status">
|
<div id="status">
|
||||||
<img id="status-splash" src="$GODOT_SPLASH" alt="">
|
<img id="status-splash" class="$GODOT_SPLASH_CLASSES" src="$GODOT_SPLASH" alt="">
|
||||||
<progress id="status-progress"></progress>
|
<progress id="status-progress"></progress>
|
||||||
<div id="status-notice"></div>
|
<div id="status-notice"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,12 @@ void EditorExportPlatformWeb::_fix_html(Vector<uint8_t> &p_html, const Ref<Edito
|
||||||
replaces["$GODOT_HEAD_INCLUDE"] = head_include + custom_head_include;
|
replaces["$GODOT_HEAD_INCLUDE"] = head_include + custom_head_include;
|
||||||
replaces["$GODOT_CONFIG"] = str_config;
|
replaces["$GODOT_CONFIG"] = str_config;
|
||||||
replaces["$GODOT_SPLASH_COLOR"] = "#" + Color(GLOBAL_GET("application/boot_splash/bg_color")).to_html(false);
|
replaces["$GODOT_SPLASH_COLOR"] = "#" + Color(GLOBAL_GET("application/boot_splash/bg_color")).to_html(false);
|
||||||
|
|
||||||
|
LocalVector<String> godot_splash_classes;
|
||||||
|
godot_splash_classes.push_back("show-image--" + String(GLOBAL_GET("application/boot_splash/show_image")));
|
||||||
|
godot_splash_classes.push_back("fullsize--" + String(GLOBAL_GET("application/boot_splash/fullsize")));
|
||||||
|
godot_splash_classes.push_back("use-filter--" + String(GLOBAL_GET("application/boot_splash/use_filter")));
|
||||||
|
replaces["$GODOT_SPLASH_CLASSES"] = String(" ").join(godot_splash_classes);
|
||||||
replaces["$GODOT_SPLASH"] = p_name + ".png";
|
replaces["$GODOT_SPLASH"] = p_name + ".png";
|
||||||
|
|
||||||
if (p_preset->get("variant/thread_support")) {
|
if (p_preset->get("variant/thread_support")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue