Updated HTML5 export options and added code to copy examples to a browsable location.

This commit is contained in:
Rodolphe Suescun 2019-10-19 14:20:18 +02:00
parent 85e20dcb1d
commit 3076b279bd
3 changed files with 22 additions and 4 deletions

View File

@ -47,7 +47,20 @@ var is_mac = false
func _ready():
if OS.get_name() == "OSX":
is_mac = true
# In HTML5 export, copy all examples to the filesystem
if OS.get_name() == "HTML5":
var dir : Directory = Directory.new()
dir.make_dir("/examples")
dir.open("res://addons/material_maker/examples/")
dir.list_dir_begin(true)
while true:
var f = dir.get_next()
if f == "":
break
if f.ends_with(".ptex"):
dir.copy("res://addons/material_maker/examples/"+f, "/examples/"+f)
# Upscale everything if the display requires it (crude hiDPI support).
# This prevents UI elements from being too small on hiDPI displays.
if OS.get_screen_dpi() >= 192 and OS.get_screen_size().x >= 2048:

File diff suppressed because one or more lines are too long

View File

@ -154,7 +154,7 @@ boot_splash/image="res://rodz_labs_logo.png"
boot_splash/fullsize=false
boot_splash/bg_color=Color( 0.0901961, 0.0941176, 0.141176, 1 )
config/icon="res://icon.png"
config/release="0.6"
config/release="0.7a1"
[debug]
@ -169,6 +169,10 @@ window/size/width=1280
window/size/height=720
window/dpi/allow_hidpi=true
[editor_plugins]
enabled=PoolStringArray( "material_maker" )
[logging]
file_logging/enable_file_logging=true