diff --git a/README.md b/README.md index c0ec622..be9e332 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ Test board: `--test-board` opens the dialog, `--test-board-run=` also star Groups and templates: `--select=,`, `--group-selected[=]`, `--collapse-groups`, `--expand-groups`, `--toggle-group=`, `--group-menu`, `--drag-demo`, `--templates[=]`, `--insert-form=builtin:skill-check`, `--insert-template= --template-values=skill=pilot|target=8`, -`--save-template=`, `--save-group-template=first`, `--view=,[,]`, `--fit` and +`--save-template=
`, `--save-group-template=first`, `--view=,[,]`, `--theme=` (e.g. synthwave), `--fit` and `--clear-result`. Undo: `--undo-demo[=
]` deletes a table and undoes it (the toast says so), diff --git a/assets/art/fortune_teller_logo.svg.import b/assets/art/fortune_teller_logo.svg.import index 880a4b8..8dd0c09 100644 --- a/assets/art/fortune_teller_logo.svg.import +++ b/assets/art/fortune_teller_logo.svg.import @@ -1,43 +1,3 @@ [remap] -importer="texture" -type="CompressedTexture2D" -uid="uid://drx0r4ci8h5ts" -path="res://.godot/imported/fortune_teller_logo.svg-efad97bd871de6a5fbe287e31d86930a.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://assets/art/fortune_teller_logo.svg" -dest_files=["res://.godot/imported/fortune_teller_logo.svg-efad97bd871de6a5fbe287e31d86930a.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=true -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 -svg/scale=0.25 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false +importer="keep" diff --git a/assets/fonts/Alegreya-Italic-Variable.ttf b/assets/fonts/Alegreya-Italic-Variable.ttf new file mode 100644 index 0000000..890f8f1 Binary files /dev/null and b/assets/fonts/Alegreya-Italic-Variable.ttf differ diff --git a/assets/fonts/Alegreya-Italic-Variable.ttf.import b/assets/fonts/Alegreya-Italic-Variable.ttf.import new file mode 100644 index 0000000..b4f3ba1 --- /dev/null +++ b/assets/fonts/Alegreya-Italic-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cs3b7muenjy0l" +path="res://.godot/imported/Alegreya-Italic-Variable.ttf-a69efa4173a6451f822673ec09f96319.fontdata" + +[deps] + +source_file="res://assets/fonts/Alegreya-Italic-Variable.ttf" +dest_files=["res://.godot/imported/Alegreya-Italic-Variable.ttf-a69efa4173a6451f822673ec09f96319.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Alegreya-Variable.ttf b/assets/fonts/Alegreya-Variable.ttf new file mode 100644 index 0000000..af2b220 Binary files /dev/null and b/assets/fonts/Alegreya-Variable.ttf differ diff --git a/assets/fonts/Alegreya-Variable.ttf.import b/assets/fonts/Alegreya-Variable.ttf.import new file mode 100644 index 0000000..24c3f53 --- /dev/null +++ b/assets/fonts/Alegreya-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://b7dordns36oru" +path="res://.godot/imported/Alegreya-Variable.ttf-1b2acbd08e66a8c79c2e8a8e61e4cd9f.fontdata" + +[deps] + +source_file="res://assets/fonts/Alegreya-Variable.ttf" +dest_files=["res://.godot/imported/Alegreya-Variable.ttf-1b2acbd08e66a8c79c2e8a8e61e4cd9f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Asap-Italic-Variable.ttf b/assets/fonts/Asap-Italic-Variable.ttf new file mode 100644 index 0000000..d16b318 Binary files /dev/null and b/assets/fonts/Asap-Italic-Variable.ttf differ diff --git a/assets/fonts/Asap-Italic-Variable.ttf.import b/assets/fonts/Asap-Italic-Variable.ttf.import new file mode 100644 index 0000000..55405fd --- /dev/null +++ b/assets/fonts/Asap-Italic-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://b2l5h5h7lfqbi" +path="res://.godot/imported/Asap-Italic-Variable.ttf-38c404de46054653bc1a8c34ba54a7d0.fontdata" + +[deps] + +source_file="res://assets/fonts/Asap-Italic-Variable.ttf" +dest_files=["res://.godot/imported/Asap-Italic-Variable.ttf-38c404de46054653bc1a8c34ba54a7d0.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Asap-Variable.ttf b/assets/fonts/Asap-Variable.ttf new file mode 100644 index 0000000..ce62af3 Binary files /dev/null and b/assets/fonts/Asap-Variable.ttf differ diff --git a/assets/fonts/Asap-Variable.ttf.import b/assets/fonts/Asap-Variable.ttf.import new file mode 100644 index 0000000..c75b785 --- /dev/null +++ b/assets/fonts/Asap-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://drk2vtjdpxwqo" +path="res://.godot/imported/Asap-Variable.ttf-c33c909c441a9ca55d4bb236b3be169e.fontdata" + +[deps] + +source_file="res://assets/fonts/Asap-Variable.ttf" +dest_files=["res://.godot/imported/Asap-Variable.ttf-c33c909c441a9ca55d4bb236b3be169e.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Audiowide-Regular.ttf b/assets/fonts/Audiowide-Regular.ttf new file mode 100644 index 0000000..8b50bed Binary files /dev/null and b/assets/fonts/Audiowide-Regular.ttf differ diff --git a/assets/fonts/Audiowide-Regular.ttf.import b/assets/fonts/Audiowide-Regular.ttf.import new file mode 100644 index 0000000..16ff85f --- /dev/null +++ b/assets/fonts/Audiowide-Regular.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://3lydydty37mr" +path="res://.godot/imported/Audiowide-Regular.ttf-62e85edd5fada4bf3a870f3432dcfb6f.fontdata" + +[deps] + +source_file="res://assets/fonts/Audiowide-Regular.ttf" +dest_files=["res://.godot/imported/Audiowide-Regular.ttf-62e85edd5fada4bf3a870f3432dcfb6f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Fraunces-Variable.ttf b/assets/fonts/Fraunces-Variable.ttf new file mode 100644 index 0000000..8210f94 Binary files /dev/null and b/assets/fonts/Fraunces-Variable.ttf differ diff --git a/assets/fonts/Fraunces-Variable.ttf.import b/assets/fonts/Fraunces-Variable.ttf.import new file mode 100644 index 0000000..f85c4d6 --- /dev/null +++ b/assets/fonts/Fraunces-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://daq6bw78wj2wl" +path="res://.godot/imported/Fraunces-Variable.ttf-b66ede8034d923f9f9e4e2ba2dcd207e.fontdata" + +[deps] + +source_file="res://assets/fonts/Fraunces-Variable.ttf" +dest_files=["res://.godot/imported/Fraunces-Variable.ttf-b66ede8034d923f9f9e4e2ba2dcd207e.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Nunito-Italic-Variable.ttf b/assets/fonts/Nunito-Italic-Variable.ttf new file mode 100644 index 0000000..e63b7a6 Binary files /dev/null and b/assets/fonts/Nunito-Italic-Variable.ttf differ diff --git a/assets/fonts/Nunito-Italic-Variable.ttf.import b/assets/fonts/Nunito-Italic-Variable.ttf.import new file mode 100644 index 0000000..74746e7 --- /dev/null +++ b/assets/fonts/Nunito-Italic-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dwio42hv1iodt" +path="res://.godot/imported/Nunito-Italic-Variable.ttf-df28ead8220270b533533b64f7f47bbd.fontdata" + +[deps] + +source_file="res://assets/fonts/Nunito-Italic-Variable.ttf" +dest_files=["res://.godot/imported/Nunito-Italic-Variable.ttf-df28ead8220270b533533b64f7f47bbd.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Nunito-Variable.ttf b/assets/fonts/Nunito-Variable.ttf new file mode 100644 index 0000000..2ec1f4b Binary files /dev/null and b/assets/fonts/Nunito-Variable.ttf differ diff --git a/assets/fonts/Nunito-Variable.ttf.import b/assets/fonts/Nunito-Variable.ttf.import new file mode 100644 index 0000000..90c646e --- /dev/null +++ b/assets/fonts/Nunito-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dnmhoxocuuwk5" +path="res://.godot/imported/Nunito-Variable.ttf-6f6325d3224193810a20dd678ce56bea.fontdata" + +[deps] + +source_file="res://assets/fonts/Nunito-Variable.ttf" +dest_files=["res://.godot/imported/Nunito-Variable.ttf-6f6325d3224193810a20dd678ce56bea.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/OFL-Alegreya.txt b/assets/fonts/OFL-Alegreya.txt new file mode 100644 index 0000000..1a25b6d --- /dev/null +++ b/assets/fonts/OFL-Alegreya.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Alegreya Project Authors (https://github.com/huertatipografica/Alegreya) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-Asap.txt b/assets/fonts/OFL-Asap.txt new file mode 100644 index 0000000..4497ef2 --- /dev/null +++ b/assets/fonts/OFL-Asap.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Asap Project Authors (https://github.com/Omnibus-Type/Asap) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-Audiowide.txt b/assets/fonts/OFL-Audiowide.txt new file mode 100644 index 0000000..19bb4ad --- /dev/null +++ b/assets/fonts/OFL-Audiowide.txt @@ -0,0 +1,93 @@ +Copyright (c) 2012, Brian J. Bonislawsky DBA Astigmatic (AOETI) (astigma@astigmatic.com), with Reserved Font Names "Audiowide" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-Fraunces.txt b/assets/fonts/OFL-Fraunces.txt new file mode 100644 index 0000000..22fa7ce --- /dev/null +++ b/assets/fonts/OFL-Fraunces.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Fraunces Project Authors (https://github.com/undercasetype/Fraunces) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-Nunito.txt b/assets/fonts/OFL-Nunito.txt new file mode 100644 index 0000000..c8210f0 --- /dev/null +++ b/assets/fonts/OFL-Nunito.txt @@ -0,0 +1,93 @@ +Copyright 2014 The Nunito Project Authors (https://github.com/googlefonts/nunito) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-Quicksand.txt b/assets/fonts/OFL-Quicksand.txt new file mode 100644 index 0000000..5186b46 --- /dev/null +++ b/assets/fonts/OFL-Quicksand.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Quicksand Project Authors (https://github.com/andrew-paglinawan/QuicksandFamily), with Reserved Font Name “Quicksand”. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-Righteous.txt b/assets/fonts/OFL-Righteous.txt new file mode 100644 index 0000000..22f3d20 --- /dev/null +++ b/assets/fonts/OFL-Righteous.txt @@ -0,0 +1,94 @@ +Copyright (c) 2011 by Brian J. Bonislawsky DBA Astigmatic (AOETI) +(astigma@astigmatic.com), with Reserved Font Names "Righteous" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-UnifrakturMaguntia.txt b/assets/fonts/OFL-UnifrakturMaguntia.txt new file mode 100644 index 0000000..cae7aa5 --- /dev/null +++ b/assets/fonts/OFL-UnifrakturMaguntia.txt @@ -0,0 +1,94 @@ +Copyright (c) 2010, j. 'mach' wust, with Reserved Font Name UnifrakturMaguntia. +Copyright (c) 2009, Peter Wiegel. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-VT323.txt b/assets/fonts/OFL-VT323.txt new file mode 100644 index 0000000..bcb092f --- /dev/null +++ b/assets/fonts/OFL-VT323.txt @@ -0,0 +1,93 @@ +Copyright 2011, The VT323 Project Authors (peter.hull@oikoi.com) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/OFL-ZillaSlab.txt b/assets/fonts/OFL-ZillaSlab.txt new file mode 100644 index 0000000..af9d668 --- /dev/null +++ b/assets/fonts/OFL-ZillaSlab.txt @@ -0,0 +1,93 @@ +Copyright 2017, The Mozilla Foundation + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/Quicksand-Variable.ttf b/assets/fonts/Quicksand-Variable.ttf new file mode 100644 index 0000000..8cd9133 Binary files /dev/null and b/assets/fonts/Quicksand-Variable.ttf differ diff --git a/assets/fonts/Quicksand-Variable.ttf.import b/assets/fonts/Quicksand-Variable.ttf.import new file mode 100644 index 0000000..be44974 --- /dev/null +++ b/assets/fonts/Quicksand-Variable.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://fpit0hbrpk3x" +path="res://.godot/imported/Quicksand-Variable.ttf-b9cc17f0aaa5b0b9be88aab8a7ee5cb3.fontdata" + +[deps] + +source_file="res://assets/fonts/Quicksand-Variable.ttf" +dest_files=["res://.godot/imported/Quicksand-Variable.ttf-b9cc17f0aaa5b0b9be88aab8a7ee5cb3.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/Righteous-Regular.ttf b/assets/fonts/Righteous-Regular.ttf new file mode 100644 index 0000000..07fc0b4 Binary files /dev/null and b/assets/fonts/Righteous-Regular.ttf differ diff --git a/assets/fonts/Righteous-Regular.ttf.import b/assets/fonts/Righteous-Regular.ttf.import new file mode 100644 index 0000000..72c1a64 --- /dev/null +++ b/assets/fonts/Righteous-Regular.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://c36cnqxtw35kl" +path="res://.godot/imported/Righteous-Regular.ttf-01cf1709b9b4e12534213c58071be83f.fontdata" + +[deps] + +source_file="res://assets/fonts/Righteous-Regular.ttf" +dest_files=["res://.godot/imported/Righteous-Regular.ttf-01cf1709b9b4e12534213c58071be83f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/UnifrakturMaguntia-Book.ttf b/assets/fonts/UnifrakturMaguntia-Book.ttf new file mode 100644 index 0000000..6429ce2 Binary files /dev/null and b/assets/fonts/UnifrakturMaguntia-Book.ttf differ diff --git a/assets/fonts/UnifrakturMaguntia-Book.ttf.import b/assets/fonts/UnifrakturMaguntia-Book.ttf.import new file mode 100644 index 0000000..45f800c --- /dev/null +++ b/assets/fonts/UnifrakturMaguntia-Book.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cf5c0xtqi00mn" +path="res://.godot/imported/UnifrakturMaguntia-Book.ttf-9ae12531af5ffcccd3661245bb00e591.fontdata" + +[deps] + +source_file="res://assets/fonts/UnifrakturMaguntia-Book.ttf" +dest_files=["res://.godot/imported/UnifrakturMaguntia-Book.ttf-9ae12531af5ffcccd3661245bb00e591.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/VT323-Regular.ttf b/assets/fonts/VT323-Regular.ttf new file mode 100644 index 0000000..afa6909 Binary files /dev/null and b/assets/fonts/VT323-Regular.ttf differ diff --git a/assets/fonts/VT323-Regular.ttf.import b/assets/fonts/VT323-Regular.ttf.import new file mode 100644 index 0000000..66b8088 --- /dev/null +++ b/assets/fonts/VT323-Regular.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bn8mdwk2jtvyb" +path="res://.godot/imported/VT323-Regular.ttf-fc3781f5235ceff7fbc465ccf3078d1e.fontdata" + +[deps] + +source_file="res://assets/fonts/VT323-Regular.ttf" +dest_files=["res://.godot/imported/VT323-Regular.ttf-fc3781f5235ceff7fbc465ccf3078d1e.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/ZillaSlab-Bold.ttf b/assets/fonts/ZillaSlab-Bold.ttf new file mode 100644 index 0000000..fcd2609 Binary files /dev/null and b/assets/fonts/ZillaSlab-Bold.ttf differ diff --git a/assets/fonts/ZillaSlab-Bold.ttf.import b/assets/fonts/ZillaSlab-Bold.ttf.import new file mode 100644 index 0000000..aad102f --- /dev/null +++ b/assets/fonts/ZillaSlab-Bold.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://rwtyopjkmgkc" +path="res://.godot/imported/ZillaSlab-Bold.ttf-ed8428acf59defc06705675a67e79428.fontdata" + +[deps] + +source_file="res://assets/fonts/ZillaSlab-Bold.ttf" +dest_files=["res://.godot/imported/ZillaSlab-Bold.ttf-ed8428acf59defc06705675a67e79428.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/ZillaSlab-Italic.ttf b/assets/fonts/ZillaSlab-Italic.ttf new file mode 100644 index 0000000..c9eeac7 Binary files /dev/null and b/assets/fonts/ZillaSlab-Italic.ttf differ diff --git a/assets/fonts/ZillaSlab-Italic.ttf.import b/assets/fonts/ZillaSlab-Italic.ttf.import new file mode 100644 index 0000000..c0a9e01 --- /dev/null +++ b/assets/fonts/ZillaSlab-Italic.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bu063w6mupqw2" +path="res://.godot/imported/ZillaSlab-Italic.ttf-4d23bbf80aafa915c3ef7e94833eb7c5.fontdata" + +[deps] + +source_file="res://assets/fonts/ZillaSlab-Italic.ttf" +dest_files=["res://.godot/imported/ZillaSlab-Italic.ttf-4d23bbf80aafa915c3ef7e94833eb7c5.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/fonts/ZillaSlab-Regular.ttf b/assets/fonts/ZillaSlab-Regular.ttf new file mode 100644 index 0000000..8a9724d Binary files /dev/null and b/assets/fonts/ZillaSlab-Regular.ttf differ diff --git a/assets/fonts/ZillaSlab-Regular.ttf.import b/assets/fonts/ZillaSlab-Regular.ttf.import new file mode 100644 index 0000000..5c9aed3 --- /dev/null +++ b/assets/fonts/ZillaSlab-Regular.ttf.import @@ -0,0 +1,36 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bytyb60kax0wr" +path="res://.godot/imported/ZillaSlab-Regular.ttf-b1d8c390613f2f8dc221766852991f08.fontdata" + +[deps] + +source_file="res://assets/fonts/ZillaSlab-Regular.ttf" +dest_files=["res://.godot/imported/ZillaSlab-Regular.ttf-b1d8c390613f2f8dc221766852991f08.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +modulate_color_glyphs=false +hinting=3 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index ac41390..9a3c628 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -183,6 +183,21 @@ templates/ built-in templates · examples/logic_demo.json (original demo board) split out of `roll_table.gd`). JSON keys: table `columns`, `column_rolls`, `steps`; result `cells`; thread `dice`, `reroll`. Spec: LOGIC.md §3e, §3f, §5.4. +## 3d. Modules added 2026-11-11 (theme files, tiers 1–2) +Format spec: `docs/THEMES.md`. Built-in themes: `themes//theme.gd` (`const DATA`, written by +`tools/theme_defs/make_theme_defs.py` from `palettes.py`) + files beside it; `BuiltinThemes.all()`. +- **Loading:** `ui/theme_assets.gd` (paths relative to a theme folder, cached loads, `pin_paths` + for copies of built-ins). +- **Recolouring:** `ui/gradient_map.gd` (3-stop shader), `ui/frame_set.gd` (frame art + geometry; + `FrameSet.active`, the beaded frame is `FrameSet.beaded()`), `ui/card_frame.gd` draws it, + `ui/thread_strip.gd` (`ThreadStrip.active`; textured triangle strip in `PipeLayer`). +- **Mascot:** `ui/mascot_art.gd` (role recolour of an SVG's text; Morgan's logo SVG uses the + Keep File importer so its text is exported). +- **Background:** `ui/board_backdrop.gd` (gradient, scene, tile; old dots/stars). +- **Sound:** `ui/sound_board.gd` (`Main.sound`; roll / card_turn / thread / click / ambient; + View ▾ → Sound levels; setting `sound_volume`). +- **Generators:** `tools/theme_art/` (SVG art), `tools/theme_sounds/` (OGG), `tools/theme_defs/`. + ## 4. Data and storage - **Collections:** `user://collections/.json`, format_version 2 (`{format_version, id, name, tables, groups?}`). On Linux that's `~/.local/share/godot/app_userdata/TableTower/`. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 96d9d0f..a92fc1b 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -77,6 +77,14 @@ Card, Result, Change, Reset, Dice wording rules: `docs/HISTORY.md` §6 "Terminol - **Hand testing:** the user tests by hand as they go but hasn't done a full pass; a comprehensive playtest with a checklist is planned (they'll do it later; offer a checklist when asked). +- **Theme tiers 1–2 built (branch `themes-tier12`, 2026-11-11, not merged yet):** theme folders, + Morgan recolouring by role, background scene + tile, frame sets (3-stop gradient map), picture + threads, sounds (View ▾ → Sound: Off / Quiet / Medium / Loud; default Quiet). Nine new built-in + themes from the mockup (Vaporwave … Terminal) with stand-in art and synthesised sounds; 10 new OFL + fonts. `--theme=` CLI flag. Not hand-tested yet. Map: ARCHITECTURE §3d; format: THEMES.md. + Known gaps vs mockup: corner ornaments show on all four corners; no card drop shadows; Terminal + has no scanlines. `pipe_layer.gd` is now 456 lines (size audit). + **Next, likely:** the user's hand test of Stage II and the new column options (one phrase, roll twice and combine); the roll hitch (§4); a size audit (§4); a hand-testing checklist; untested-by-hand items: Deck mode fade timing and group marks. diff --git a/docs/THEMES.md b/docs/THEMES.md new file mode 100644 index 0000000..7699661 --- /dev/null +++ b/docs/THEMES.md @@ -0,0 +1,72 @@ +# Theme files (format spec) + +A theme is a set of keys (colours, fonts, fills) plus optional art and sound files. Plain-language +art rules for the user live in the "Theme Art Guide" doc; this page is the technical contract. + +## Where files live +- **Built-in themes:** keys in GDScript (`themes//theme.gd`, `const DATA`), files in `res://themes//`. + Code, not JSON, so exports need no include filter. Godot imports the files (SVG → texture, OGG → stream). +- **User themes:** keys in `user://themes/.json` (as before); files in the folder `user://themes//`. +- A file path in a theme is relative to that folder, or a full `res://` / `user://` path. A user copy of a + built-in theme keeps full `res://themes//…` paths, so it needs no copied files. +- Mascot SVGs must be imported with the **Keep File** importer (`importer="keep"`): the app reads their text + to swap colours, so the source file has to be in the export. + +## Keys (all optional; existing keys unchanged) +``` +"logo": "fortune_teller" | "mascot" | "tower" | "none" +"mascot": "mascot.svg" # used when logo = "mascot" +"mascot_colors": {"outline": "#hex", "cloth": …, "trim": …, "eye": …, "eye_glint": …, "inner_line": …} +"background_scene": {"file": "background_scene.svg", "anchor": "bottom" | "center" | "top"} +"background_tile": {"file": "background_tile.svg", "opacity": 0.6, "scale": 1.0} +"card_frame": "ornate" | "plain" | "art" # "art" = the theme's own frame set below +"frame": { + "corner": "frame_corner.svg", "corner_fixed": "frame_corner_fixed.svg", + "edge": "frame_edge.svg", + "corner_size": [W, H], "edge_size": [W, H], + "side_mid": x, "top_mid": y, "edge_mid": x, + "scale": 0.28, "outset": 9, "pad": 5, + "lo": 0.05, "mid": 0.5, "highlight": 0.45 +} +"thread": {"strip": "thread_strip.svg", "strip_size": [L, H], "width": 10, + "pin": "thread_pin.svg", "pin_size": 14, "lo": 0.05, "mid": 0.5, "highlight": 0.45} +"sounds": {"roll": "sounds/roll.ogg", "card_turn": "sounds/card_turn.ogg", + "thread": "…", "click": "…", "ambient": "…"} +``` + +## Mascot colour roles +SVG `` (or ``) elements whose `id` is a role name get that role's colour as `fill`. +Morgan's roles: `outline`, `cloth`, `trim`, `eye`, `eye_glint`, `inner_line`. Unknown ids keep their colour. +A role with no colour in the theme keeps the colour drawn in the file. + +## Background +Drawn in screen space, back to front: flat `BG` → `background` fill → scene → tile (or the old +`pattern` when there is no tile). The scene covers the view (scaled to cover, kept at its aspect), +pinned by `anchor`. The tile repeats at `scale`, drawn at `opacity`. Both use fixed colours. + +## Gradient map (frames and thread strips) +The art is greyscale. Each pixel's lightness `l` picks a colour; alpha is kept: +- `l <= lo` → dark (frames: `BG_DEEP`; threads: `THREAD_DARK`, or the thread's own colour darkened) +- `l = mid` → trim (frames: the card's colour, else `TRIM`; threads: own colour, else `THREAD`) +- `l = 1` → trim lightened by `highlight` +The built-in beaded frame uses `mid = 0.30` so it looks as before. + +## Frame set geometry (source units, before `scale`) +- `corner`: the **top-left** corner. The app mirrors it for the other three. +- The frame's band leaves the corner downwards along the vertical line `x = side_mid` (at the + corner's bottom edge) and rightwards along `y = top_mid` (at its right edge). +- `edge`: one vertical tile of the band, `edge_size` = [W, H], its centre line at `x = edge_mid`. + It repeats down the sides (stretched a little so whole tiles fit) and is turned −90° for the + top and bottom, so it must look right both ways. +- The frame is drawn around the card rectangle grown by `outset` px; `pad` is extra inner margin. +- `corner_fixed`: optional overlay drawn on each corner in its own colours (nails, gems, pins). + +## Thread strip +One horizontal tile `strip_size` = [L, H], repeated along the thread's curve; drawn `width` px thick. +Greyscale, gradient-mapped (above). Lit threads use `ACCENT` as the trim colour. `pin` (fixed colours) +is drawn at both ends, `pin_size` px across. + +## Sounds +OGG Vorbis, mono, 44.1 kHz. `roll`: a roll starts. `card_turn`: a Deck mode result is revealed. +`thread`: a roll travels along a thread. `click`: a button is pressed. `ambient`: loops while the theme +is on. Volume and mute are app settings, not theme keys. diff --git a/tests/test_actions.gd b/tests/test_actions.gd index d6c23dd..7e77304 100644 --- a/tests/test_actions.gd +++ b/tests/test_actions.gd @@ -48,8 +48,9 @@ func _test_popup_and_run() -> void: var pm := Actions.popup_at(main, Actions.background(main, at), Vector2(50, 50)) await _frames() var sub: PopupMenu = null + # The first submenu is New card ▸ (Sound ▸ comes later). for c in pm.get_children(): - if c is PopupMenu: + if c is PopupMenu and sub == null: sub = c _check(sub != null and sub.item_count == MainEditing.ADD_KINDS.size(), "New card ▸ lists every kind") var before := main.data.tables.size() diff --git a/tests/test_theme_assets.gd b/tests/test_theme_assets.gd new file mode 100644 index 0000000..df956f4 --- /dev/null +++ b/tests/test_theme_assets.gd @@ -0,0 +1,103 @@ +extends TestBase +## Theme files: every built-in theme's pictures, sounds and fonts load; frame +## sets, thread strips, the backdrop and the recoloured mascot build; a copy of +## a built-in keeps its file paths; the sound board follows the volume. +## Run: godot --headless --path . -s res://tests/test_theme_assets.gd -- --sample + + +func _init() -> void: + if not require_sample(): + return + ThemeStore.DIR = OS.get_temp_dir().path_join("tt_theme_assets_%d/" % OS.get_process_id()) + if not await start_main(): + return + _test_builtin_files() + _test_mascot() + _test_pin_paths() + _test_frames_and_threads() + _test_sounds() + ThemeStore.apply(BuiltinThemes.TAROT) + finish() + + +func _test_builtin_files() -> void: + for theme_set in BuiltinThemes.all(): + var id := str(theme_set["id"]) + for role: String in ["body", "display"]: + var font_id := str(theme_set.get("font_" + role, FontCatalog.DEFAULT_BODY)) + _check(FontCatalog.FAMILIES.has(font_id), "%s: %s font %s is bundled" % [id, role, font_id]) + var pinned := ThemeAssets.pin_paths(theme_set, ThemeAssets.folder(theme_set)) + for key: Array in ThemeAssets.FILE_KEYS: + var value: Variant = pinned.get(key[0]) if key.size() == 1 else (pinned.get(key[0], {}) as Dictionary).get(key[1]) + if value != null and str(value) != "" and key[0] != "mascot": + _check(ThemeAssets.texture(theme_set, str(value)) != null, "%s: %s loads" % [id, str(value)]) + var sounds: Dictionary = theme_set.get("sounds", {}) + for event: String in sounds: + _check(ThemeAssets.sound(theme_set, str(sounds[event])) != null, "%s: %s sound loads" % [id, event]) + if str(theme_set.get("card_frame", "")) == "art": + _check(FrameSet.for_theme(theme_set) != null, "%s: its frame set builds" % id) + if theme_set.has("thread"): + _check(ThreadStrip.for_theme(theme_set) != null, "%s: its thread strip builds" % id) + + +func _test_mascot() -> void: + var drawn := MascotArt.file_colors(MascotArt.MORGAN) + _check(drawn.size() == MascotArt.ROLES.size(), "Morgan's file has every colour role") + _eq(drawn.get("inner_line"), "#390853", "the inner lines keep the old background purple") + var svg := "" + var out := MascotArt.recolour(svg, {"cloth": "#abcdef", "eye": "#00ff00"}) + _check(out.contains("id=\"cloth\" fill=\"#abcdef\""), "a role's fill is replaced") + _check(out.contains("fill=\"#00ff00\""), "a role with no fill gets one") + _check(out.contains("fill=\"#222222\""), "parts without a role keep their colour") + var theme_set := {"logo": "fortune_teller", "mascot_colors": {"cloth": "#ff0000"}} + var tex := MascotArt.texture(theme_set, 64) + _check(tex != null and tex.get_width() == 64, "the recoloured mascot renders at the asked size") + _check(MascotArt.texture({"logo": "tower"}, 64) == null, "the tower logo has no mascot picture") + + +func _test_pin_paths() -> void: + var builtin := {"id": "demo", "builtin": true, "mascot": "m.svg", + "frame": {"corner": "c.svg", "edge": "user://elsewhere/e.svg"}, "sounds": {"roll": "sounds/roll.ogg"}} + var pinned := ThemeAssets.pin_paths(builtin, ThemeAssets.folder(builtin)) + _eq(pinned["mascot"], "res://themes/demo/m.svg", "a relative file gets the built-in folder") + _eq(pinned["frame"]["edge"], "user://elsewhere/e.svg", "a full path is kept") + _eq(pinned["sounds"]["roll"], "res://themes/demo/sounds/roll.ogg", "sound paths are pinned too") + var saved_id := ThemeStore.save(builtin) + var saved := ThemeStore.find(saved_id) + _eq(str(saved.get("frame", {}).get("corner", "")), "res://themes/demo/c.svg", "a saved copy of a built-in keeps its files") + ThemeStore.delete(saved_id) + var mine := {"id": "mine", "frame": {"corner": "c.svg"}} + _eq(ThemeAssets.resolve(mine, "c.svg"), ThemeStore.DIR + "mine/c.svg", "a user theme's files sit in its own folder") + + +func _test_frames_and_threads() -> void: + for theme_set in BuiltinThemes.all(): + ThemeStore.apply(theme_set) + var backdrop := BoardBackdrop.new(theme_set) + _check(backdrop != null, "%s: the backdrop builds" % theme_set["id"]) + if FrameSet.active and FrameSet.active.corner_fixed: + var frame := CardFrame.new() + _check(frame._fixed != null, "%s: fixed corner pieces get their own layer" % theme_set["id"]) + frame.free() + if ThreadStrip.active: + var rid := RenderingServer.canvas_item_create() + ThreadStrip.active.add_to(rid, PipeLayer.curve(Vector2.ZERO, Vector2(300, 80)), Style.THREAD, Style.THREAD_DARK) + RenderingServer.free_rid(rid) + ThemeStore.apply(BuiltinThemes.FELT) + _check(FrameSet.active == null and ThreadStrip.active == null, "Felt has plain cards and drawn threads") + ThemeStore.apply(BuiltinThemes.TAROT) + _check(FrameSet.active != null and FrameSet.active.mid == 0.30, "Tarot keeps the beaded frame and its old shading") + + +func _test_sounds() -> void: + _check(main.sound != null, "the app has a sound board") + if main.sound == null: + return + _check(main.sound.has("roll"), "Tarot has a roll sound") + main.sound.set_volume(0.0) + _eq(main.sound.level_name(), "Off", "volume 0 reads as Off") + main.sound.play("roll") + var playing := main.sound._voices.any(func(voice: AudioStreamPlayer) -> bool: return voice.playing) + _check(not playing, "nothing plays when the sound is off") + main.sound.set_volume(SoundBoard.DEFAULT_VOLUME) + _eq(main.sound.level_name(), "Quiet", "the default level is Quiet") diff --git a/tests/test_theme_assets.gd.uid b/tests/test_theme_assets.gd.uid new file mode 100644 index 0000000..8af7b77 --- /dev/null +++ b/tests/test_theme_assets.gd.uid @@ -0,0 +1 @@ +uid://d253hp0mmryqq diff --git a/themes/aero/background_scene.svg b/themes/aero/background_scene.svg new file mode 100644 index 0000000..0ef45a8 --- /dev/null +++ b/themes/aero/background_scene.svg @@ -0,0 +1 @@ + diff --git a/themes/aero/background_scene.svg.import b/themes/aero/background_scene.svg.import new file mode 100644 index 0000000..ae4db1b --- /dev/null +++ b/themes/aero/background_scene.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ct1y1ge4uh7jq" +path="res://.godot/imported/background_scene.svg-a810d7a9dfe8ccfe7eb799b1b1291b13.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/aero/background_scene.svg" +dest_files=["res://.godot/imported/background_scene.svg-a810d7a9dfe8ccfe7eb799b1b1291b13.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/aero/frame_corner.svg b/themes/aero/frame_corner.svg new file mode 100644 index 0000000..9548e34 --- /dev/null +++ b/themes/aero/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/aero/frame_corner.svg.import b/themes/aero/frame_corner.svg.import new file mode 100644 index 0000000..95fcc80 --- /dev/null +++ b/themes/aero/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqapx7r3gy8ld" +path="res://.godot/imported/frame_corner.svg-46b57f173474e6119c62db3279fada44.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/aero/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-46b57f173474e6119c62db3279fada44.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/aero/frame_edge.svg b/themes/aero/frame_edge.svg new file mode 100644 index 0000000..ca89b16 --- /dev/null +++ b/themes/aero/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/aero/frame_edge.svg.import b/themes/aero/frame_edge.svg.import new file mode 100644 index 0000000..4e3df52 --- /dev/null +++ b/themes/aero/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cnfxdyjda0q35" +path="res://.godot/imported/frame_edge.svg-d72134935a1646d3cb887a1cb5ccf721.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/aero/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-d72134935a1646d3cb887a1cb5ccf721.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/aero/sounds/card_turn.ogg b/themes/aero/sounds/card_turn.ogg new file mode 100644 index 0000000..9e9ab3b Binary files /dev/null and b/themes/aero/sounds/card_turn.ogg differ diff --git a/themes/aero/sounds/card_turn.ogg.import b/themes/aero/sounds/card_turn.ogg.import new file mode 100644 index 0000000..23651dc --- /dev/null +++ b/themes/aero/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://c36kb3e70dx7a" +path="res://.godot/imported/card_turn.ogg-0d17e4a4f1a9ebc96cf5474d22efbb95.oggvorbisstr" + +[deps] + +source_file="res://themes/aero/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-0d17e4a4f1a9ebc96cf5474d22efbb95.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/aero/sounds/roll.ogg b/themes/aero/sounds/roll.ogg new file mode 100644 index 0000000..6362417 Binary files /dev/null and b/themes/aero/sounds/roll.ogg differ diff --git a/themes/aero/sounds/roll.ogg.import b/themes/aero/sounds/roll.ogg.import new file mode 100644 index 0000000..2498909 --- /dev/null +++ b/themes/aero/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dx6loyuhs0i32" +path="res://.godot/imported/roll.ogg-7995a324b8b498a02d8fdf076a28345c.oggvorbisstr" + +[deps] + +source_file="res://themes/aero/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-7995a324b8b498a02d8fdf076a28345c.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/aero/theme.gd b/themes/aero/theme.gd new file mode 100644 index 0000000..94ee4a1 --- /dev/null +++ b/themes/aero/theme.gd @@ -0,0 +1,112 @@ +extends RefCounted +## Built-in theme: Frutiger Aero. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "aero", + "name": "Frutiger Aero", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "asap", + "font_display": "asap", + "background": { + "kind": "linear", + "colors": [ + "#5fd6fb", + "#a9ecff", + "#f2fcff" + ], + "angle": 90 + }, + "panel": { + "kind": "linear", + "colors": [ + "#ffffff", + "#e6f7ff", + "#c8ebff" + ], + "angle": 90 + }, + "mascot_colors": { + "outline": "#0b3a63", + "cloth": "#0c71c6", + "trim": "#86e750", + "eye": "#74e4ff", + "eye_glint": "#ffffff", + "inner_line": "#0c5899" + }, + "background_scene": { + "file": "background_scene.svg", + "anchor": "bottom" + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_size": [ + 128, + 128 + ], + "edge_size": [ + 80, + 64 + ], + "side_mid": 40, + "top_mid": 40, + "edge_mid": 40, + "scale": 0.25, + "outset": 11.0, + "pad": 2, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 32, + 24 + ], + "width": 15.0 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#a9ecff", + "BG_DEEP": "#5d828c", + "BG_HOVER": "#b6efff", + "PANEL": "#e6f7ff", + "ON_BG": "#0b3a63", + "ON_BG_MUTED": "#3e6688", + "CARD": "#ffffff", + "CARD_SOFT": "#f1faff", + "CARD_HOVER": "#e2f2fa", + "CARD_SHADE": "#d3dde5", + "INK": "#0b3a63", + "MUTED": "#4f7898", + "FAINT": "#95aec1", + "RULE": "#cfe9f7", + "DASH": "#95b6cc", + "HOVER_ROW": "#f2fcea", + "STRIPE": "#0b3a630e", + "TRIM": "#0c71c6", + "TRIM_DARK": "#0a4f8c", + "THREAD": "#6ab63f", + "THREAD_DARK": "#3f7f22", + "ACCENT": "#86e750", + "ACCENT_DARK": "#3c6824", + "GROUP": "#86e750", + "LIT": "#d9f7c4", + "FLICK": "#86e75059", + "PULSE": "#dbf8ca", + "GLOW": "#74e4ff", + "VALUE_BG": "#e9fbe0", + "VALUE_BORDER": "#bcf29f", + "VALUE_INK": "#437428", + "VALUE_INK_ON_BG": "#86e750", + "REF_BG": "#e3faff", + "REF_INK": "#3a7280", + "REF_INK_ON_BG": "#9eecff" + } +} diff --git a/themes/aero/theme.gd.uid b/themes/aero/theme.gd.uid new file mode 100644 index 0000000..50ee373 --- /dev/null +++ b/themes/aero/theme.gd.uid @@ -0,0 +1 @@ +uid://p325x37dldk6 diff --git a/themes/aero/thread_strip.svg b/themes/aero/thread_strip.svg new file mode 100644 index 0000000..ca12754 --- /dev/null +++ b/themes/aero/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/aero/thread_strip.svg.import b/themes/aero/thread_strip.svg.import new file mode 100644 index 0000000..b9991de --- /dev/null +++ b/themes/aero/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3j7lbavrloo7" +path="res://.godot/imported/thread_strip.svg-c1c482dd979ff9229700e4c00d815c47.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/aero/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-c1c482dd979ff9229700e4c00d815c47.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/autumn/background_tile.svg b/themes/autumn/background_tile.svg new file mode 100644 index 0000000..7aba3e1 --- /dev/null +++ b/themes/autumn/background_tile.svg @@ -0,0 +1 @@ + diff --git a/themes/autumn/background_tile.svg.import b/themes/autumn/background_tile.svg.import new file mode 100644 index 0000000..823b20a --- /dev/null +++ b/themes/autumn/background_tile.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d04ef7t3vkaca" +path="res://.godot/imported/background_tile.svg-d991c502974637ce05289054aa88d6bb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/autumn/background_tile.svg" +dest_files=["res://.godot/imported/background_tile.svg-d991c502974637ce05289054aa88d6bb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/autumn/frame_corner.svg b/themes/autumn/frame_corner.svg new file mode 100644 index 0000000..ca35fcb --- /dev/null +++ b/themes/autumn/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/autumn/frame_corner.svg.import b/themes/autumn/frame_corner.svg.import new file mode 100644 index 0000000..bfb0b26 --- /dev/null +++ b/themes/autumn/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://2h6jjq784rrs" +path="res://.godot/imported/frame_corner.svg-2cc21d8943ea723585e9035b143ac5cf.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/autumn/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-2cc21d8943ea723585e9035b143ac5cf.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/autumn/frame_corner_fixed.svg b/themes/autumn/frame_corner_fixed.svg new file mode 100644 index 0000000..734edab --- /dev/null +++ b/themes/autumn/frame_corner_fixed.svg @@ -0,0 +1 @@ + diff --git a/themes/autumn/frame_corner_fixed.svg.import b/themes/autumn/frame_corner_fixed.svg.import new file mode 100644 index 0000000..2090b5e --- /dev/null +++ b/themes/autumn/frame_corner_fixed.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbgienkq6qkfx" +path="res://.godot/imported/frame_corner_fixed.svg-705ff76e410803596d585bad414fde7a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/autumn/frame_corner_fixed.svg" +dest_files=["res://.godot/imported/frame_corner_fixed.svg-705ff76e410803596d585bad414fde7a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/autumn/frame_edge.svg b/themes/autumn/frame_edge.svg new file mode 100644 index 0000000..c0b9fb0 --- /dev/null +++ b/themes/autumn/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/autumn/frame_edge.svg.import b/themes/autumn/frame_edge.svg.import new file mode 100644 index 0000000..7685c47 --- /dev/null +++ b/themes/autumn/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bgsnrgothub6t" +path="res://.godot/imported/frame_edge.svg-58efed93fb8d4eac1a9477de892b6a31.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/autumn/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-58efed93fb8d4eac1a9477de892b6a31.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/autumn/sounds/card_turn.ogg b/themes/autumn/sounds/card_turn.ogg new file mode 100644 index 0000000..8d45cde Binary files /dev/null and b/themes/autumn/sounds/card_turn.ogg differ diff --git a/themes/autumn/sounds/card_turn.ogg.import b/themes/autumn/sounds/card_turn.ogg.import new file mode 100644 index 0000000..e676f1f --- /dev/null +++ b/themes/autumn/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://bmdkhyygvv2xe" +path="res://.godot/imported/card_turn.ogg-92cdd637d992e54956254659d852903b.oggvorbisstr" + +[deps] + +source_file="res://themes/autumn/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-92cdd637d992e54956254659d852903b.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/autumn/sounds/roll.ogg b/themes/autumn/sounds/roll.ogg new file mode 100644 index 0000000..95da029 Binary files /dev/null and b/themes/autumn/sounds/roll.ogg differ diff --git a/themes/autumn/sounds/roll.ogg.import b/themes/autumn/sounds/roll.ogg.import new file mode 100644 index 0000000..92ca050 --- /dev/null +++ b/themes/autumn/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://d0n27ipfejjxt" +path="res://.godot/imported/roll.ogg-1c061f052be22d6cb2030f82a5f06888.oggvorbisstr" + +[deps] + +source_file="res://themes/autumn/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-1c061f052be22d6cb2030f82a5f06888.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/autumn/theme.gd b/themes/autumn/theme.gd new file mode 100644 index 0000000..90ae9e7 --- /dev/null +++ b/themes/autumn/theme.gd @@ -0,0 +1,114 @@ +extends RefCounted +## Built-in theme: Cozy Autumn. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "autumn", + "name": "Cozy Autumn", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "lora", + "font_display": "fraunces", + "background": { + "kind": "radial", + "colors": [ + "#cf6811", + "#8f3d0c", + "#421a05" + ], + "center": [ + 0.35, + 0.25 + ] + }, + "panel": { + "kind": "solid", + "colors": [ + "#3a1704" + ] + }, + "mascot_colors": { + "outline": "#2c1204", + "cloth": "#a43108", + "trim": "#d59f3f", + "eye": "#8a7424", + "eye_glint": "#ebd48f", + "inner_line": "#6e2306" + }, + "background_tile": { + "file": "background_tile.svg", + "opacity": 0.55, + "scale": 1.0 + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_fixed": "frame_corner_fixed.svg", + "corner_size": [ + 176, + 176 + ], + "edge_size": [ + 128, + 64 + ], + "side_mid": 64, + "top_mid": 64, + "edge_mid": 64, + "scale": 0.25, + "outset": 16.0, + "pad": 4, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 32, + 16 + ], + "width": 10.0 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#8f3d0c", + "BG_DEEP": "#4f2207", + "BG_HOVER": "#a05a30", + "PANEL": "#3a1704", + "ON_BG": "#fbefc8", + "ON_BG_MUTED": "#d5b186", + "CARD": "#f8ebc6", + "CARD_SOFT": "#fbf2d9", + "CARD_HOVER": "#ebd8a9", + "CARD_SHADE": "#d8c79f", + "INK": "#3a1a06", + "MUTED": "#7a5a2a", + "FAINT": "#ac9468", + "RULE": "#e2cc95", + "DASH": "#b39965", + "HOVER_ROW": "#f5e1ab", + "STRIPE": "#3a1a060e", + "TRIM": "#a43108", + "TRIM_DARK": "#5c2004", + "THREAD": "#d59f3f", + "THREAD_DARK": "#5c5011", + "ACCENT": "#f0a040", + "ACCENT_DARK": "#5d2f08", + "GROUP": "#cf6811", + "LIT": "#f0cf7a", + "FLICK": "#cf681159", + "PULSE": "#f1d2b8", + "GLOW": "#8a7424", + "VALUE_BG": "#f1d3a5", + "VALUE_BORDER": "#e1a362", + "VALUE_INK": "#683408", + "VALUE_INK_ON_BG": "#cf6811", + "REF_BG": "#e2d3a6", + "REF_INK": "#453a12", + "REF_INK_ON_BG": "#ad9e66" + } +} diff --git a/themes/autumn/theme.gd.uid b/themes/autumn/theme.gd.uid new file mode 100644 index 0000000..315f67a --- /dev/null +++ b/themes/autumn/theme.gd.uid @@ -0,0 +1 @@ +uid://baunnq7dh2sp1 diff --git a/themes/autumn/thread_strip.svg b/themes/autumn/thread_strip.svg new file mode 100644 index 0000000..9b135f4 --- /dev/null +++ b/themes/autumn/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/autumn/thread_strip.svg.import b/themes/autumn/thread_strip.svg.import new file mode 100644 index 0000000..1eac80a --- /dev/null +++ b/themes/autumn/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dckekpqhi0m1r" +path="res://.godot/imported/thread_strip.svg-2a072722f8fc17426fdbcbac46a37ff3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/autumn/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-2a072722f8fc17426fdbcbac46a37ff3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/gothic/background_scene.svg b/themes/gothic/background_scene.svg new file mode 100644 index 0000000..1a8d206 --- /dev/null +++ b/themes/gothic/background_scene.svg @@ -0,0 +1 @@ + diff --git a/themes/gothic/background_scene.svg.import b/themes/gothic/background_scene.svg.import new file mode 100644 index 0000000..1642e02 --- /dev/null +++ b/themes/gothic/background_scene.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://sdddcd1wboy8" +path="res://.godot/imported/background_scene.svg-b4e610f79ecb74f7a531d3248b4db6f1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/gothic/background_scene.svg" +dest_files=["res://.godot/imported/background_scene.svg-b4e610f79ecb74f7a531d3248b4db6f1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/gothic/background_tile.svg b/themes/gothic/background_tile.svg new file mode 100644 index 0000000..a70f65b --- /dev/null +++ b/themes/gothic/background_tile.svg @@ -0,0 +1 @@ + diff --git a/themes/gothic/background_tile.svg.import b/themes/gothic/background_tile.svg.import new file mode 100644 index 0000000..2e6ebfb --- /dev/null +++ b/themes/gothic/background_tile.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c12klxmoucdm2" +path="res://.godot/imported/background_tile.svg-a4cf0252206660ac28c73f4689203337.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/gothic/background_tile.svg" +dest_files=["res://.godot/imported/background_tile.svg-a4cf0252206660ac28c73f4689203337.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/gothic/frame_corner.svg b/themes/gothic/frame_corner.svg new file mode 100644 index 0000000..8471735 --- /dev/null +++ b/themes/gothic/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/gothic/frame_corner.svg.import b/themes/gothic/frame_corner.svg.import new file mode 100644 index 0000000..1462fdc --- /dev/null +++ b/themes/gothic/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3wfcbdmhvitf" +path="res://.godot/imported/frame_corner.svg-102c91043b0a3b060d862bd6ed7a382e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/gothic/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-102c91043b0a3b060d862bd6ed7a382e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/gothic/frame_edge.svg b/themes/gothic/frame_edge.svg new file mode 100644 index 0000000..8a01064 --- /dev/null +++ b/themes/gothic/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/gothic/frame_edge.svg.import b/themes/gothic/frame_edge.svg.import new file mode 100644 index 0000000..23c5522 --- /dev/null +++ b/themes/gothic/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://i3l25vub04m" +path="res://.godot/imported/frame_edge.svg-d80a8c7bcc509dd58c4c9d4238d18996.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/gothic/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-d80a8c7bcc509dd58c4c9d4238d18996.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/gothic/sounds/card_turn.ogg b/themes/gothic/sounds/card_turn.ogg new file mode 100644 index 0000000..a1198c2 Binary files /dev/null and b/themes/gothic/sounds/card_turn.ogg differ diff --git a/themes/gothic/sounds/card_turn.ogg.import b/themes/gothic/sounds/card_turn.ogg.import new file mode 100644 index 0000000..6e0d67b --- /dev/null +++ b/themes/gothic/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dhjih53e7fsao" +path="res://.godot/imported/card_turn.ogg-8874c63dbf028fed84c265c8cffa2dd3.oggvorbisstr" + +[deps] + +source_file="res://themes/gothic/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-8874c63dbf028fed84c265c8cffa2dd3.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/gothic/sounds/roll.ogg b/themes/gothic/sounds/roll.ogg new file mode 100644 index 0000000..dd09c0d Binary files /dev/null and b/themes/gothic/sounds/roll.ogg differ diff --git a/themes/gothic/sounds/roll.ogg.import b/themes/gothic/sounds/roll.ogg.import new file mode 100644 index 0000000..342219b --- /dev/null +++ b/themes/gothic/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://ljouhbs6sbp2" +path="res://.godot/imported/roll.ogg-93cbd0df342f307a97282d0c49e8c6fd.oggvorbisstr" + +[deps] + +source_file="res://themes/gothic/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-93cbd0df342f307a97282d0c49e8c6fd.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/gothic/theme.gd b/themes/gothic/theme.gd new file mode 100644 index 0000000..1d87ee6 --- /dev/null +++ b/themes/gothic/theme.gd @@ -0,0 +1,117 @@ +extends RefCounted +## Built-in theme: Gothic. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "gothic", + "name": "Gothic", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "imfell", + "font_display": "unifraktur", + "background": { + "kind": "radial", + "colors": [ + "#223330", + "#1b2826", + "#081919" + ], + "center": [ + 0.5, + 0.4 + ] + }, + "panel": { + "kind": "solid", + "colors": [ + "#060f0f" + ] + }, + "mascot_colors": { + "outline": "#081919", + "cloth": "#65060e", + "trim": "#837f78", + "eye": "#ce1a1e", + "eye_glint": "#ffd6d6", + "inner_line": "#3b0f13" + }, + "background_scene": { + "file": "background_scene.svg", + "anchor": "center" + }, + "background_tile": { + "file": "background_tile.svg", + "opacity": 0.9, + "scale": 1.0 + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_size": [ + 168, + 168 + ], + "edge_size": [ + 112, + 96 + ], + "side_mid": 56, + "top_mid": 56, + "edge_mid": 56, + "scale": 0.25, + "outset": 14.0, + "pad": 7, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 32, + 16 + ], + "width": 10.0 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#1b2826", + "BG_DEEP": "#0f1615", + "BG_HOVER": "#3d4847", + "PANEL": "#060f0f", + "ON_BG": "#d9d4cc", + "ON_BG_MUTED": "#969892", + "CARD": "#d8d3c8", + "CARD_SOFT": "#e2ddd3", + "CARD_HOVER": "#c4beb2", + "CARD_SHADE": "#b5b3a9", + "INK": "#120d0d", + "MUTED": "#4d524b", + "FAINT": "#85867d", + "RULE": "#b6b0a4", + "DASH": "#87867c", + "HOVER_ROW": "#dfcdc4", + "STRIPE": "#120d0d0e", + "TRIM": "#837f78", + "TRIM_DARK": "#223330", + "THREAD": "#ce1a1e", + "THREAD_DARK": "#65060e", + "ACCENT": "#ce1a1e", + "ACCENT_DARK": "#5d0c0d", + "GROUP": "#ce1a1e", + "LIT": "#ecc2bd", + "FLICK": "#ce1a1e59", + "PULSE": "#f0babb", + "GLOW": "#ce1a1e", + "VALUE_BG": "#d6b2a9", + "VALUE_BORDER": "#d26d6a", + "VALUE_INK": "#670d0f", + "VALUE_INK_ON_BG": "#ce1a1e", + "REF_BG": "#d6aea6", + "REF_INK": "#670d0f", + "REF_INK_ON_BG": "#dd5f62" + } +} diff --git a/themes/gothic/theme.gd.uid b/themes/gothic/theme.gd.uid new file mode 100644 index 0000000..af977b8 --- /dev/null +++ b/themes/gothic/theme.gd.uid @@ -0,0 +1 @@ +uid://2e3ca1cqt2eu diff --git a/themes/gothic/thread_strip.svg b/themes/gothic/thread_strip.svg new file mode 100644 index 0000000..811c658 --- /dev/null +++ b/themes/gothic/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/gothic/thread_strip.svg.import b/themes/gothic/thread_strip.svg.import new file mode 100644 index 0000000..57f8fe4 --- /dev/null +++ b/themes/gothic/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7w5n1nijts7i" +path="res://.godot/imported/thread_strip.svg-b82da4fc5bbe29d635bd6eba21eee425.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/gothic/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-b82da4fc5bbe29d635bd6eba21eee425.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/rustic/background_tile.svg b/themes/rustic/background_tile.svg new file mode 100644 index 0000000..409963f --- /dev/null +++ b/themes/rustic/background_tile.svg @@ -0,0 +1 @@ + diff --git a/themes/rustic/background_tile.svg.import b/themes/rustic/background_tile.svg.import new file mode 100644 index 0000000..d310cb2 --- /dev/null +++ b/themes/rustic/background_tile.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5at1ejn7i644" +path="res://.godot/imported/background_tile.svg-e0f39bb323523c408b3b458a7e6249db.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/rustic/background_tile.svg" +dest_files=["res://.godot/imported/background_tile.svg-e0f39bb323523c408b3b458a7e6249db.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/rustic/frame_corner.svg b/themes/rustic/frame_corner.svg new file mode 100644 index 0000000..f17ea49 --- /dev/null +++ b/themes/rustic/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/rustic/frame_corner.svg.import b/themes/rustic/frame_corner.svg.import new file mode 100644 index 0000000..f4609c0 --- /dev/null +++ b/themes/rustic/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bjpkqjm24d0an" +path="res://.godot/imported/frame_corner.svg-cbb751f29dc1b869fb76ab8d03a3eeae.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/rustic/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-cbb751f29dc1b869fb76ab8d03a3eeae.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/rustic/frame_corner_fixed.svg b/themes/rustic/frame_corner_fixed.svg new file mode 100644 index 0000000..42688cc --- /dev/null +++ b/themes/rustic/frame_corner_fixed.svg @@ -0,0 +1 @@ + diff --git a/themes/rustic/frame_corner_fixed.svg.import b/themes/rustic/frame_corner_fixed.svg.import new file mode 100644 index 0000000..8cc3808 --- /dev/null +++ b/themes/rustic/frame_corner_fixed.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmp77m1xpfya6" +path="res://.godot/imported/frame_corner_fixed.svg-d26904200bdf11b27b13119091bae418.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/rustic/frame_corner_fixed.svg" +dest_files=["res://.godot/imported/frame_corner_fixed.svg-d26904200bdf11b27b13119091bae418.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/rustic/frame_edge.svg b/themes/rustic/frame_edge.svg new file mode 100644 index 0000000..d7c7f99 --- /dev/null +++ b/themes/rustic/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/rustic/frame_edge.svg.import b/themes/rustic/frame_edge.svg.import new file mode 100644 index 0000000..3b5c820 --- /dev/null +++ b/themes/rustic/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dl17d3swsydhl" +path="res://.godot/imported/frame_edge.svg-b40de194b600c9d5852d176a160b7b88.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/rustic/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-b40de194b600c9d5852d176a160b7b88.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/rustic/sounds/card_turn.ogg b/themes/rustic/sounds/card_turn.ogg new file mode 100644 index 0000000..18b5bf1 Binary files /dev/null and b/themes/rustic/sounds/card_turn.ogg differ diff --git a/themes/rustic/sounds/card_turn.ogg.import b/themes/rustic/sounds/card_turn.ogg.import new file mode 100644 index 0000000..713919e --- /dev/null +++ b/themes/rustic/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://3wk22t1botdm" +path="res://.godot/imported/card_turn.ogg-10e19394a1cc2df955779f7d29f14eff.oggvorbisstr" + +[deps] + +source_file="res://themes/rustic/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-10e19394a1cc2df955779f7d29f14eff.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/rustic/sounds/roll.ogg b/themes/rustic/sounds/roll.ogg new file mode 100644 index 0000000..42ea344 Binary files /dev/null and b/themes/rustic/sounds/roll.ogg differ diff --git a/themes/rustic/sounds/roll.ogg.import b/themes/rustic/sounds/roll.ogg.import new file mode 100644 index 0000000..54c5253 --- /dev/null +++ b/themes/rustic/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://jn2fnp52ds01" +path="res://.godot/imported/roll.ogg-bbab39e71e1545e652e5846253214b98.oggvorbisstr" + +[deps] + +source_file="res://themes/rustic/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-bbab39e71e1545e652e5846253214b98.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/rustic/theme.gd b/themes/rustic/theme.gd new file mode 100644 index 0000000..a8269b1 --- /dev/null +++ b/themes/rustic/theme.gd @@ -0,0 +1,114 @@ +extends RefCounted +## Built-in theme: Rustic. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "rustic", + "name": "Rustic", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "atkinson", + "font_display": "zillaslab", + "background": { + "kind": "radial", + "colors": [ + "#6a2a12", + "#4e1c0d", + "#2a0f06" + ], + "center": [ + 0.4, + 0.3 + ] + }, + "panel": { + "kind": "solid", + "colors": [ + "#1c2321" + ] + }, + "mascot_colors": { + "outline": "#0f1111", + "cloth": "#8c2e0f", + "trim": "#dd8838", + "eye": "#f2a65a", + "eye_glint": "#ffe1b0", + "inner_line": "#542110" + }, + "background_tile": { + "file": "background_tile.svg", + "opacity": 0.92, + "scale": 1.0 + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_fixed": "frame_corner_fixed.svg", + "corner_size": [ + 112, + 112 + ], + "edge_size": [ + 80, + 128 + ], + "side_mid": 40, + "top_mid": 40, + "edge_mid": 40, + "scale": 0.25, + "outset": 7.0, + "pad": 10, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 24, + 22.0 + ], + "width": 13.8 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#4e1c0d", + "BG_DEEP": "#2b0f07", + "BG_HOVER": "#693e31", + "PANEL": "#1c2321", + "ON_BG": "#f3dfc2", + "ON_BG_MUTED": "#b99b83", + "CARD": "#f1e2c8", + "CARD_SOFT": "#f7ecd9", + "CARD_HOVER": "#e4d0b1", + "CARD_SHADE": "#d0bea6", + "INK": "#1c1310", + "MUTED": "#6e5040", + "FAINT": "#a28a76", + "RULE": "#dcc4a2", + "DASH": "#ab9076", + "HOVER_ROW": "#f3d9b3", + "STRIPE": "#1c13100e", + "TRIM": "#8c2e0f", + "TRIM_DARK": "#4e1c0d", + "THREAD": "#dd8838", + "THREAD_DARK": "#6b3a12", + "ACCENT": "#dd8838", + "ACCENT_DARK": "#633d19", + "GROUP": "#dd8838", + "LIT": "#f6c98d", + "FLICK": "#dd883859", + "PULSE": "#f5dbc3", + "GLOW": "#c24f1d", + "VALUE_BG": "#edd2ae", + "VALUE_BORDER": "#e6b079", + "VALUE_INK": "#6e441c", + "VALUE_INK_ON_BG": "#dd8838", + "REF_BG": "#e8c5a6", + "REF_INK": "#61280e", + "REF_INK_ON_BG": "#d48461" + } +} diff --git a/themes/rustic/theme.gd.uid b/themes/rustic/theme.gd.uid new file mode 100644 index 0000000..bb74dd7 --- /dev/null +++ b/themes/rustic/theme.gd.uid @@ -0,0 +1 @@ +uid://b05kh0jn2kdnj diff --git a/themes/rustic/thread_strip.svg b/themes/rustic/thread_strip.svg new file mode 100644 index 0000000..7fc42ce --- /dev/null +++ b/themes/rustic/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/rustic/thread_strip.svg.import b/themes/rustic/thread_strip.svg.import new file mode 100644 index 0000000..227a175 --- /dev/null +++ b/themes/rustic/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://q1sb6egmu6u1" +path="res://.godot/imported/thread_strip.svg-9dd8633135132abb47536d1c6ca86763.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/rustic/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-9dd8633135132abb47536d1c6ca86763.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/sky/background_scene.svg b/themes/sky/background_scene.svg new file mode 100644 index 0000000..2d319f3 --- /dev/null +++ b/themes/sky/background_scene.svg @@ -0,0 +1 @@ + diff --git a/themes/sky/background_scene.svg.import b/themes/sky/background_scene.svg.import new file mode 100644 index 0000000..6533c91 --- /dev/null +++ b/themes/sky/background_scene.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dopa7fkcwa0se" +path="res://.godot/imported/background_scene.svg-d428c305164f5943d18a54ecba658d36.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/sky/background_scene.svg" +dest_files=["res://.godot/imported/background_scene.svg-d428c305164f5943d18a54ecba658d36.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/sky/frame_corner.svg b/themes/sky/frame_corner.svg new file mode 100644 index 0000000..ad92454 --- /dev/null +++ b/themes/sky/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/sky/frame_corner.svg.import b/themes/sky/frame_corner.svg.import new file mode 100644 index 0000000..b6c58e3 --- /dev/null +++ b/themes/sky/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://chcrdhigcgvs2" +path="res://.godot/imported/frame_corner.svg-4d867db3db473a4a69ca58d273128284.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/sky/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-4d867db3db473a4a69ca58d273128284.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/sky/frame_corner_fixed.svg b/themes/sky/frame_corner_fixed.svg new file mode 100644 index 0000000..6021352 --- /dev/null +++ b/themes/sky/frame_corner_fixed.svg @@ -0,0 +1 @@ + diff --git a/themes/sky/frame_corner_fixed.svg.import b/themes/sky/frame_corner_fixed.svg.import new file mode 100644 index 0000000..86110ef --- /dev/null +++ b/themes/sky/frame_corner_fixed.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cnp784f5diwd2" +path="res://.godot/imported/frame_corner_fixed.svg-7561f4c94f24a75c4da17faefc86d3bb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/sky/frame_corner_fixed.svg" +dest_files=["res://.godot/imported/frame_corner_fixed.svg-7561f4c94f24a75c4da17faefc86d3bb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/sky/frame_edge.svg b/themes/sky/frame_edge.svg new file mode 100644 index 0000000..2c31b78 --- /dev/null +++ b/themes/sky/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/sky/frame_edge.svg.import b/themes/sky/frame_edge.svg.import new file mode 100644 index 0000000..e97efd4 --- /dev/null +++ b/themes/sky/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctfy6ho5enjsn" +path="res://.godot/imported/frame_edge.svg-b99ea504564aadf96984e5301da23268.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/sky/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-b99ea504564aadf96984e5301da23268.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/sky/sounds/card_turn.ogg b/themes/sky/sounds/card_turn.ogg new file mode 100644 index 0000000..491cb57 Binary files /dev/null and b/themes/sky/sounds/card_turn.ogg differ diff --git a/themes/sky/sounds/card_turn.ogg.import b/themes/sky/sounds/card_turn.ogg.import new file mode 100644 index 0000000..6bcb224 --- /dev/null +++ b/themes/sky/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://bw1n06vnnus5g" +path="res://.godot/imported/card_turn.ogg-bd208f15a42a7d8eed68bb53177a9b17.oggvorbisstr" + +[deps] + +source_file="res://themes/sky/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-bd208f15a42a7d8eed68bb53177a9b17.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/sky/sounds/roll.ogg b/themes/sky/sounds/roll.ogg new file mode 100644 index 0000000..4880889 Binary files /dev/null and b/themes/sky/sounds/roll.ogg differ diff --git a/themes/sky/sounds/roll.ogg.import b/themes/sky/sounds/roll.ogg.import new file mode 100644 index 0000000..ecfbb75 --- /dev/null +++ b/themes/sky/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://d0vd85mfg1sl5" +path="res://.godot/imported/roll.ogg-d40371c940fa6999732857e662a5054c.oggvorbisstr" + +[deps] + +source_file="res://themes/sky/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-d40371c940fa6999732857e662a5054c.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/sky/theme.gd b/themes/sky/theme.gd new file mode 100644 index 0000000..949a918 --- /dev/null +++ b/themes/sky/theme.gd @@ -0,0 +1,113 @@ +extends RefCounted +## Built-in theme: Sky Blue. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "sky", + "name": "Sky Blue", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "nunito", + "font_display": "quicksand", + "background": { + "kind": "linear", + "colors": [ + "#0077ff", + "#00a8ff", + "#66d9ff", + "#d9f3ff" + ], + "angle": 90 + }, + "panel": { + "kind": "linear", + "colors": [ + "#0062d6", + "#0077ff" + ], + "angle": 0 + }, + "mascot_colors": { + "outline": "#0b2a55", + "cloth": "#009dff", + "trim": "#eaf7ff", + "eye": "#ffd75e", + "eye_glint": "#ffffff", + "inner_line": "#0569b3" + }, + "background_scene": { + "file": "background_scene.svg", + "anchor": "center" + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_fixed": "frame_corner_fixed.svg", + "corner_size": [ + 288, + 176 + ], + "edge_size": [ + 96, + 64 + ], + "side_mid": 48, + "top_mid": 48, + "edge_mid": 48, + "scale": 0.25, + "outset": 14.0, + "pad": 2, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 32, + 24 + ], + "width": 15.0 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#00a8ff", + "BG_DEEP": "#005c8c", + "BG_HOVER": "#26b5ff", + "PANEL": "#0062d6", + "ON_BG": "#ffffff", + "ON_BG_MUTED": "#e3f4ff", + "CARD": "#ffffff", + "CARD_SOFT": "#f1f9ff", + "CARD_HOVER": "#e5f4fd", + "CARD_SHADE": "#d2dbe6", + "INK": "#0b2a55", + "MUTED": "#4d6f99", + "FAINT": "#94a9c2", + "RULE": "#d4ecfb", + "DASH": "#97b4cf", + "HOVER_ROW": "#eef9ff", + "STRIPE": "#0b2a550e", + "TRIM": "#009dff", + "TRIM_DARK": "#0062d6", + "THREAD": "#ffffff", + "THREAD_DARK": "#0077ff", + "ACCENT": "#ffd75e", + "ACCENT_DARK": "#73612a", + "GROUP": "#ffd75e", + "LIT": "#cfefff", + "FLICK": "#ffd75e59", + "PULSE": "#fff3cf", + "GLOW": "#ffd75e", + "VALUE_BG": "#fff8e2", + "VALUE_BORDER": "#ffe9a6", + "VALUE_INK": "#806c2f", + "VALUE_INK_ON_BG": "#ffd75e", + "REF_BG": "#fff7df", + "REF_INK": "#806c2f", + "REF_INK_ON_BG": "#ffe38e" + } +} diff --git a/themes/sky/theme.gd.uid b/themes/sky/theme.gd.uid new file mode 100644 index 0000000..e5cb3b0 --- /dev/null +++ b/themes/sky/theme.gd.uid @@ -0,0 +1 @@ +uid://ca60oa2qmf3yk diff --git a/themes/sky/thread_strip.svg b/themes/sky/thread_strip.svg new file mode 100644 index 0000000..7fc47f4 --- /dev/null +++ b/themes/sky/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/sky/thread_strip.svg.import b/themes/sky/thread_strip.svg.import new file mode 100644 index 0000000..9b40048 --- /dev/null +++ b/themes/sky/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdn2jkaeqmkjt" +path="res://.godot/imported/thread_strip.svg-9799fad231d3fb2e440a88dced158595.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/sky/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-9799fad231d3fb2e440a88dced158595.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/synthwave/background_scene.svg b/themes/synthwave/background_scene.svg new file mode 100644 index 0000000..ed9c113 --- /dev/null +++ b/themes/synthwave/background_scene.svg @@ -0,0 +1 @@ + diff --git a/themes/synthwave/background_scene.svg.import b/themes/synthwave/background_scene.svg.import new file mode 100644 index 0000000..f083ccd --- /dev/null +++ b/themes/synthwave/background_scene.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://buw34k71n1421" +path="res://.godot/imported/background_scene.svg-ea1eb2f5c2cf295ecae51a0c3708f1ac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/synthwave/background_scene.svg" +dest_files=["res://.godot/imported/background_scene.svg-ea1eb2f5c2cf295ecae51a0c3708f1ac.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/synthwave/frame_corner.svg b/themes/synthwave/frame_corner.svg new file mode 100644 index 0000000..ef331e0 --- /dev/null +++ b/themes/synthwave/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/synthwave/frame_corner.svg.import b/themes/synthwave/frame_corner.svg.import new file mode 100644 index 0000000..17b3c0d --- /dev/null +++ b/themes/synthwave/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpcjnb1s1jdd6" +path="res://.godot/imported/frame_corner.svg-71ab896f23c835bcfb9451c264045bde.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/synthwave/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-71ab896f23c835bcfb9451c264045bde.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/synthwave/frame_edge.svg b/themes/synthwave/frame_edge.svg new file mode 100644 index 0000000..275c313 --- /dev/null +++ b/themes/synthwave/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/synthwave/frame_edge.svg.import b/themes/synthwave/frame_edge.svg.import new file mode 100644 index 0000000..5202a84 --- /dev/null +++ b/themes/synthwave/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvilkg2sj0uw3" +path="res://.godot/imported/frame_edge.svg-8fa3f808cbf9765e706b4e4e1b75f6ca.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/synthwave/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-8fa3f808cbf9765e706b4e4e1b75f6ca.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/synthwave/sounds/card_turn.ogg b/themes/synthwave/sounds/card_turn.ogg new file mode 100644 index 0000000..4d658d0 Binary files /dev/null and b/themes/synthwave/sounds/card_turn.ogg differ diff --git a/themes/synthwave/sounds/card_turn.ogg.import b/themes/synthwave/sounds/card_turn.ogg.import new file mode 100644 index 0000000..099d89c --- /dev/null +++ b/themes/synthwave/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://6buaq3hvtq62" +path="res://.godot/imported/card_turn.ogg-4a018dddfaf631b1c856873934b08930.oggvorbisstr" + +[deps] + +source_file="res://themes/synthwave/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-4a018dddfaf631b1c856873934b08930.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/synthwave/sounds/roll.ogg b/themes/synthwave/sounds/roll.ogg new file mode 100644 index 0000000..672ce96 Binary files /dev/null and b/themes/synthwave/sounds/roll.ogg differ diff --git a/themes/synthwave/sounds/roll.ogg.import b/themes/synthwave/sounds/roll.ogg.import new file mode 100644 index 0000000..c5ca978 --- /dev/null +++ b/themes/synthwave/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dpn80chpod14k" +path="res://.godot/imported/roll.ogg-43ed0d77e5a7532e8411f665fda50864.oggvorbisstr" + +[deps] + +source_file="res://themes/synthwave/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-43ed0d77e5a7532e8411f665fda50864.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/synthwave/theme.gd b/themes/synthwave/theme.gd new file mode 100644 index 0000000..6c7e554 --- /dev/null +++ b/themes/synthwave/theme.gd @@ -0,0 +1,115 @@ +extends RefCounted +## Built-in theme: Synthwave. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "synthwave", + "name": "Synthwave", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "atkinson", + "font_display": "audiowide", + "background": { + "kind": "linear", + "colors": [ + "#1a0619", + "#2c0d2a", + "#4a1150", + "#2c0d2a" + ], + "angle": 90 + }, + "panel": { + "kind": "solid", + "colors": [ + "#14040f" + ] + }, + "mascot_colors": { + "outline": "#14040f", + "cloth": "#3a1650", + "trim": "#ed2ea5", + "eye": "#fad009", + "eye_glint": "#ffffff", + "inner_line": "#290e33" + }, + "background_scene": { + "file": "background_scene.svg", + "anchor": "bottom" + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_size": [ + 112, + 112 + ], + "edge_size": [ + 80, + 32 + ], + "side_mid": 40, + "top_mid": 40, + "edge_mid": 40, + "scale": 0.25, + "outset": 10.0, + "pad": 4, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 32, + 32 + ], + "width": 20.0 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#2c0d2a", + "BG_DEEP": "#180717", + "BG_HOVER": "#4c314a", + "PANEL": "#14040f", + "ON_BG": "#ffe6f6", + "ON_BG_MUTED": "#b59aaf", + "CARD": "#241032", + "CARD_SOFT": "#2b143b", + "CARD_HOVER": "#3b1c51", + "CARD_SHADE": "#483058", + "INK": "#ffe9f7", + "MUTED": "#b48fc8", + "FAINT": "#7a5c8c", + "RULE": "#4b2466", + "DASH": "#7a5492", + "HOVER_ROW": "#6a1a5a", + "STRIPE": "#ffe9f70e", + "TRIM": "#ed2ea5", + "TRIM_DARK": "#7a1456", + "THREAD": "#6f86ff", + "THREAD_DARK": "#2b2f7a", + "ACCENT": "#fad009", + "ACCENT_DARK": "#705e04", + "GROUP": "#fad009", + "LIT": "#ed2ea5", + "FLICK": "#fad00959", + "PULSE": "#fef1b5", + "GLOW": "#fa8057", + "VALUE_BG": "#4b332b", + "VALUE_BORDER": "#9a7a1b", + "VALUE_INK": "#fbd93a", + "VALUE_INK_ON_BG": "#fad009", + "REF_BG": "#4f2639", + "REF_INK": "#fba689", + "REF_INK_ON_BG": "#fba689", + "WARN_BG": "#5c2539", + "WARN_INK": "#ffb1a3", + "DANGER_INK": "#ff8a7a", + "OK_INK": "#7fe0a0", + "NO_INK": "#ff8a7a" + } +} diff --git a/themes/synthwave/theme.gd.uid b/themes/synthwave/theme.gd.uid new file mode 100644 index 0000000..e885907 --- /dev/null +++ b/themes/synthwave/theme.gd.uid @@ -0,0 +1 @@ +uid://cmlk30gkhkwi1 diff --git a/themes/synthwave/thread_strip.svg b/themes/synthwave/thread_strip.svg new file mode 100644 index 0000000..97f3e62 --- /dev/null +++ b/themes/synthwave/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/synthwave/thread_strip.svg.import b/themes/synthwave/thread_strip.svg.import new file mode 100644 index 0000000..3b2e0f9 --- /dev/null +++ b/themes/synthwave/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dq504vbdojuru" +path="res://.godot/imported/thread_strip.svg-373578f94e2678e203a22365248467a0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/synthwave/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-373578f94e2678e203a22365248467a0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/tarot/sounds/card_turn.ogg b/themes/tarot/sounds/card_turn.ogg new file mode 100644 index 0000000..2c3222b Binary files /dev/null and b/themes/tarot/sounds/card_turn.ogg differ diff --git a/themes/tarot/sounds/card_turn.ogg.import b/themes/tarot/sounds/card_turn.ogg.import new file mode 100644 index 0000000..394ace3 --- /dev/null +++ b/themes/tarot/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://is3q3dgaxr47" +path="res://.godot/imported/card_turn.ogg-7ec596b4f60fa61fc2066a9f672f7e50.oggvorbisstr" + +[deps] + +source_file="res://themes/tarot/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-7ec596b4f60fa61fc2066a9f672f7e50.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/tarot/sounds/roll.ogg b/themes/tarot/sounds/roll.ogg new file mode 100644 index 0000000..09e3712 Binary files /dev/null and b/themes/tarot/sounds/roll.ogg differ diff --git a/themes/tarot/sounds/roll.ogg.import b/themes/tarot/sounds/roll.ogg.import new file mode 100644 index 0000000..9571386 --- /dev/null +++ b/themes/tarot/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://cxwapuojw2i7c" +path="res://.godot/imported/roll.ogg-c81ce25c8d807e01ef6c2142790315fe.oggvorbisstr" + +[deps] + +source_file="res://themes/tarot/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-c81ce25c8d807e01ef6c2142790315fe.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/terminal/background_tile.svg b/themes/terminal/background_tile.svg new file mode 100644 index 0000000..01b9dda --- /dev/null +++ b/themes/terminal/background_tile.svg @@ -0,0 +1 @@ + diff --git a/themes/terminal/background_tile.svg.import b/themes/terminal/background_tile.svg.import new file mode 100644 index 0000000..c5cb2e2 --- /dev/null +++ b/themes/terminal/background_tile.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ds502t76ir5x8" +path="res://.godot/imported/background_tile.svg-cd942b0f505bf7ca429c49e6507c74e1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/terminal/background_tile.svg" +dest_files=["res://.godot/imported/background_tile.svg-cd942b0f505bf7ca429c49e6507c74e1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/terminal/frame_corner.svg b/themes/terminal/frame_corner.svg new file mode 100644 index 0000000..6b30b3e --- /dev/null +++ b/themes/terminal/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/terminal/frame_corner.svg.import b/themes/terminal/frame_corner.svg.import new file mode 100644 index 0000000..9b23f2a --- /dev/null +++ b/themes/terminal/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddf3rwm1laf1n" +path="res://.godot/imported/frame_corner.svg-cb0188033bc604f907eeda8b0559d34b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/terminal/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-cb0188033bc604f907eeda8b0559d34b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/terminal/frame_edge.svg b/themes/terminal/frame_edge.svg new file mode 100644 index 0000000..4fd256c --- /dev/null +++ b/themes/terminal/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/terminal/frame_edge.svg.import b/themes/terminal/frame_edge.svg.import new file mode 100644 index 0000000..f8bd434 --- /dev/null +++ b/themes/terminal/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dj2qvg75g5b4r" +path="res://.godot/imported/frame_edge.svg-7d08b89baaa523d30df0a6de5e1f521e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/terminal/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-7d08b89baaa523d30df0a6de5e1f521e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/terminal/sounds/card_turn.ogg b/themes/terminal/sounds/card_turn.ogg new file mode 100644 index 0000000..5f81220 Binary files /dev/null and b/themes/terminal/sounds/card_turn.ogg differ diff --git a/themes/terminal/sounds/card_turn.ogg.import b/themes/terminal/sounds/card_turn.ogg.import new file mode 100644 index 0000000..1b75c93 --- /dev/null +++ b/themes/terminal/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dbt5c4irv6bcy" +path="res://.godot/imported/card_turn.ogg-4d7ac9fbce37d055044f644a4dc2583b.oggvorbisstr" + +[deps] + +source_file="res://themes/terminal/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-4d7ac9fbce37d055044f644a4dc2583b.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/terminal/sounds/roll.ogg b/themes/terminal/sounds/roll.ogg new file mode 100644 index 0000000..1e13583 Binary files /dev/null and b/themes/terminal/sounds/roll.ogg differ diff --git a/themes/terminal/sounds/roll.ogg.import b/themes/terminal/sounds/roll.ogg.import new file mode 100644 index 0000000..20b2b5e --- /dev/null +++ b/themes/terminal/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://ceqciathdv080" +path="res://.godot/imported/roll.ogg-fbed773b27d2416aacb14df884ccee57.oggvorbisstr" + +[deps] + +source_file="res://themes/terminal/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-fbed773b27d2416aacb14df884ccee57.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/terminal/theme.gd b/themes/terminal/theme.gd new file mode 100644 index 0000000..87a1abf --- /dev/null +++ b/themes/terminal/theme.gd @@ -0,0 +1,112 @@ +extends RefCounted +## Built-in theme: Terminal. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "terminal", + "name": "Terminal", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "vt323", + "font_display": "vt323", + "background": { + "kind": "solid", + "colors": [ + "#000000" + ] + }, + "panel": { + "kind": "solid", + "colors": [ + "#000000" + ] + }, + "mascot_colors": { + "outline": "#33ff66", + "cloth": "#000000", + "trim": "#33ff66", + "eye": "#ffb000", + "eye_glint": "#ffffff", + "inner_line": "#0b3d18" + }, + "background_tile": { + "file": "background_tile.svg", + "opacity": 1.0, + "scale": 1.0 + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_size": [ + 128, + 128 + ], + "edge_size": [ + 68, + 32 + ], + "side_mid": 34, + "top_mid": 34, + "edge_mid": 34, + "scale": 0.25, + "outset": 8.5, + "pad": 4, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 40, + 10.0 + ], + "width": 6.2 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#000000", + "BG_DEEP": "#000000", + "BG_HOVER": "#0d4d1f", + "PANEL": "#000000", + "ON_BG": "#33ff66", + "ON_BG_MUTED": "#21a642", + "CARD": "#000000", + "CARD_SOFT": "#031a09", + "CARD_HOVER": "#115c26", + "CARD_SHADE": "#2a4030", + "INK": "#33ff66", + "MUTED": "#a6ffbf", + "FAINT": "#5fd47f", + "RULE": "#1d9940", + "DASH": "#1d9940", + "HOVER_ROW": "#051b0b", + "STRIPE": "#33ff6610", + "TRIM": "#33ff66", + "TRIM_DARK": "#0b3d18", + "THREAD": "#ffb000", + "THREAD_DARK": "#4d3500", + "ACCENT": "#ffb000", + "ACCENT_DARK": "#734f00", + "GROUP": "#ffb000", + "LIT": "#0d4d1f", + "FLICK": "#ffb00059", + "PULSE": "#ffe7b2", + "GLOW": "#33ff66", + "VALUE_BG": "#2e2000", + "VALUE_BORDER": "#8c6100", + "VALUE_INK": "#ffc033", + "VALUE_INK_ON_BG": "#ffb000", + "REF_BG": "#0a3314", + "REF_INK": "#70ff94", + "REF_INK_ON_BG": "#70ff94", + "WARN_BG": "#431a16", + "WARN_INK": "#ffb1a3", + "DANGER_INK": "#ff8a7a", + "OK_INK": "#7fe0a0", + "NO_INK": "#ff8a7a" + } +} diff --git a/themes/terminal/theme.gd.uid b/themes/terminal/theme.gd.uid new file mode 100644 index 0000000..28b6dfa --- /dev/null +++ b/themes/terminal/theme.gd.uid @@ -0,0 +1 @@ +uid://4ybv3cndwqi1 diff --git a/themes/terminal/thread_strip.svg b/themes/terminal/thread_strip.svg new file mode 100644 index 0000000..1dd5977 --- /dev/null +++ b/themes/terminal/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/terminal/thread_strip.svg.import b/themes/terminal/thread_strip.svg.import new file mode 100644 index 0000000..f189061 --- /dev/null +++ b/themes/terminal/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwdxle8s2pca7" +path="res://.godot/imported/thread_strip.svg-217b40b6ae9fbb101aef26525ff7b0e6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/terminal/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-217b40b6ae9fbb101aef26525ff7b0e6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/vaporwave/background_scene.svg b/themes/vaporwave/background_scene.svg new file mode 100644 index 0000000..b17fabd --- /dev/null +++ b/themes/vaporwave/background_scene.svg @@ -0,0 +1 @@ + diff --git a/themes/vaporwave/background_scene.svg.import b/themes/vaporwave/background_scene.svg.import new file mode 100644 index 0000000..b1ea2f4 --- /dev/null +++ b/themes/vaporwave/background_scene.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dctgt8daqqhmt" +path="res://.godot/imported/background_scene.svg-5b2ff9205ed72754b50849ca0ced070d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/vaporwave/background_scene.svg" +dest_files=["res://.godot/imported/background_scene.svg-5b2ff9205ed72754b50849ca0ced070d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/vaporwave/background_tile.svg b/themes/vaporwave/background_tile.svg new file mode 100644 index 0000000..ffb2725 --- /dev/null +++ b/themes/vaporwave/background_tile.svg @@ -0,0 +1 @@ + diff --git a/themes/vaporwave/background_tile.svg.import b/themes/vaporwave/background_tile.svg.import new file mode 100644 index 0000000..ea37046 --- /dev/null +++ b/themes/vaporwave/background_tile.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cakn4rq4vpt4j" +path="res://.godot/imported/background_tile.svg-4279e39f99f697511c1d09ab47aa94d3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/vaporwave/background_tile.svg" +dest_files=["res://.godot/imported/background_tile.svg-4279e39f99f697511c1d09ab47aa94d3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/vaporwave/frame_corner.svg b/themes/vaporwave/frame_corner.svg new file mode 100644 index 0000000..38f8062 --- /dev/null +++ b/themes/vaporwave/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/vaporwave/frame_corner.svg.import b/themes/vaporwave/frame_corner.svg.import new file mode 100644 index 0000000..dab376d --- /dev/null +++ b/themes/vaporwave/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfcc03lopc3fv" +path="res://.godot/imported/frame_corner.svg-306aea9063fc675ba19a8d6cb5d8aba2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/vaporwave/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-306aea9063fc675ba19a8d6cb5d8aba2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/vaporwave/frame_corner_fixed.svg b/themes/vaporwave/frame_corner_fixed.svg new file mode 100644 index 0000000..8b1fb34 --- /dev/null +++ b/themes/vaporwave/frame_corner_fixed.svg @@ -0,0 +1 @@ + diff --git a/themes/vaporwave/frame_corner_fixed.svg.import b/themes/vaporwave/frame_corner_fixed.svg.import new file mode 100644 index 0000000..0b7af80 --- /dev/null +++ b/themes/vaporwave/frame_corner_fixed.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://yfn7gaae4tju" +path="res://.godot/imported/frame_corner_fixed.svg-8c379125eab35778af4af67f15b60d23.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/vaporwave/frame_corner_fixed.svg" +dest_files=["res://.godot/imported/frame_corner_fixed.svg-8c379125eab35778af4af67f15b60d23.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/vaporwave/frame_edge.svg b/themes/vaporwave/frame_edge.svg new file mode 100644 index 0000000..069fc54 --- /dev/null +++ b/themes/vaporwave/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/vaporwave/frame_edge.svg.import b/themes/vaporwave/frame_edge.svg.import new file mode 100644 index 0000000..7af8034 --- /dev/null +++ b/themes/vaporwave/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://251w1lysmoo6" +path="res://.godot/imported/frame_edge.svg-bff3de3609ab539d489b3fedb68e5670.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/vaporwave/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-bff3de3609ab539d489b3fedb68e5670.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/vaporwave/sounds/card_turn.ogg b/themes/vaporwave/sounds/card_turn.ogg new file mode 100644 index 0000000..06a17a7 Binary files /dev/null and b/themes/vaporwave/sounds/card_turn.ogg differ diff --git a/themes/vaporwave/sounds/card_turn.ogg.import b/themes/vaporwave/sounds/card_turn.ogg.import new file mode 100644 index 0000000..ece43da --- /dev/null +++ b/themes/vaporwave/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://hr3naot8wnam" +path="res://.godot/imported/card_turn.ogg-12db3398a4368c877f69ad81475455c8.oggvorbisstr" + +[deps] + +source_file="res://themes/vaporwave/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-12db3398a4368c877f69ad81475455c8.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/vaporwave/sounds/roll.ogg b/themes/vaporwave/sounds/roll.ogg new file mode 100644 index 0000000..8eca0af Binary files /dev/null and b/themes/vaporwave/sounds/roll.ogg differ diff --git a/themes/vaporwave/sounds/roll.ogg.import b/themes/vaporwave/sounds/roll.ogg.import new file mode 100644 index 0000000..9d178d7 --- /dev/null +++ b/themes/vaporwave/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://ck3vewrhssyf4" +path="res://.godot/imported/roll.ogg-afd1ff601f93a72dcaa6ad726eb6445c.oggvorbisstr" + +[deps] + +source_file="res://themes/vaporwave/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-afd1ff601f93a72dcaa6ad726eb6445c.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/vaporwave/theme.gd b/themes/vaporwave/theme.gd new file mode 100644 index 0000000..bd15c7f --- /dev/null +++ b/themes/vaporwave/theme.gd @@ -0,0 +1,117 @@ +extends RefCounted +## Built-in theme: Vaporwave. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "vaporwave", + "name": "Vaporwave", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "nunito", + "font_display": "righteous", + "background": { + "kind": "linear", + "colors": [ + "#bff6e6", + "#e4dcfb", + "#f6b8ef" + ], + "angle": 160 + }, + "panel": { + "kind": "linear", + "colors": [ + "#f6f1ff", + "#e8ddff" + ], + "angle": 90 + }, + "mascot_colors": { + "outline": "#2b1d52", + "cloth": "#a94ace", + "trim": "#7fe3cf", + "eye": "#f4a4f5", + "eye_glint": "#ffffff", + "inner_line": "#703696" + }, + "background_scene": { + "file": "background_scene.svg", + "anchor": "bottom" + }, + "background_tile": { + "file": "background_tile.svg", + "opacity": 0.6, + "scale": 1.0 + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_fixed": "frame_corner_fixed.svg", + "corner_size": [ + 160, + 160 + ], + "edge_size": [ + 128, + 64 + ], + "side_mid": 64, + "top_mid": 64, + "edge_mid": 64, + "scale": 0.25, + "outset": 16.0, + "pad": 4, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 64, + 12 + ], + "width": 7.5 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#e4dcfb", + "BG_DEEP": "#7d798a", + "BG_HOVER": "#e8e1fc", + "PANEL": "#efe8ff", + "ON_BG": "#2b1d52", + "ON_BG_MUTED": "#5d4f8c", + "CARD": "#ffffff", + "CARD_SOFT": "#f6f2ff", + "CARD_HOVER": "#eee9fa", + "CARD_SHADE": "#dedbe9", + "INK": "#2b1d52", + "MUTED": "#7b6ea8", + "FAINT": "#b0a8cb", + "RULE": "#e2dbf7", + "DASH": "#b4aad3", + "HOVER_ROW": "#e8fff8", + "STRIPE": "#2b1d520e", + "TRIM": "#2b1d52", + "TRIM_DARK": "#2b1d52", + "THREAD": "#a94ace", + "THREAD_DARK": "#2b1d52", + "ACCENT": "#f4a4f5", + "ACCENT_DARK": "#6e4a6e", + "GROUP": "#f4a4f5", + "LIT": "#beffea", + "FLICK": "#f4a4f559", + "PULSE": "#fce4fc", + "GLOW": "#9881ff", + "VALUE_BG": "#fdeffd", + "VALUE_BORDER": "#f9cdfa", + "VALUE_INK": "#7a527a", + "VALUE_INK_ON_BG": "#f4a4f5", + "REF_BG": "#eae6ff", + "REF_INK": "#4c4080", + "REF_INK_ON_BG": "#b7a7ff" + } +} diff --git a/themes/vaporwave/theme.gd.uid b/themes/vaporwave/theme.gd.uid new file mode 100644 index 0000000..6a2540a --- /dev/null +++ b/themes/vaporwave/theme.gd.uid @@ -0,0 +1 @@ +uid://b1t2ry0pce6or diff --git a/themes/vaporwave/thread_strip.svg b/themes/vaporwave/thread_strip.svg new file mode 100644 index 0000000..bf8627a --- /dev/null +++ b/themes/vaporwave/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/vaporwave/thread_strip.svg.import b/themes/vaporwave/thread_strip.svg.import new file mode 100644 index 0000000..9e9e5fd --- /dev/null +++ b/themes/vaporwave/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpago7phebkix" +path="res://.godot/imported/thread_strip.svg-957a01c06c6e41b425cb0c2db247baa8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/vaporwave/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-957a01c06c6e41b425cb0c2db247baa8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/woodsy/background_scene.svg b/themes/woodsy/background_scene.svg new file mode 100644 index 0000000..b3ac2b9 --- /dev/null +++ b/themes/woodsy/background_scene.svg @@ -0,0 +1 @@ + diff --git a/themes/woodsy/background_scene.svg.import b/themes/woodsy/background_scene.svg.import new file mode 100644 index 0000000..b1f7e69 --- /dev/null +++ b/themes/woodsy/background_scene.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bh4b4ems6rrv7" +path="res://.godot/imported/background_scene.svg-0b768e770f7632550dd2aa79b61a6c43.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/woodsy/background_scene.svg" +dest_files=["res://.godot/imported/background_scene.svg-0b768e770f7632550dd2aa79b61a6c43.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/woodsy/background_tile.svg b/themes/woodsy/background_tile.svg new file mode 100644 index 0000000..4f29243 --- /dev/null +++ b/themes/woodsy/background_tile.svg @@ -0,0 +1 @@ + diff --git a/themes/woodsy/background_tile.svg.import b/themes/woodsy/background_tile.svg.import new file mode 100644 index 0000000..39d8472 --- /dev/null +++ b/themes/woodsy/background_tile.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dsuhlv1bav53h" +path="res://.godot/imported/background_tile.svg-8776e39af9cf2a40138d722eb87c404e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/woodsy/background_tile.svg" +dest_files=["res://.godot/imported/background_tile.svg-8776e39af9cf2a40138d722eb87c404e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/woodsy/frame_corner.svg b/themes/woodsy/frame_corner.svg new file mode 100644 index 0000000..6594a3d --- /dev/null +++ b/themes/woodsy/frame_corner.svg @@ -0,0 +1 @@ + diff --git a/themes/woodsy/frame_corner.svg.import b/themes/woodsy/frame_corner.svg.import new file mode 100644 index 0000000..720ad6e --- /dev/null +++ b/themes/woodsy/frame_corner.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dakh6vuuo7hyh" +path="res://.godot/imported/frame_corner.svg-2b5e39e81cc1bfd5a748a9b1d78b8ebe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/woodsy/frame_corner.svg" +dest_files=["res://.godot/imported/frame_corner.svg-2b5e39e81cc1bfd5a748a9b1d78b8ebe.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/woodsy/frame_corner_fixed.svg b/themes/woodsy/frame_corner_fixed.svg new file mode 100644 index 0000000..f6f6337 --- /dev/null +++ b/themes/woodsy/frame_corner_fixed.svg @@ -0,0 +1 @@ + diff --git a/themes/woodsy/frame_corner_fixed.svg.import b/themes/woodsy/frame_corner_fixed.svg.import new file mode 100644 index 0000000..b92e1e7 --- /dev/null +++ b/themes/woodsy/frame_corner_fixed.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfv6lws0f5aal" +path="res://.godot/imported/frame_corner_fixed.svg-3ff8f274a752c6921516a7cce0b004e7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/woodsy/frame_corner_fixed.svg" +dest_files=["res://.godot/imported/frame_corner_fixed.svg-3ff8f274a752c6921516a7cce0b004e7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/woodsy/frame_edge.svg b/themes/woodsy/frame_edge.svg new file mode 100644 index 0000000..76cc412 --- /dev/null +++ b/themes/woodsy/frame_edge.svg @@ -0,0 +1 @@ + diff --git a/themes/woodsy/frame_edge.svg.import b/themes/woodsy/frame_edge.svg.import new file mode 100644 index 0000000..69eb824 --- /dev/null +++ b/themes/woodsy/frame_edge.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://kqqwe6y3t3uj" +path="res://.godot/imported/frame_edge.svg-16c69f55bda23f11ba5cb75ac5d956af.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/woodsy/frame_edge.svg" +dest_files=["res://.godot/imported/frame_edge.svg-16c69f55bda23f11ba5cb75ac5d956af.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/themes/woodsy/sounds/card_turn.ogg b/themes/woodsy/sounds/card_turn.ogg new file mode 100644 index 0000000..1926c9e Binary files /dev/null and b/themes/woodsy/sounds/card_turn.ogg differ diff --git a/themes/woodsy/sounds/card_turn.ogg.import b/themes/woodsy/sounds/card_turn.ogg.import new file mode 100644 index 0000000..cf9b538 --- /dev/null +++ b/themes/woodsy/sounds/card_turn.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dygbafy3xerh0" +path="res://.godot/imported/card_turn.ogg-da139d55f11b87230f28d7157cb5bb24.oggvorbisstr" + +[deps] + +source_file="res://themes/woodsy/sounds/card_turn.ogg" +dest_files=["res://.godot/imported/card_turn.ogg-da139d55f11b87230f28d7157cb5bb24.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/woodsy/sounds/roll.ogg b/themes/woodsy/sounds/roll.ogg new file mode 100644 index 0000000..6ef0b90 Binary files /dev/null and b/themes/woodsy/sounds/roll.ogg differ diff --git a/themes/woodsy/sounds/roll.ogg.import b/themes/woodsy/sounds/roll.ogg.import new file mode 100644 index 0000000..ad0c822 --- /dev/null +++ b/themes/woodsy/sounds/roll.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://c275m3awbi0vf" +path="res://.godot/imported/roll.ogg-b7bb89a3ef69466fde8e6318b2354865.oggvorbisstr" + +[deps] + +source_file="res://themes/woodsy/sounds/roll.ogg" +dest_files=["res://.godot/imported/roll.ogg-b7bb89a3ef69466fde8e6318b2354865.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/themes/woodsy/theme.gd b/themes/woodsy/theme.gd new file mode 100644 index 0000000..e40fd08 --- /dev/null +++ b/themes/woodsy/theme.gd @@ -0,0 +1,118 @@ +extends RefCounted +## Built-in theme: Woodsy. Written by tools/theme_defs/make_theme_defs.py: +## change tools/theme_defs/palettes.py and re-run it rather than editing this file. + +const DATA := { + "id": "woodsy", + "name": "Woodsy", + "builtin": true, + "pattern": "none", + "logo": "fortune_teller", + "card_frame": "art", + "font_body": "alegreya", + "font_display": "alegreya", + "background": { + "kind": "radial", + "colors": [ + "#3d5626", + "#23361a", + "#18250f" + ], + "center": [ + 0.4, + 0.3 + ] + }, + "panel": { + "kind": "solid", + "colors": [ + "#1b1a12" + ] + }, + "mascot_colors": { + "outline": "#1a2612", + "cloth": "#556f30", + "trim": "#a2b447", + "eye": "#9fd3dc", + "eye_glint": "#eff4bd", + "inner_line": "#3a4e23" + }, + "background_scene": { + "file": "background_scene.svg", + "anchor": "bottom" + }, + "background_tile": { + "file": "background_tile.svg", + "opacity": 0.9, + "scale": 1.0 + }, + "frame": { + "corner": "frame_corner.svg", + "edge": "frame_edge.svg", + "corner_fixed": "frame_corner_fixed.svg", + "corner_size": [ + 216, + 216 + ], + "edge_size": [ + 144, + 64 + ], + "side_mid": 72, + "top_mid": 72, + "edge_mid": 72, + "scale": 0.25, + "outset": 18.0, + "pad": 4, + "mid": 0.5 + }, + "thread": { + "strip": "thread_strip.svg", + "strip_size": [ + 48, + 12 + ], + "width": 7.5 + }, + "sounds": { + "roll": "sounds/roll.ogg", + "card_turn": "sounds/card_turn.ogg" + }, + "colors": { + "BG": "#23361a", + "BG_DEEP": "#131e0e", + "BG_HOVER": "#44543c", + "PANEL": "#1b1a12", + "ON_BG": "#eff4bd", + "ON_BG_MUTED": "#a8b284", + "CARD": "#f1f5d3", + "CARD_SOFT": "#f7f9e4", + "CARD_HOVER": "#e1e8b8", + "CARD_SHADE": "#ccd2b0", + "INK": "#1d2a14", + "MUTED": "#5b6a45", + "FAINT": "#97a27e", + "RULE": "#d6dfa6", + "DASH": "#9faa7a", + "HOVER_ROW": "#e9f0bf", + "STRIPE": "#1d2a140e", + "TRIM": "#362f22", + "TRIM_DARK": "#1d1a12", + "THREAD": "#a2b447", + "THREAD_DARK": "#23361a", + "ACCENT": "#a2b447", + "ACCENT_DARK": "#495120", + "GROUP": "#a2b447", + "LIT": "#dbe89a", + "FLICK": "#a2b44759", + "PULSE": "#e3e8c8", + "GLOW": "#e9f59a", + "VALUE_BG": "#e3e9ba", + "VALUE_BORDER": "#c6d186", + "VALUE_INK": "#515a24", + "VALUE_INK_ON_BG": "#a2b447", + "REF_BG": "#d1dac1", + "REF_INK": "#28383d", + "REF_INK_ON_BG": "#859aa2" + } +} diff --git a/themes/woodsy/theme.gd.uid b/themes/woodsy/theme.gd.uid new file mode 100644 index 0000000..bbce882 --- /dev/null +++ b/themes/woodsy/theme.gd.uid @@ -0,0 +1 @@ +uid://b6rpxu44ovxo6 diff --git a/themes/woodsy/thread_strip.svg b/themes/woodsy/thread_strip.svg new file mode 100644 index 0000000..5ba4129 --- /dev/null +++ b/themes/woodsy/thread_strip.svg @@ -0,0 +1 @@ + diff --git a/themes/woodsy/thread_strip.svg.import b/themes/woodsy/thread_strip.svg.import new file mode 100644 index 0000000..448913c --- /dev/null +++ b/themes/woodsy/thread_strip.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cvtepon67oxge" +path="res://.godot/imported/thread_strip.svg-5e6c3a45816b1e13eddbf99a921313f0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://themes/woodsy/thread_strip.svg" +dest_files=["res://.godot/imported/thread_strip.svg-5e6c3a45816b1e13eddbf99a921313f0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/tools/theme_art/__pycache__/frame_styles.cpython-314.pyc b/tools/theme_art/__pycache__/frame_styles.cpython-314.pyc new file mode 100644 index 0000000..229cc9a Binary files /dev/null and b/tools/theme_art/__pycache__/frame_styles.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/frames.cpython-314.pyc b/tools/theme_art/__pycache__/frames.cpython-314.pyc new file mode 100644 index 0000000..b94b038 Binary files /dev/null and b/tools/theme_art/__pycache__/frames.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/scene_floor.cpython-314.pyc b/tools/theme_art/__pycache__/scene_floor.cpython-314.pyc new file mode 100644 index 0000000..e3ba48e Binary files /dev/null and b/tools/theme_art/__pycache__/scene_floor.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/scenes.cpython-314.pyc b/tools/theme_art/__pycache__/scenes.cpython-314.pyc new file mode 100644 index 0000000..669017c Binary files /dev/null and b/tools/theme_art/__pycache__/scenes.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/svg_common.cpython-314.pyc b/tools/theme_art/__pycache__/svg_common.cpython-314.pyc new file mode 100644 index 0000000..8d37e90 Binary files /dev/null and b/tools/theme_art/__pycache__/svg_common.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/theme_colours.cpython-314.pyc b/tools/theme_art/__pycache__/theme_colours.cpython-314.pyc new file mode 100644 index 0000000..6882ada Binary files /dev/null and b/tools/theme_art/__pycache__/theme_colours.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/threads.cpython-314.pyc b/tools/theme_art/__pycache__/threads.cpython-314.pyc new file mode 100644 index 0000000..a60a81a Binary files /dev/null and b/tools/theme_art/__pycache__/threads.cpython-314.pyc differ diff --git a/tools/theme_art/__pycache__/tiles.cpython-314.pyc b/tools/theme_art/__pycache__/tiles.cpython-314.pyc new file mode 100644 index 0000000..8c9c60e Binary files /dev/null and b/tools/theme_art/__pycache__/tiles.cpython-314.pyc differ diff --git a/tools/theme_art/frame_styles.py b/tools/theme_art/frame_styles.py new file mode 100644 index 0000000..ef51f4d --- /dev/null +++ b/tools/theme_art/frame_styles.py @@ -0,0 +1,116 @@ +"""The nine frame looks from the wardrobe mockup, as band profiles plus ornaments. + +Greyscale meaning (see the gradient map in docs/THEMES.md): black = dark backing, mid grey = trim +or card colour, white = highlight. Source units are 4x screen pixels. +""" + +from frames import FrameStyle, Stroke +from svg_common import LEAF_PATH, MAPLE_LEAF_PATH, grey, num + + +def _scaled_ornament(card_corner_in_box, band_mid, inner): + """Place a mockup ornament (drawn in screen px) so its card-corner point lands on the band corner.""" + shift = band_mid - card_corner_in_box * 4 + return f'{inner}' + + +def memphis(colours): + """Flat ink outline; squiggle and triangle on the corners.""" + ornament = (f'') + return FrameStyle(band_mid=64, radius=40, corner_size=(160, 160), + strokes=[Stroke(12, 0.5)], + corner_fixed=_scaled_ornament(16, 64, ornament), + notes=["no hard plum drop shadow (mirrored corners cannot offset one way)"]) + + +def neon(colours): + """A bright tube with a soft halo on both sides, faked with stacked strokes.""" + halo = [Stroke(64, 0.5, 0.05), Stroke(48, 0.5, 0.09), Stroke(34, 0.5, 0.15), Stroke(22, 0.5, 0.3)] + return FrameStyle(band_mid=40, radius=28, corner_size=(112, 112), edge_length=32, + strokes=halo + [Stroke(10, 0.5, 1.0), Stroke(4, 1.0, 0.85)]) + + +def leaf(colours): + """Rust edge with a maple leaf on the corners.""" + ornament = (f'' + f'') + return FrameStyle(band_mid=64, radius=32, corner_size=(176, 176), + strokes=[Stroke(16, 0.0, 0.5), Stroke(12, 0.5), Stroke(3, 1.0, 0.35)], + corner_fixed=_scaled_ornament(15, 64, ornament), + notes=["leaf shows on all four corners (mockup: two)"]) + + +def plank(colours): + """A thick wood frame: darker in the middle, grain along the band, mitred corners, nail heads.""" + shading = [Stroke(40, 0.0), Stroke(36, 0.5), Stroke(30, 0.43), Stroke(22, 0.37), Stroke(14, 0.33)] + grain = [Stroke(1.5, 0.1, 0.45, offset) for offset in (-12, -5, 6, 13)] + shine = [Stroke(1.5, 1.0, 0.22, offset) for offset in (-16, 16)] + mitre = '' + nail_x = 44 + nail = (f'' + f'') + return FrameStyle(band_mid=40, radius=0, corner_size=(112, 112), edge_length=128, + strokes=shading + grain + shine, band_inside_px=3, + corner_extras=mitre, corner_fixed=nail, + notes=["one nail per corner; the mockup's grain is drawn as straight lines along the band"]) + + +def vine(colours): + """A thin dark-wood edge; a vine curl (trim) with leaves on the corners.""" + curl = ('') + leaves = (f'' + f'' + f'') + return FrameStyle(band_mid=72, radius=40, corner_size=(216, 216), + strokes=[Stroke(12, 0.0, 0.4), Stroke(9, 0.5), Stroke(2, 1.0, 0.3)], + corner_extras=_scaled_ornament(18, 72, curl), + corner_fixed=_scaled_ornament(18, 72, leaves), + notes=["all four corners match, so the leaf-cut shape (two round, two sharp corners) is lost", + "vine shows on all four corners (mockup: two)"]) + + +def cloud(colours): + """A round white rim with a cloud puff on the corner.""" + puff = ('' + '') + return FrameStyle(band_mid=48, radius=64, corner_size=(288, 176), + strokes=[Stroke(16, 0.0, 0.08), Stroke(8, 1.0)], band_inside_px=-2, + corner_fixed=f'{puff}', + notes=["cloud puff shows on all four corners (mockup: top right only)", + "no soft blue drop shadow"]) + + +def glass(colours): + """Frosted glass rim: a faint wide band with a bright thin line.""" + return FrameStyle(band_mid=40, radius=52, corner_size=(128, 128), band_inside_px=-1, + strokes=[Stroke(22, 0.0, 0.08), Stroke(14, 0.5, 0.45), Stroke(4, 1.0, 0.95)], + notes=["no backdrop blur and no blue drop shadow"]) + + +def stone(colours): + """A thick carved stone band, blocks with mortar joints, cracks on the corner.""" + shading = [Stroke(36, 0.0), Stroke(32, 0.63), Stroke(26, 0.58), Stroke(18, 0.53), Stroke(10, 0.5)] + joint = '' + crack = ('') + corner_joints = ('') + return FrameStyle(band_mid=56, radius=80, corner_size=(168, 168), edge_length=96, + strokes=shading, edge_extras=joint, + corner_extras=corner_joints + f'{crack}', + notes=["all four corners are rounded the same; the mockup's pointed top (round top, square " + "bottom) needs separate top and bottom corners"]) + + +def ascii_box(colours): + """A double-line box, like box-drawing characters.""" + return FrameStyle(band_mid=34, radius=0, corner_size=(128, 128), edge_length=32, + strokes=[Stroke(4, 0.5, 1.0, -4), Stroke(4, 0.5, 1.0, 4)]) + + +FRAME_STYLES = {"memphis": memphis, "neon": neon, "leaf": leaf, "plank": plank, "vine": vine, + "cloud": cloud, "glass": glass, "stone": stone, "ascii": ascii_box} diff --git a/tools/theme_art/frames.py b/tools/theme_art/frames.py new file mode 100644 index 0000000..8c9c96b --- /dev/null +++ b/tools/theme_art/frames.py @@ -0,0 +1,99 @@ +"""Frame sets (corner + edge, greyscale) built from a band profile, plus optional coloured corner ornaments. + +A band profile is a list of Stroke layers drawn along the frame's centre line. The corner draws them along +a rounded (or square) turn; the edge draws them along a straight vertical line. Both use the same +centre line (`band_mid`) and the same layers, so the two join with no step. +""" + +import math +from dataclasses import dataclass, field + +from svg_common import grey, num, svg_document + +SCALE = 0.25 # art is authored at 4x screen size + + +@dataclass +class Stroke: + """One layer of the band: width and offset in source units (positive offset = toward the card).""" + width: float + lightness: float + opacity: float = 1.0 + offset: float = 0.0 + dash: str = "" + + +@dataclass +class FrameStyle: + band_mid: float # side_mid = top_mid = edge_mid (source units) + radius: float # turn radius of the band centre line (0 = square, mitred) + strokes: list + corner_size: tuple + edge_length: float = 64 + band_inside_px: float = 0.0 # where the band centre sits, in px inside the card edge (negative = outside) + corner_extras: str = "" # extra greyscale shapes drawn on the corner + edge_extras: str = "" # extra greyscale shapes drawn on each edge tile + corner_fixed: str = "" # coloured overlay shapes (empty = no corner_fixed file) + pad_extra_px: float = 2.0 + notes: list = field(default_factory=list) + + +def _stroke_attributes(stroke, join): + dash = f' stroke-dasharray="{stroke.dash}"' if stroke.dash else "" + return (f'fill="none" stroke="{grey(stroke.lightness)}" stroke-width="{num(stroke.width)}" ' + f'stroke-opacity="{num(stroke.opacity)}" stroke-linejoin="{join}" stroke-linecap="butt"{dash}') + + +def corner_path(style, offset): + """The band's line, moved `offset` toward the card, from the corner's bottom edge to its right edge.""" + width, height = style.corner_size + position = style.band_mid + offset + turn_start = style.band_mid + style.radius + turn_radius = max(style.radius - offset, 0) + if style.radius <= 0: + return f"M{num(position)},{num(height)} L{num(position)},{num(position)} L{num(width)},{num(position)}" + return (f"M{num(position)},{num(height)} L{num(position)},{num(turn_start)} " + f"A{num(turn_radius)},{num(turn_radius)} 0 0 1 {num(turn_start)},{num(position)} " + f"L{num(width)},{num(position)}") + + +def corner_svg(style): + join = "miter" if style.radius <= 0 else "round" + body = "".join(f'' + for stroke in style.strokes) + width, height = style.corner_size + return svg_document(width, height, body + style.corner_extras) + + +def edge_size(style): + return [style.band_mid * 2, style.edge_length] + + +def edge_svg(style): + width, height = edge_size(style) + body = "" + for stroke in style.strokes: + position = num(style.band_mid + stroke.offset) + body += f'' + return svg_document(width, height, body + style.edge_extras) + + +def corner_fixed_svg(style): + if not style.corner_fixed: + return None + width, height = style.corner_size + return svg_document(width, height, style.corner_fixed) + + +def frame_meta(style): + """The numbers the app needs to place this frame set.""" + band_half_px = max(stroke.width / 2 + abs(stroke.offset) for stroke in style.strokes + if stroke.opacity >= 0.5) * SCALE + outset = style.band_mid * SCALE - style.band_inside_px + pad = max(0.0, style.band_inside_px + band_half_px) + style.pad_extra_px + return { + "corner_size": list(style.corner_size), "edge_size": edge_size(style), + "side_mid": style.band_mid, "top_mid": style.band_mid, "edge_mid": style.band_mid, + "scale": SCALE, "outset": round(outset, 2), "pad": math.ceil(pad), + "mid": 0.5, "has_corner_fixed": bool(style.corner_fixed), + } diff --git a/tools/theme_art/make_theme_art.py b/tools/theme_art/make_theme_art.py new file mode 100644 index 0000000..e17ec48 --- /dev/null +++ b/tools/theme_art/make_theme_art.py @@ -0,0 +1,60 @@ +"""Regenerate the stand-in theme art for every theme, plus tools/theme_art/meta.json. + +Run from anywhere: python3 -I tools/theme_art/make_theme_art.py +Writes themes//{background_tile, background_scene, frame_corner, frame_corner_fixed, frame_edge, +thread_strip}.svg. Files a theme does not use are removed, so a re-run always matches the plan. +""" + +import json +import os +import sys + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +from frame_styles import FRAME_STYLES # noqa: E402 +from frames import corner_fixed_svg, corner_svg, edge_svg, frame_meta # noqa: E402 +from scenes import make_background_scene # noqa: E402 +from svg_common import remove_theme_file, write_theme_file # noqa: E402 +from theme_colours import THEMES # noqa: E402 +from threads import make_thread_strip # noqa: E402 + +META_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "meta.json") + + +def write_or_remove(theme_id, file_name, text): + if text is None: + remove_theme_file(theme_id, file_name) + else: + write_theme_file(theme_id, file_name, text) + + +def build_theme(theme_id, theme): + """Write one theme's files and return its meta entry.""" + from tiles import make_background_tile # local import keeps the module list above short + + tile_text, tile_meta = make_background_tile(theme["pattern"]) + write_or_remove(theme_id, "background_tile.svg", tile_text) + scene_text, scene_meta = make_background_scene(theme["scene"]) + write_or_remove(theme_id, "background_scene.svg", scene_text) + + style = FRAME_STYLES[theme["frame"]](theme["colours"]) + write_theme_file(theme_id, "frame_corner.svg", corner_svg(style)) + write_theme_file(theme_id, "frame_edge.svg", edge_svg(style)) + write_or_remove(theme_id, "frame_corner_fixed.svg", corner_fixed_svg(style)) + + strip_text, thread_meta = make_thread_strip(theme["thread"]) + write_theme_file(theme_id, "thread_strip.svg", strip_text) + return {"frame": frame_meta(style), "thread": thread_meta, + "background_tile": tile_meta, "background_scene": scene_meta} + + +def main(): + meta = {theme_id: build_theme(theme_id, theme) for theme_id, theme in THEMES.items()} + with open(META_PATH, "w", encoding="utf-8") as handle: + json.dump(meta, handle, indent=2) + handle.write("\n") + print(f"Wrote art for {len(meta)} themes; meta in {META_PATH}") + + +if __name__ == "__main__": + main() diff --git a/tools/theme_art/meta.json b/tools/theme_art/meta.json new file mode 100644 index 0000000..c7dd60e --- /dev/null +++ b/tools/theme_art/meta.json @@ -0,0 +1,293 @@ +{ + "vaporwave": { + "frame": { + "corner_size": [ + 160, + 160 + ], + "edge_size": [ + 128, + 64 + ], + "side_mid": 64, + "top_mid": 64, + "edge_mid": 64, + "scale": 0.25, + "outset": 16.0, + "pad": 4, + "mid": 0.5, + "has_corner_fixed": true + }, + "thread": { + "strip_size": [ + 64, + 12 + ], + "width": 3 + }, + "background_tile": { + "opacity": 0.6, + "scale": 1.0 + }, + "background_scene": { + "anchor": "bottom" + } + }, + "synthwave": { + "frame": { + "corner_size": [ + 112, + 112 + ], + "edge_size": [ + 80, + 32 + ], + "side_mid": 40, + "top_mid": 40, + "edge_mid": 40, + "scale": 0.25, + "outset": 10.0, + "pad": 4, + "mid": 0.5, + "has_corner_fixed": false + }, + "thread": { + "strip_size": [ + 32, + 32 + ], + "width": 8 + }, + "background_tile": null, + "background_scene": { + "anchor": "bottom" + } + }, + "autumn": { + "frame": { + "corner_size": [ + 176, + 176 + ], + "edge_size": [ + 128, + 64 + ], + "side_mid": 64, + "top_mid": 64, + "edge_mid": 64, + "scale": 0.25, + "outset": 16.0, + "pad": 4, + "mid": 0.5, + "has_corner_fixed": true + }, + "thread": { + "strip_size": [ + 32, + 16 + ], + "width": 4 + }, + "background_tile": { + "opacity": 0.55, + "scale": 1.0 + }, + "background_scene": null + }, + "rustic": { + "frame": { + "corner_size": [ + 112, + 112 + ], + "edge_size": [ + 80, + 128 + ], + "side_mid": 40, + "top_mid": 40, + "edge_mid": 40, + "scale": 0.25, + "outset": 7.0, + "pad": 10, + "mid": 0.5, + "has_corner_fixed": true + }, + "thread": { + "strip_size": [ + 24, + 22.0 + ], + "width": 5.5 + }, + "background_tile": { + "opacity": 0.92, + "scale": 1.0 + }, + "background_scene": null + }, + "woodsy": { + "frame": { + "corner_size": [ + 216, + 216 + ], + "edge_size": [ + 144, + 64 + ], + "side_mid": 72, + "top_mid": 72, + "edge_mid": 72, + "scale": 0.25, + "outset": 18.0, + "pad": 4, + "mid": 0.5, + "has_corner_fixed": true + }, + "thread": { + "strip_size": [ + 48, + 12 + ], + "width": 3 + }, + "background_tile": { + "opacity": 0.9, + "scale": 1.0 + }, + "background_scene": { + "anchor": "bottom" + } + }, + "sky": { + "frame": { + "corner_size": [ + 288, + 176 + ], + "edge_size": [ + 96, + 64 + ], + "side_mid": 48, + "top_mid": 48, + "edge_mid": 48, + "scale": 0.25, + "outset": 14.0, + "pad": 2, + "mid": 0.5, + "has_corner_fixed": true + }, + "thread": { + "strip_size": [ + 32, + 24 + ], + "width": 6 + }, + "background_tile": null, + "background_scene": { + "anchor": "center" + } + }, + "aero": { + "frame": { + "corner_size": [ + 128, + 128 + ], + "edge_size": [ + 80, + 64 + ], + "side_mid": 40, + "top_mid": 40, + "edge_mid": 40, + "scale": 0.25, + "outset": 11.0, + "pad": 2, + "mid": 0.5, + "has_corner_fixed": false + }, + "thread": { + "strip_size": [ + 32, + 24 + ], + "width": 6 + }, + "background_tile": null, + "background_scene": { + "anchor": "bottom" + } + }, + "gothic": { + "frame": { + "corner_size": [ + 168, + 168 + ], + "edge_size": [ + 112, + 96 + ], + "side_mid": 56, + "top_mid": 56, + "edge_mid": 56, + "scale": 0.25, + "outset": 14.0, + "pad": 7, + "mid": 0.5, + "has_corner_fixed": false + }, + "thread": { + "strip_size": [ + 32, + 16 + ], + "width": 4 + }, + "background_tile": { + "opacity": 0.9, + "scale": 1.0 + }, + "background_scene": { + "anchor": "center" + } + }, + "terminal": { + "frame": { + "corner_size": [ + 128, + 128 + ], + "edge_size": [ + 68, + 32 + ], + "side_mid": 34, + "top_mid": 34, + "edge_mid": 34, + "scale": 0.25, + "outset": 8.5, + "pad": 4, + "mid": 0.5, + "has_corner_fixed": false + }, + "thread": { + "strip_size": [ + 40, + 10.0 + ], + "width": 2.5 + }, + "background_tile": { + "opacity": 1.0, + "scale": 1.0 + }, + "background_scene": null + } +} diff --git a/tools/theme_art/preview.py b/tools/theme_art/preview.py new file mode 100644 index 0000000..fe42a16 --- /dev/null +++ b/tools/theme_art/preview.py @@ -0,0 +1,172 @@ +"""Contact sheet of the generated theme art (needs ImageMagick 7 `magick`). + +Run: python3 -I tools/theme_art/preview.py +For each theme it fakes a 300 x 220 card on its background, scene and tile, with the frame set and a +thread strip recoloured by the app's gradient map. Then it joins all panels into contact_sheet.png. +""" + +import json +import os +import subprocess +import sys + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +from svg_common import THEMES_DIR # noqa: E402 +from theme_colours import THEMES # noqa: E402 + +PANEL_WIDTH, PANEL_HEIGHT = 520, 420 +CARD_LEFT, CARD_TOP, CARD_WIDTH, CARD_HEIGHT = 110, 50, 300, 220 +META_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "meta.json") +LOW, MID, HIGHLIGHT = 0.05, 0.5, 0.45 + + +def magick(*arguments): + subprocess.run(["magick", *[str(argument) for argument in arguments]], check=True) + + +def hex_to_rgb(text): + text = text.lstrip("#") + return [int(text[index:index + 2], 16) for index in (0, 2, 4)] + + +def rgb_to_hex(rgb): + return "#" + "".join(f"{max(0, min(255, round(channel))):02x}" for channel in rgb) + + +def make_clut(path, dark, trim): + """A 256 x 1 lookup strip: dark up to LOW, dark -> trim up to MID, trim -> highlight up to 1.""" + trim_rgb = hex_to_rgb(trim) + highlight = rgb_to_hex([channel + (255 - channel) * HIGHLIGHT for channel in trim_rgb]) + low_steps, mid_steps = round(LOW * 256), round((MID - LOW) * 256) + high_steps = 256 - low_steps - mid_steps + magick("-size", f"{low_steps}x1", f"xc:{dark}", "(", "-size", f"1x{mid_steps}", f"gradient:{dark}-{trim}", + "-rotate", "-90", ")", "(", "-size", f"1x{high_steps}", f"gradient:{trim}-{highlight}", "-rotate", "-90", + ")", "+append", "+repage", "-resize", "256x1!", path) + + +def render_svg(svg_path, png_path, scale): + magick("-background", "none", "-density", 96 * scale, svg_path, png_path) + + +def recolour(source_png, clut_png, out_png, extra=()): + magick(source_png, "-colorspace", "sRGB", "-type", "TrueColorAlpha", *extra, clut_png, + "-channel", "RGB", "-clut", "+channel", out_png) + + +def image_size(path): + output = subprocess.run(["magick", "identify", "-format", "%w %h", path], check=True, + capture_output=True, text=True).stdout + width, height = output.split() + return int(width), int(height) + + +def build_frame_layers(theme_dir, work, frame, dark, trim): + """Return a list of (png, x, y) layers for edges, corners and corner ornaments.""" + clut = os.path.join(work, "frame_clut.png") + make_clut(clut, dark, trim) + scale = frame["scale"] + for name in ("frame_corner", "frame_edge"): + render_svg(os.path.join(theme_dir, f"{name}.svg"), os.path.join(work, f"{name}_grey.png"), scale) + recolour(os.path.join(work, f"{name}_grey.png"), clut, os.path.join(work, f"{name}.png")) + corner = os.path.join(work, "frame_corner.png") + edge = os.path.join(work, "frame_edge.png") + corner_width, corner_height = image_size(corner) + edge_width, _ = image_size(edge) + outset = frame["outset"] + left, top = round(CARD_LEFT - outset), round(CARD_TOP - outset) + right, bottom = round(CARD_LEFT + CARD_WIDTH + outset), round(CARD_TOP + CARD_HEIGHT + outset) + side_length, top_length = bottom - top - 2 * corner_height, right - left - 2 * corner_width + side_x = round((frame["side_mid"] - frame["edge_mid"]) * scale) + layers = [] + side = os.path.join(work, "side.png") + magick("-size", f"{edge_width}x{side_length}", "-background", "none", f"tile:{edge}", side) + flipped_side = os.path.join(work, "side_flop.png") + magick(side, "-flop", flipped_side) + layers += [(side, left + side_x, top + corner_height), (flipped_side, right - edge_width - side_x, top + corner_height)] + rotated = os.path.join(work, "edge_rot.png") + magick(edge, "-rotate", "-90", rotated) + top_strip, bottom_strip = os.path.join(work, "top.png"), os.path.join(work, "bottom.png") + magick("-size", f"{top_length}x{edge_width}", "-background", "none", f"tile:{rotated}", top_strip) + magick(top_strip, "-flip", bottom_strip) + layers += [(top_strip, left + corner_width, top + side_x), (bottom_strip, left + corner_width, bottom - edge_width - side_x)] + corner_files = [corner] + if frame["has_corner_fixed"]: + fixed = os.path.join(work, "frame_corner_fixed.png") + render_svg(os.path.join(theme_dir, "frame_corner_fixed.svg"), fixed, scale) + corner_files.append(fixed) + for index, corner_file in enumerate(corner_files): + mirrored = {} + for key, flags in (("tl", []), ("tr", ["-flop"]), ("bl", ["-flip"]), ("br", ["-flop", "-flip"])): + mirrored[key] = os.path.join(work, f"corner{index}_{key}.png") + magick(corner_file, *flags, mirrored[key]) + layers += [(mirrored["tl"], left, top), (mirrored["tr"], right - corner_width, top), + (mirrored["bl"], left, bottom - corner_height), + (mirrored["br"], right - corner_width, bottom - corner_height)] + return layers + + +def build_thread_layers(theme_dir, work, thread, colours): + clut = os.path.join(work, "thread_clut.png") + make_clut(clut, colours["thread_dark"], colours["thread"]) + strip_length, strip_height = thread["strip_size"] + layers = [] + for label, height_px, y in (("real", thread["width"], 300), ("zoom", strip_height, 330)): + grey_png = os.path.join(work, f"thread_{label}_grey.png") + render_svg(os.path.join(theme_dir, "thread_strip.svg"), grey_png, height_px / strip_height) + coloured = os.path.join(work, f"thread_{label}_tile.png") + recolour(grey_png, clut, coloured) + long_strip = os.path.join(work, f"thread_{label}.png") + tile_height = image_size(coloured)[1] + magick("-size", f"480x{tile_height}", "-background", "none", f"tile:{coloured}", long_strip) + layers.append((long_strip, 20, y)) + return layers + + +def build_panel(theme_id, theme, meta, out_dir): + work = os.path.join(out_dir, "work", theme_id) + os.makedirs(work, exist_ok=True) + theme_dir = os.path.join(THEMES_DIR, theme_id) + stops = theme["background"] + panel = os.path.join(out_dir, f"{theme_id}.png") + magick("-size", f"{PANEL_WIDTH}x{PANEL_HEIGHT}", f"gradient:{stops[0]}-{stops[-1]}", "-colorspace", "sRGB", "-type", "TrueColor", panel) + if meta["background_scene"]: + scene = os.path.join(work, "scene.png") + render_svg(os.path.join(theme_dir, "background_scene.svg"), scene, 1) + gravity = {"bottom": "south", "center": "center", "top": "north"}[meta["background_scene"]["anchor"]] + magick(scene, "-background", "none", "-resize", f"{PANEL_WIDTH}x{PANEL_HEIGHT}^", "-gravity", gravity, "-extent", + f"{PANEL_WIDTH}x{PANEL_HEIGHT}", scene) + magick(panel, scene, "-composite", panel) + if meta["background_tile"]: + tile = os.path.join(work, "tile.png") + render_svg(os.path.join(theme_dir, "background_tile.svg"), tile, meta["background_tile"]["scale"]) + tiled = os.path.join(work, "tiled.png") + magick("-size", f"{PANEL_WIDTH}x{PANEL_HEIGHT}", "-background", "none", f"tile:{tile}", "-channel", "A", + "-evaluate", "multiply", meta["background_tile"]["opacity"], "+channel", tiled) + magick(panel, tiled, "-composite", panel) + colours = theme["colours"] + magick(panel, "-fill", colours["card"], "-draw", + f"roundrectangle {CARD_LEFT},{CARD_TOP} {CARD_LEFT + CARD_WIDTH - 1},{CARD_TOP + CARD_HEIGHT - 1} 10,10", panel) + layers = build_frame_layers(theme_dir, work, meta["frame"], colours["trim_dark"], colours["trim"]) + layers += build_thread_layers(theme_dir, work, meta["thread"], colours) + arguments = [panel, "-colorspace", "sRGB"] + for png, x, y in layers: + arguments += [png, "-geometry", f"+{x}+{y}", "-composite"] + magick(*arguments, "-gravity", "southeast", "-fill", "#808080", "-pointsize", "16", + "-annotate", "+8+6", theme_id, panel) + return panel + + +def main(): + out_dir = sys.argv[1] if len(sys.argv) > 1 else "art_preview" + os.makedirs(out_dir, exist_ok=True) + with open(META_PATH, encoding="utf-8") as handle: + meta = json.load(handle) + panels = [build_panel(theme_id, theme, meta[theme_id], out_dir) for theme_id, theme in THEMES.items()] + sheet = os.path.join(out_dir, "contact_sheet.png") + magick("montage", *panels, "-tile", "3x", "-geometry", "+6+6", "-background", "#333333", sheet) + print(sheet) + + +if __name__ == "__main__": + main() diff --git a/tools/theme_art/scene_floor.py b/tools/theme_art/scene_floor.py new file mode 100644 index 0000000..9f72058 --- /dev/null +++ b/tools/theme_art/scene_floor.py @@ -0,0 +1,65 @@ +"""A CSS-style perspective grid floor (a plane tilted back by rotateX), drawn as flat SVG polygons. + +All numbers are in the mockup's 960 x 450 spread space; the caller scales the result. +""" + +import math + +from svg_common import num + + +class PerspectiveFloor: + """Projects points of a flat grid that is tilted back around its bottom edge.""" + + def __init__(self, left, right, height, perspective, tilt_degrees, spread_height=450): + self.left, self.right, self.height = left, right, height + self.perspective = perspective + self.tilt = math.radians(tilt_degrees) + self.top = spread_height - height + self.centre_x = (left + right) / 2 + + def project(self, x, y): + """Map a point on the flat grid (y = 0 at its far edge) to the screen.""" + distance_from_bottom = self.height - y + rotated_y = self.height - distance_from_bottom * math.cos(self.tilt) + depth = distance_from_bottom * math.sin(self.tilt) + shrink = self.perspective / (self.perspective + depth) + screen_x = self.centre_x + (x - self.centre_x) * shrink + screen_y = self.top + self.height / 2 + (rotated_y - self.height / 2) * shrink + return screen_x, screen_y + + def quad(self, x0, y0, x1, y1): + """SVG points text for a grid rectangle after projection.""" + corners = [self.project(x0, y0), self.project(x1, y0), self.project(x1, y1), self.project(x0, y1)] + return " ".join(f"{num(x)},{num(y)}" for x, y in corners) + + def outline(self): + return self.quad(self.left, 0, self.right, self.height) + + def grid_lines(self, row_spacing, row_line, column_spacing, column_line): + """Polygons for the grid: a line at the end of each row period, and at the start of each column period.""" + shapes = [] + row_start = row_spacing - row_line + while row_start < self.height: + shapes.append(self.quad(self.left, row_start, self.right, min(row_start + row_line, self.height))) + row_start += row_spacing + column_start = self.left + while column_start < self.right: + shapes.append(self.quad(column_start, 0, column_start + column_line, self.height)) + column_start += column_spacing + return shapes + + +def floor_svg(floor, colour, row_spacing, row_line, column_spacing, column_line, + opacity=1.0, glow_width=0.0, ground_colour=None): + """SVG text for a projected grid, with an optional ground fill and a faked glow (wide faint outline).""" + shapes = floor.grid_lines(row_spacing, row_line, column_spacing, column_line) + text = f'' + if ground_colour: + text += f'' + if glow_width: + glow = "".join(f'' for points in shapes) + text += (f'{glow}') + text += f'' + "".join(f'' for points in shapes) + "" + return text + "" diff --git a/tools/theme_art/scenes.py b/tools/theme_art/scenes.py new file mode 100644 index 0000000..d4475e9 --- /dev/null +++ b/tools/theme_art/scenes.py @@ -0,0 +1,164 @@ +"""Big background scenes (1920 x 1080, transparent ground) from the mockup's SCENES. + +Most scenes are drawn in the mockup's 960 x 450 spread space and scaled by 2. Bottom-anchored +scenes are shifted down 180 px so their floor, hills or trees touch the bottom edge. +""" + +from scene_floor import PerspectiveFloor, floor_svg +from svg_common import css_colour, num, svg_document + +SCENE_WIDTH, SCENE_HEIGHT = 1920, 1080 + + +def _in_spread_space(body, shift_y): + return f'{body}' + + +def _vertical_gradient(gradient_id, stops): + stop_text = "".join(f'' + for offset, colour, opacity in stops) + return f'{stop_text}' + + +def _radial_gradient(gradient_id, stops, centre=(0.5, 0.5), radius=0.5): + stop_text = "".join(f'' + for offset, colour, opacity in stops) + return (f'{stop_text}') + + +def _soft_ellipse_glow(gradient_id, colour_text, centre, radii, fade_from=0.0): + """A CSS 'radial-gradient(rx ry at cx cy, colour, transparent)' over the full scene. + + The gradient is drawn on a box sized 2*rx by 2*ry, so its bounding box makes the circle an ellipse.""" + colour, opacity = css_colour(colour_text) + gradient = _radial_gradient(gradient_id, [(fade_from, colour, opacity), (1, colour, 0)]) + box_x, box_y = centre[0] - radii[0], centre[1] - radii[1] + shape = (f'') + return gradient, shape + + +def vapor_scene(scene): + """A pale wireframe floor and a soft pink-to-periwinkle sun.""" + floor = PerspectiveFloor(-96, 1056, 207, 260, 58) + grid = floor_svg(floor, scene["s1"], 26, 2.08, 52, 2, opacity=0.8) + defs = _vertical_gradient("vapor_sun", [(0, scene["s2"], 1), (1, scene["s3"], 1)]) + sun = '' + return defs, _in_spread_space(sun + grid, 180), "bottom" + + +def synth_scene(scene): + """Blue light bars, a striped setting sun and a glowing pink grid floor.""" + bar_fade = "".join(f'' + for offset, opacity in ((0, 0), (0.15, 1), (0.85, 1), (1, 0))) + defs = f'{bar_fade}' + bars = "" + for top in range(60, 320, 13): + bars += f'' + bars += f'' + defs += _vertical_gradient("synth_sun", [(0, scene["s1"], 1), (0.52, "#fa8057", 1), (1, scene["s2"], 1)]) + sun_top, sun_size = 52, 250 + stripes = f'' + stripe_top = sun_top + while stripe_top < sun_top + sun_size: + stripes += f'' + stripe_top += 14 + defs += f'{stripes}' + sun = (f'') + halo = "".join(f'' for grow in range(3, 28, 6)) + floor = PerspectiveFloor(-480, 1440, 150, 180, 55) + grid = floor_svg(floor, scene["s2"], 22, 2.2, 46, 2, glow_width=3, ground_colour="#14051a") + return defs, _in_spread_space(bars + halo + sun + grid, 180), "bottom" + + +def _cloud(defs_needed, x, y, width, opacity): + """Three soft ellipses, matching the mockup's three-layer CSS cloud.""" + height = width * 0.42 + layers = [ # sub-box (x, y, w, h), centre within it, solid-until offset + ((x, y + height * 0.1, width * 0.55, height * 0.9), (0.30, 0.65), 0.70), + ((x + width * 0.45 * 0.4, y, width * 0.55, height), (0.55, 0.40), 0.72), + ((x + width * 0.55, y + height * 0.2, width * 0.45, height * 0.8), (0.78, 0.66), 0.70), + ] + shapes = "" + for (box_x, box_y, box_w, box_h), (centre_x, centre_y), solid_until in layers: + radius_x = min(centre_x, 1 - centre_x) * box_w + radius_y = min(centre_y, 1 - centre_y) * box_h + gradient_id = f"cloud_soft_{int(solid_until * 100)}" + defs_needed[gradient_id] = _radial_gradient(gradient_id, [(solid_until, "#ffffff", 1), (1, "#ffffff", 0)]) + shapes += (f'') + return f'{shapes}' + + +def clouds_scene(scene): + """Sun glare in the top right and five soft clouds.""" + glare_colour, glare_opacity = css_colour(scene["s1"]) + defs = _radial_gradient("sky_glare", [(0, "#ffffff", 1), (0.25, glare_colour, glare_opacity), + (0.65, glare_colour, 0)], radius=0.707) + body = '' + defs_needed = {} + for x, y, width, opacity in ((300, 330, 260, .95), (-40, 360, 240, .9), (600, 20, 150, .7), + (250, 40, 120, .55), (820, 250, 180, .85)): + body += _cloud(defs_needed, x, y, width, opacity) + return defs + "".join(defs_needed.values()), _in_spread_space(body, 90), "center" + + +def aero_scene(scene): + """Glossy glare, a green hill with a white rim, light swooshes and glass bubbles.""" + defs = _radial_gradient("aero_glare", [(0, "#ffffff", 0.95), (0.65, "#ffffff", 0)], radius=0.707) + defs += _radial_gradient("aero_bubble", [(0, "#ffffff", 1), (0.14, "#ffffff", 1), (0.34, "#ffffff", 0.15), + (0.70, "#74e4ff", 0.35), (1, "#ffffff", 0.8)], + centre=(0.32, 0.28), radius=0.99) + body = '' + body += (f'' + '' + '' + '') + for left, top, radius in ((300, 80, 46), (880, 60, 30), (560, 300, 22), (120, 300, 34), (700, 170, 16)): + centre_x, centre_y = left + radius, top + radius + body += (f'' + f'') + return defs, _in_spread_space(body, 180), "bottom" + + +def vignette_scene(scene): + """Dark edges and a faint red arched window glow at the top.""" + # CSS radial-gradient(70% 80% at 50% 40%, transparent 40%, s1): radii are 70% / 80% of the scene. + centre, radii = (SCENE_WIDTH * 0.5, SCENE_HEIGHT * 0.4), (SCENE_WIDTH * 0.7, SCENE_HEIGHT * 0.8) + defs = _radial_gradient("gothic_vignette", [(0.4, scene["s1"], 0), (1, scene["s1"], 1)]) + body = (f'') + defs += _vertical_gradient("gothic_window", [(0, scene["s2"], 1), (1, scene["s2"], 0)]) + body += '' + return defs, body, "center" + + +def woods_scene(scene): + """Two soft light patches and dark pines standing on the bottom edge.""" + defs_one, glow_one = _soft_ellipse_glow("woods_light_a", scene["s1"], (SCENE_WIDTH * 0.25, SCENE_HEIGHT * 0.2), + (SCENE_WIDTH * 0.3, SCENE_HEIGHT * 0.4)) + defs_two, glow_two = _soft_ellipse_glow("woods_light_b", scene["s1"], (SCENE_WIDTH * 0.7, SCENE_HEIGHT * 0.6), + (SCENE_WIDTH * 0.25, SCENE_HEIGHT * 0.35)) + pine = "M0 0 L-30 0 L-8 -40 L-24 -40 L-4 -80 L-16 -80 L0 -120 L16 -80 L4 -80 L24 -40 L8 -40 L30 0Z" + trees = "".join(f'' + for x, size in ((40, 1), (120, 1.3), (880, 1.2), (940, 0.9))) + body = glow_one + glow_two + _in_spread_space(f'{trees}', 180) + return defs_one + defs_two, body, "bottom" + + +SCENE_MAKERS = {"vapor": vapor_scene, "synth": synth_scene, "clouds": clouds_scene, + "aero": aero_scene, "vignette": vignette_scene, "woods": woods_scene} + + +def make_background_scene(scene): + """Return (svg_text, meta) for a scene, or (None, None) for 'glow' / 'none' (the app's fill does those).""" + maker = SCENE_MAKERS.get(scene["kind"]) + if maker is None: + return None, None + defs, body, anchor = maker(scene) + return svg_document(SCENE_WIDTH, SCENE_HEIGHT, body, defs), {"anchor": anchor} diff --git a/tools/theme_art/svg_common.py b/tools/theme_art/svg_common.py new file mode 100644 index 0000000..8492870 --- /dev/null +++ b/tools/theme_art/svg_common.py @@ -0,0 +1,84 @@ +"""Shared helpers for the theme art generator: SVG text, numbers, colours, seeded random numbers.""" + +import os + +REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +THEMES_DIR = os.path.join(REPO_ROOT, "themes") + +# Shapes copied from the wardrobe mockup (one source for every module). +LEAF_PATH = "M0,-10 C6,-6 6,6 0,10 C-6,6 -6,-6 0,-10 Z" +MAPLE_LEAF_PATH = ("M0,-12 L3,-5 L9,-7 L6,-1 L11,2 L4,3 L5,10 L0,6 L-5,10 L-4,3 " + "L-11,2 L-6,-1 L-9,-7 L-3,-5 Z") + + +def num(value): + """Short, stable text for a number (no trailing zeros).""" + text = f"{value:.2f}".rstrip("0").rstrip(".") + return "0" if text in ("-0", "") else text + + +def grey(lightness): + """A grey hex colour (r = g = b) for a lightness from 0 to 1.""" + level = max(0, min(255, round(lightness * 255))) + return f"#{level:02x}{level:02x}{level:02x}" + + +def svg_document(width, height, body, defs=""): + """Wrap SVG body text in a root element with explicit size and viewBox.""" + defs_text = f"{defs}" if defs else "" + return (f'{defs_text}{body}\n') + + +def write_theme_file(theme_id, file_name, text): + """Write one art file into themes// and return its path.""" + folder = os.path.join(THEMES_DIR, theme_id) + os.makedirs(folder, exist_ok=True) + path = os.path.join(folder, file_name) + with open(path, "w", encoding="utf-8") as handle: + handle.write(text) + return path + + +def remove_theme_file(theme_id, file_name): + """Delete a stale art file so a re-run matches the current plan.""" + path = os.path.join(THEMES_DIR, theme_id, file_name) + if os.path.exists(path): + os.remove(path) + + +def css_colour(text): + """Split a mockup colour ('#hex' or 'rgba(r,g,b,a)') into (hex, opacity).""" + text = text.strip() + if text.startswith("rgba"): + parts = [part.strip() for part in text[text.index("(") + 1:text.index(")")].split(",")] + red, green, blue = (int(float(part)) for part in parts[:3]) + return f"#{red:02x}{green:02x}{blue:02x}", float(parts[3]) + return text, 1.0 + + +def wrapped_copies(inner, tile_width, tile_height): + """Draw tile content nine times (shifted by the tile size) so shapes cut at an edge reappear opposite.""" + copies = [] + for shift_x in (-tile_width, 0, tile_width): + for shift_y in (-tile_height, 0, tile_height): + copies.append(f'{inner}') + return "".join(copies) + + +class MockupRandom: + """The mockup's seeded random numbers (mulberry32), so shapes land where the mockup put them.""" + + def __init__(self, seed): + self.state = seed & 0xFFFFFFFF + + @staticmethod + def _multiply(first, second): + return (first * second) & 0xFFFFFFFF + + def next(self): + self.state = (self.state + 0x6D2B79F5) & 0xFFFFFFFF + state = self.state + mixed = self._multiply(state ^ (state >> 15), 1 | state) + mixed = ((mixed + self._multiply(mixed ^ (mixed >> 7), 61 | mixed)) & 0xFFFFFFFF) ^ mixed + return ((mixed ^ (mixed >> 14)) & 0xFFFFFFFF) / 4294967296 diff --git a/tools/theme_art/theme_colours.py b/tools/theme_art/theme_colours.py new file mode 100644 index 0000000..6bf2b02 --- /dev/null +++ b/tools/theme_art/theme_colours.py @@ -0,0 +1,82 @@ +"""Colour tokens copied from the approved wardrobe mockup (THEMES array), one entry per theme. + +colours: the mockup's `c` tokens the art needs. +pattern: the mockup's `pat` (kind, p1..p4, op). scene: the mockup's `scene` (kind, s1..s4). +frame / thread: the mockup's frame style and thread stroke list. +background: two or three stops of the mockup's `bg` (used only by the preview sheet). +""" + +THEMES = { + "vaporwave": { + "colours": {"card": "#ffffff", "trim": "#2b1d52", "trim_dark": "#2b1d52", "thread": "#a94ace", + "thread_dark": "#2b1d52", "accent": "#f4a4f5", "glow": "#9881ff"}, + "pattern": {"kind": "memphis", "p1": "#7fe3cf", "p2": "#a94ace", "p3": "#f4a4f5", "p4": "#9881ff", "op": 0.6}, + "scene": {"kind": "vapor", "s1": "#ffffff", "s2": "#f4a4f5", "s3": "#9881ff"}, + "frame": "memphis", "thread": "dashed_line", + "background": ["#bff6e6", "#e4dcfb", "#f6b8ef"], + }, + "synthwave": { + "colours": {"card": "#241032", "trim": "#ed2ea5", "trim_dark": "#7a1456", "thread": "#6f86ff", + "thread_dark": "#2b2f7a", "accent": "#fad009", "glow": "#fa8057"}, + "pattern": {"kind": "none"}, + "scene": {"kind": "synth", "s1": "#fad009", "s2": "#ed2ea5", "s3": "#6172c5"}, + "frame": "neon", "thread": "neon_tube", + "background": ["#1a0619", "#4a1150", "#2c0d2a"], + }, + "autumn": { + "colours": {"card": "#f8ebc6", "trim": "#a43108", "trim_dark": "#5c2004", "thread": "#d59f3f", + "thread_dark": "#5c5011", "accent": "#cf6811", "glow": "#8a7424"}, + "pattern": {"kind": "leaves", "p1": "#d59f3f", "p2": "#a43108", "p3": "#8a7424", "p4": "#ebd48f", "op": 0.55}, + "scene": {"kind": "glow"}, + "frame": "leaf", "thread": "twine", + "background": ["#cf6811", "#8f3d0c", "#421a05"], + }, + "rustic": { + "colours": {"card": "#f1e2c8", "trim": "#8c2e0f", "trim_dark": "#4e1c0d", "thread": "#dd8838", + "thread_dark": "#6b3a12", "accent": "#dd8838", "glow": "#c24f1d"}, + "pattern": {"kind": "grain", "p1": "#1f0a03", "p2": "#1a0802", "op": 0.8}, + "scene": {"kind": "glow"}, + "frame": "plank", "thread": "rope", + "background": ["#4e1c0d", "#5a2210", "#2c0f06"], + }, + "woodsy": { + "colours": {"card": "#f1f5d3", "trim": "#362f22", "trim_dark": "#1d1a12", "thread": "#a2b447", + "thread_dark": "#23361a", "accent": "#a2b447", "glow": "#516f7a"}, + "pattern": {"kind": "ferns", "p1": "#2f4a1f", "p2": "#556f30", "op": 0.9}, + "scene": {"kind": "woods", "s1": "rgba(239,244,189,.13)", "s2": "#142010"}, + "frame": "vine", "thread": "vine", + "background": ["#3d5626", "#23361a", "#18250f"], + }, + "sky": { + "colours": {"card": "#ffffff", "trim": "#009dff", "trim_dark": "#0062d6", "thread": "#ffffff", + "thread_dark": "#0077ff", "accent": "#ffd75e", "glow": "#ffd75e"}, + "pattern": {"kind": "none"}, + "scene": {"kind": "clouds", "s1": "rgba(255,250,210,.7)"}, + "frame": "cloud", "thread": "kite_string", + "background": ["#0077ff", "#00a8ff", "#d9f3ff"], + }, + "aero": { + "colours": {"card": "#ffffff", "trim": "#0c71c6", "trim_dark": "#0a4f8c", "thread": "#6ab63f", + "thread_dark": "#3f7f22", "accent": "#86e750", "glow": "#74e4ff"}, + "pattern": {"kind": "none"}, + "scene": {"kind": "aero", "s2": "#6ab63f"}, + "frame": "glass", "thread": "glossy_tube", + "background": ["#5fd6fb", "#a9ecff", "#f2fcff"], + }, + "gothic": { + "colours": {"card": "#d8d3c8", "trim": "#4d524b", "trim_dark": "#223330", "thread": "#ce1a1e", + "thread_dark": "#65060e", "accent": "#ce1a1e", "glow": "#ce1a1e", "stone": "#837f78"}, + "pattern": {"kind": "stone", "p1": "#0d1716", "p2": "#081919", "p3": "#2a3a36", "op": 0.9}, + "scene": {"kind": "vignette", "s1": "#030909", "s2": "#65060e"}, + "frame": "stone", "thread": "cord", + "background": ["#1b2826", "#1b2826"], + }, + "terminal": { + "colours": {"card": "#000000", "trim": "#33ff66", "trim_dark": "#33ff66", "thread": "#ffb000", + "thread_dark": "#ffb000", "accent": "#ffb000", "glow": "#33ff66"}, + "pattern": {"kind": "scan", "p1": "#0c3a18", "op": 1.0}, + "scene": {"kind": "none"}, + "frame": "ascii", "thread": "dashed_amber", + "background": ["#000000", "#000000"], + }, +} diff --git a/tools/theme_art/threads.py b/tools/theme_art/threads.py new file mode 100644 index 0000000..08adfcb --- /dev/null +++ b/tools/theme_art/threads.py @@ -0,0 +1,88 @@ +"""Thread strips: one horizontal, seamless tile per thread look (greyscale, gradient-mapped by the app). + +Black = dark edge (THREAD_DARK), mid grey = thread colour, white = highlight. Source units are 4x px. +Every shape sits inside the tile (or repeats exactly at its edges), so the strip tiles left to right. +""" + +from svg_common import grey, num, svg_document + +SOURCE_SCALE = 4 + + +def _band(length, height, band_height, lightness, opacity=1.0, shift=0.0): + """A full-length horizontal band, centred (plus `shift`) in the strip.""" + top = (height - band_height) / 2 + shift + return (f'') + + +def _dash(length, height, dash_length): + """One round-ended dash, centred in the tile (a CSS dash plus its round caps).""" + visible = dash_length + height + return (f'') + + +def _twisted_strand(length, height, strand_width, slant): + """One slanted strand of a twisted rope, centred in the tile, with a soft shine line.""" + middle_x, middle_y = length / 2, height / 2 + reach_y = height / 2 - strand_width / 2 + start = f"{num(middle_x - slant)},{num(middle_y + reach_y)}" + end = f"{num(middle_x + slant)},{num(middle_y - reach_y)}" + return (f'' + f'') + + +def dashed_line(length, height): + return _dash(length, height, length * 10 / 16) + + +def neon_tube(length, height): + return (_band(length, height, height, 0.5, 0.25) + _band(length, height, height * 0.56, 0.5, 0.3) + + _band(length, height, height * 0.31, 0.5) + _band(length, height, height * 0.12, 1.0, 0.8)) + + +def twine(length, height): + return _band(length, height, height, 0.0) + _twisted_strand(length, height, height * 0.6, length * 0.2) + + +def rope(length, height): + return _band(length, height, height, 0.0) + _twisted_strand(length, height, height * 0.46, length * 0.24) + + +def vine(length, height): + return _band(length, height, height, 0.5) + _band(length, height, height * 0.2, 1.0, 0.25, -height * 0.18) + + +def kite_string(length, height): + return _band(length, height, height, 0.0, 0.25) + _band(length, height, height / 2, 0.5) + + +def glossy_tube(length, height): + return (_band(length, height, height, 0.0) + _band(length, height, height * 0.58, 0.5) + + _band(length, height, height * 0.2, 1.0, 0.56, -height * 0.12)) + + +def cord(length, height): + return _band(length, height, height, 0.0) + _band(length, height, height / 2, 0.5) + + +def dashed_amber(length, height): + return _dash(length, height, length * 6 / 10) + + +# thread look -> (maker, drawn width in px, repeat length in px) +THREAD_LOOKS = { + "dashed_line": (dashed_line, 3, 16), "neon_tube": (neon_tube, 8, 8), "twine": (twine, 4, 8), + "rope": (rope, 5.5, 6), "vine": (vine, 3, 12), "kite_string": (kite_string, 6, 8), + "glossy_tube": (glossy_tube, 6, 8), "cord": (cord, 4, 8), "dashed_amber": (dashed_amber, 2.5, 10), +} + + +def make_thread_strip(look): + """Return (svg_text, meta) for a thread look.""" + maker, width_px, repeat_px = THREAD_LOOKS[look] + length, height = repeat_px * SOURCE_SCALE, width_px * SOURCE_SCALE + return svg_document(length, height, maker(length, height)), {"strip_size": [length, height], "width": width_px} diff --git a/tools/theme_art/tiles.py b/tools/theme_art/tiles.py new file mode 100644 index 0000000..9ec7cb3 --- /dev/null +++ b/tools/theme_art/tiles.py @@ -0,0 +1,107 @@ +"""Background tiles (real colours, transparent ground) from the mockup's PATTERNS.""" + +from svg_common import LEAF_PATH, MAPLE_LEAF_PATH, MockupRandom, num, svg_document, wrapped_copies + + +def memphis_tile(pattern): + """Squiggle, triangle, dot grid, zigzag, plus and square: the Memphis look.""" + dots = "".join(f'' + for column in range(4) for row in range(3)) + body = ( + f'' + f'' + f'' + f'{dots}' + f'' + f'' + f'') + return 180, 180, body + + +def leaves_tile(pattern): + """Nine drifting leaves (plain and maple) placed by the mockup's seed.""" + random = MockupRandom(11) + colours = [pattern["p1"], pattern["p2"], pattern["p3"], pattern["p4"]] + leaves = "" + for index in range(9): + x, y = random.next() * 200, random.next() * 200 + angle, size = random.next() * 360, 0.7 + random.next() * 0.8 + shape = MAPLE_LEAF_PATH if index % 2 else LEAF_PATH + leaves += (f'') + return 200, 200, wrapped_copies(leaves, 200, 200) + + +def plank_tile(pattern): + """Two vertical boards with seams, wavy grain and one knot. Opaque, so it replaces the plank fill.""" + board_colours = ["#4e1c0d", "#5a2210"] + seam_colour = "#2c0f06" + width, height = 240, 220 + body = "" + for board in range(2): + left = board * 120 + body += f'' + body += f'' + for line in range(8): + x = left + 8 + line * 14 + stroke_width = 1.8 if line % 3 == 0 else 1 + wobble = 5 if (line + board) % 2 else -4 + body += (f'') + body += (f'') + body += f'' + return width, height, body + + +def _fern(pattern, x, y, angle, size): + frond = (f'' + f'') + for step in range(1, 9): + leaf_y, length = -step * 9, 16 - step * 1.4 + frond += (f'') + return frond + "" + + +def ferns_tile(pattern): + """Two ferns and two lily pads.""" + body = _fern(pattern, 40, 170, -18, 1) + _fern(pattern, 170, 110, 24, 0.8) + body += (f'' + f'') + return 220, 220, wrapped_copies(body, 220, 220) + + +def stone_tile(pattern): + """Stone block courses with two cracks and two shaded blocks.""" + body = (f'' + f'' + f'' + f'' + f'' + f'') + return 160, 80, body + + +def scan_tile(pattern): + """A faint phosphor grid.""" + return 28, 28, f'' + + +TILE_MAKERS = {"memphis": memphis_tile, "leaves": leaves_tile, "grain": plank_tile, + "ferns": ferns_tile, "stone": stone_tile, "scan": scan_tile} + +# Rustic's tile is the whole plank floor, so it is drawn nearly opaque. +OPACITY_OVERRIDES = {"grain": 0.92} + + +def make_background_tile(pattern): + """Return (svg_text, meta) for a pattern, or (None, None) when the mockup has no tile.""" + maker = TILE_MAKERS.get(pattern["kind"]) + if maker is None: + return None, None + width, height, body = maker(pattern) + opacity = OPACITY_OVERRIDES.get(pattern["kind"], pattern.get("op", 1.0)) + return svg_document(width, height, body), {"opacity": opacity, "scale": 1.0} diff --git a/tools/theme_defs/__pycache__/palettes.cpython-314.pyc b/tools/theme_defs/__pycache__/palettes.cpython-314.pyc new file mode 100644 index 0000000..172b1c0 Binary files /dev/null and b/tools/theme_defs/__pycache__/palettes.cpython-314.pyc differ diff --git a/tools/theme_defs/make_theme_defs.py b/tools/theme_defs/make_theme_defs.py new file mode 100644 index 0000000..cd66777 --- /dev/null +++ b/tools/theme_defs/make_theme_defs.py @@ -0,0 +1,156 @@ +"""Writes themes//theme.gd for each theme in palettes.py. + +Run: python3 -I tools/theme_defs/make_theme_defs.py +It turns each theme's small mockup colour set into the app's full colour +token list, adds the art and sound files that exist in themes//, and the +frame / thread numbers from tools/theme_art/meta.json. See docs/THEMES.md. +""" +import json +import os +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, HERE) +from palettes import THEMES # noqa: E402 + +REPO = os.path.dirname(os.path.dirname(HERE)) +# Mockup threads are drawn at mockup scale (Tarot: 4 px); the app draws Tarot's at 11 px. +THREAD_SCALE = 2.5 + + +def to_rgb(hex_text): + hex_text = hex_text.lstrip("#")[:6] + return [int(hex_text[i:i + 2], 16) / 255 for i in (0, 2, 4)] + + +def to_hex(rgb): + return "#" + "".join("%02x" % round(max(0, min(1, part)) * 255) for part in rgb) + + +def mix(first, second, amount): + """`amount` of the way from `first` to `second`.""" + a, b = to_rgb(first), to_rgb(second) + return to_hex([a[i] + (b[i] - a[i]) * amount for i in range(3)]) + + +def lighten(color, amount): + return mix(color, "#ffffff", amount) + + +def darken(color, amount): + return mix(color, "#000000", amount) + + +def luminance(color): + red, green, blue = to_rgb(color) + return 0.299 * red + 0.587 * green + 0.114 * blue + + +def tokens(theme): + """The app's colour tokens (ThemeStore.TOKENS) from the mockup's set.""" + mock = theme["colors"] + dark_card = luminance(mock["card"]) < 0.4 + out = { + "BG": mock["bg"], "BG_DEEP": darken(mock["bg"], 0.45), "BG_HOVER": lighten(mock["bg"], 0.15), + "PANEL": mock["panel"], "ON_BG": mock["onbg"], "ON_BG_MUTED": mix(mock["onbg"], mock["bg"], 0.35), + "CARD": mock["card"], "CARD_SOFT": mock["card2"], "CARD_HOVER": mix(mock["card"], mock["rule"], 0.6), + "CARD_SHADE": mix(mock["card"], mock["muted"], 0.25), + "INK": mock["ink"], "MUTED": mock["muted"], "FAINT": mix(mock["muted"], mock["card"], 0.4), + "RULE": mock["rule"], "DASH": mix(mock["rule"], mock["muted"], 0.45), + "HOVER_ROW": mix(mock["card"], mock["lit"], 0.35), "STRIPE": mock["ink"] + "0e", + "TRIM": mock["trim"], "TRIM_DARK": mock["trimD"], + "THREAD": mock["thread"], "THREAD_DARK": mock["threadD"], + "ACCENT": mock["accent"], "ACCENT_DARK": darken(mock["accent"], 0.55), + "GROUP": mock["accent"], "LIT": mock["lit"], "FLICK": mock["accent"] + "59", + "PULSE": lighten(mock["accent"], 0.7), "GLOW": mock["glow"], + "VALUE_BG": mix(mock["card"], mock["accent"], 0.18), + "VALUE_BORDER": mix(mock["card"], mock["accent"], 0.55), + "VALUE_INK": lighten(mock["accent"], 0.2) if dark_card else darken(mock["accent"], 0.5), + "VALUE_INK_ON_BG": mock["accent"], + "REF_BG": mix(mock["card"], mock["glow"], 0.2), + "REF_INK": lighten(mock["glow"], 0.3) if dark_card else darken(mock["glow"], 0.5), + "REF_INK_ON_BG": lighten(mock["glow"], 0.3), + } + if dark_card: + out["WARN_BG"] = mix(mock["card"], "#e0574a", 0.3) + out["WARN_INK"] = "#ffb1a3" + out["DANGER_INK"] = "#ff8a7a" + out["OK_INK"] = "#7fe0a0" + out["NO_INK"] = "#ff8a7a" + out.update(theme.get("overrides", {})) + return out + + +def mascot_colors(theme): + colors = dict(theme["mascot"]) + colors.setdefault("inner_line", mix(colors["outline"], colors["cloth"], 0.55)) + return colors + + +def file_keys(theme_id, meta): + """Keys for the files that exist in themes//, with meta.json numbers.""" + folder = os.path.join(REPO, "themes", theme_id) + has = lambda name: os.path.exists(os.path.join(folder, name)) # noqa: E731 + keys = {} + if has("background_scene.svg"): + keys["background_scene"] = {"file": "background_scene.svg"} + keys["background_scene"].update(meta.get("background_scene") or {}) + if has("background_tile.svg"): + keys["background_tile"] = {"file": "background_tile.svg"} + keys["background_tile"].update(meta.get("background_tile") or {}) + if has("frame_corner.svg") and has("frame_edge.svg"): + frame = {"corner": "frame_corner.svg", "edge": "frame_edge.svg"} + if has("frame_corner_fixed.svg"): + frame["corner_fixed"] = "frame_corner_fixed.svg" + frame.update({key: value for key, value in (meta.get("frame") or {}).items() if key != "has_corner_fixed"}) + keys["frame"] = frame + keys["card_frame"] = "art" + if has("thread_strip.svg"): + thread = {"strip": "thread_strip.svg"} + if has("thread_pin.svg"): + thread["pin"] = "thread_pin.svg" + thread.update(meta.get("thread") or {}) + if "width" in thread: + thread["width"] = round(float(thread["width"]) * THREAD_SCALE, 1) + keys["thread"] = thread + sounds = {} + for event in ("roll", "card_turn", "thread", "click", "ambient"): + if has("sounds/%s.ogg" % event): + sounds[event] = "sounds/%s.ogg" % event + if sounds: + keys["sounds"] = sounds + return keys + + +def build(theme_id, theme, meta): + data = {"id": theme_id, "name": theme["name"], "builtin": True, + "pattern": theme.get("pattern", "none"), "logo": "fortune_teller", "card_frame": "plain", + "font_body": theme["fonts"][0], "font_display": theme["fonts"][1], + "background": theme["background"], "panel": theme["panel"], + "mascot_colors": mascot_colors(theme)} + data.update(file_keys(theme_id, meta)) + data["colors"] = tokens(theme) + return data + + +def write(theme_id, data): + body = json.dumps(data, indent="\t", ensure_ascii=False) + text = ("extends RefCounted\n## Built-in theme: %s. Written by tools/theme_defs/make_theme_defs.py:\n" + "## change tools/theme_defs/palettes.py and re-run it rather than editing this file.\n\n" + "const DATA := %s\n") % (data["name"], body) + path = os.path.join(REPO, "themes", theme_id, "theme.gd") + os.makedirs(os.path.dirname(path), exist_ok=True) + with open(path, "w", encoding="utf-8") as handle: + handle.write(text) + return path + + +def main(): + meta_path = os.path.join(REPO, "tools", "theme_art", "meta.json") + all_meta = json.load(open(meta_path)) if os.path.exists(meta_path) else {} + for theme_id, theme in THEMES.items(): + print(write(theme_id, build(theme_id, theme, all_meta.get(theme_id, {})))) + + +if __name__ == "__main__": + main() diff --git a/tools/theme_defs/palettes.py b/tools/theme_defs/palettes.py new file mode 100644 index 0000000..4a3f372 --- /dev/null +++ b/tools/theme_defs/palettes.py @@ -0,0 +1,113 @@ +"""The 2026-11 theme sets, as chosen in the "Morgan's Wardrobe" mockup. + +Each entry holds the mockup's small colour set; make_theme_defs.py turns it +into the app's full token list. Keys: + name, fonts (body, display), background (app fill), panel (app fill), + pattern (fallback when there is no tile), colors (mockup tokens), + mascot (Morgan's role colours), overrides (app tokens set by hand). +""" + +THEMES = { + "vaporwave": { + "name": "Vaporwave", "fonts": ("nunito", "righteous"), + "background": {"kind": "linear", "colors": ["#bff6e6", "#e4dcfb", "#f6b8ef"], "angle": 160}, + # A light panel: the app uses one text colour (dark here) for background and panels. + "panel": {"kind": "linear", "colors": ["#f6f1ff", "#e8ddff"], "angle": 90}, + "colors": {"bg": "#e4dcfb", "onp": "#ffffff", "onpm": "#efe2ff", "card": "#ffffff", "card2": "#f6f2ff", + "ink": "#2b1d52", "muted": "#7b6ea8", "rule": "#e2dbf7", "trim": "#2b1d52", "trimD": "#2b1d52", + "thread": "#a94ace", "threadD": "#2b1d52", "accent": "#f4a4f5", "lit": "#beffea", + "glow": "#9881ff", "onbg": "#2b1d52", "panel": "#efe8ff"}, + "mascot": {"outline": "#2b1d52", "cloth": "#a94ace", "trim": "#7fe3cf", "eye": "#f4a4f5", "eye_glint": "#ffffff"}, + "overrides": {"ON_BG_MUTED": "#5d4f8c"}, + }, + "synthwave": { + "name": "Synthwave", "fonts": ("atkinson", "audiowide"), + "background": {"kind": "linear", "colors": ["#1a0619", "#2c0d2a", "#4a1150", "#2c0d2a"], "angle": 90}, + "panel": {"kind": "solid", "colors": ["#14040f"]}, + "colors": {"bg": "#2c0d2a", "onp": "#ffe6f6", "onpm": "#c79bc0", "card": "#241032", "card2": "#2b143b", + "ink": "#ffe9f7", "muted": "#b48fc8", "rule": "#4b2466", "trim": "#ed2ea5", "trimD": "#7a1456", + "thread": "#6f86ff", "threadD": "#2b2f7a", "accent": "#fad009", "lit": "#ed2ea5", + "glow": "#fa8057", "onbg": "#ffe6f6", "panel": "#14040f"}, + "mascot": {"outline": "#14040f", "cloth": "#3a1650", "trim": "#ed2ea5", "eye": "#fad009", "eye_glint": "#ffffff"}, + "overrides": {}, + }, + "autumn": { + "name": "Cozy Autumn", "fonts": ("lora", "fraunces"), + "background": {"kind": "radial", "colors": ["#cf6811", "#8f3d0c", "#421a05"], "center": [0.35, 0.25]}, + "panel": {"kind": "solid", "colors": ["#3a1704"]}, + "colors": {"bg": "#8f3d0c", "onp": "#fbefc8", "onpm": "#d9b98a", "card": "#f8ebc6", "card2": "#fbf2d9", + "ink": "#3a1a06", "muted": "#7a5a2a", "rule": "#e2cc95", "trim": "#a43108", "trimD": "#5c2004", + "thread": "#d59f3f", "threadD": "#5c5011", "accent": "#cf6811", "lit": "#f0cf7a", + "glow": "#8a7424", "onbg": "#fbefc8", "panel": "#3a1704"}, + "mascot": {"outline": "#2c1204", "cloth": "#a43108", "trim": "#d59f3f", "eye": "#8a7424", "eye_glint": "#ebd48f"}, + "overrides": {"ACCENT": "#f0a040"}, + }, + "rustic": { + "name": "Rustic", "fonts": ("atkinson", "zillaslab"), + "background": {"kind": "radial", "colors": ["#6a2a12", "#4e1c0d", "#2a0f06"], "center": [0.4, 0.3]}, + "panel": {"kind": "solid", "colors": ["#1c2321"]}, + "colors": {"bg": "#4e1c0d", "onp": "#f3dfc2", "onpm": "#b49c80", "card": "#f1e2c8", "card2": "#f7ecd9", + "ink": "#1c1310", "muted": "#6e5040", "rule": "#dcc4a2", "trim": "#8c2e0f", "trimD": "#4e1c0d", + "thread": "#dd8838", "threadD": "#6b3a12", "accent": "#dd8838", "lit": "#f6c98d", + "glow": "#c24f1d", "onbg": "#f3dfc2", "panel": "#1c2321"}, + "mascot": {"outline": "#0f1111", "cloth": "#8c2e0f", "trim": "#dd8838", "eye": "#f2a65a", "eye_glint": "#ffe1b0"}, + "overrides": {}, + }, + "woodsy": { + "name": "Woodsy", "fonts": ("alegreya", "alegreya"), + "background": {"kind": "radial", "colors": ["#3d5626", "#23361a", "#18250f"], "center": [0.4, 0.3]}, + "panel": {"kind": "solid", "colors": ["#1b1a12"]}, + "colors": {"bg": "#23361a", "onp": "#eff4bd", "onpm": "#a9b48a", "card": "#f1f5d3", "card2": "#f7f9e4", + "ink": "#1d2a14", "muted": "#5b6a45", "rule": "#d6dfa6", "trim": "#362f22", "trimD": "#1d1a12", + "thread": "#a2b447", "threadD": "#23361a", "accent": "#a2b447", "lit": "#dbe89a", + "glow": "#516f7a", "onbg": "#eff4bd", "panel": "#1b1a12"}, + "mascot": {"outline": "#1a2612", "cloth": "#556f30", "trim": "#a2b447", "eye": "#9fd3dc", "eye_glint": "#eff4bd"}, + "overrides": {"GLOW": "#e9f59a"}, + }, + "sky": { + "name": "Sky Blue", "fonts": ("nunito", "quicksand"), + "background": {"kind": "linear", "colors": ["#0077ff", "#00a8ff", "#66d9ff", "#d9f3ff"], "angle": 90}, + "panel": {"kind": "linear", "colors": ["#0062d6", "#0077ff"], "angle": 0}, + "colors": {"bg": "#00a8ff", "onp": "#ffffff", "onpm": "#cfe8ff", "card": "#ffffff", "card2": "#f1f9ff", + "ink": "#0b2a55", "muted": "#4d6f99", "rule": "#d4ecfb", "trim": "#009dff", "trimD": "#0062d6", + "thread": "#ffffff", "threadD": "#0077ff", "accent": "#ffd75e", "lit": "#cfefff", + "glow": "#ffd75e", "onbg": "#ffffff", "panel": "#0062d6"}, + "mascot": {"outline": "#0b2a55", "cloth": "#009dff", "trim": "#eaf7ff", "eye": "#ffd75e", "eye_glint": "#ffffff"}, + "overrides": {"ON_BG_MUTED": "#e3f4ff"}, + }, + "aero": { + "name": "Frutiger Aero", "fonts": ("asap", "asap"), + "background": {"kind": "linear", "colors": ["#5fd6fb", "#a9ecff", "#f2fcff"], "angle": 90}, + # Glossy white panel, so the dark text reads on it too. + "panel": {"kind": "linear", "colors": ["#ffffff", "#e6f7ff", "#c8ebff"], "angle": 90}, + "colors": {"bg": "#a9ecff", "onp": "#ffffff", "onpm": "#d6efff", "card": "#ffffff", "card2": "#f1faff", + "ink": "#0b3a63", "muted": "#4f7898", "rule": "#cfe9f7", "trim": "#0c71c6", "trimD": "#0a4f8c", + "thread": "#6ab63f", "threadD": "#3f7f22", "accent": "#86e750", "lit": "#d9f7c4", + "glow": "#74e4ff", "onbg": "#0b3a63", "panel": "#e6f7ff"}, + "mascot": {"outline": "#0b3a63", "cloth": "#0c71c6", "trim": "#86e750", "eye": "#74e4ff", "eye_glint": "#ffffff"}, + "overrides": {"ON_BG_MUTED": "#3e6688"}, + }, + "gothic": { + "name": "Gothic", "fonts": ("imfell", "unifraktur"), + "background": {"kind": "radial", "colors": ["#223330", "#1b2826", "#081919"], "center": [0.5, 0.4]}, + "panel": {"kind": "solid", "colors": ["#060f0f"]}, + "colors": {"bg": "#1b2826", "onp": "#d9d4cc", "onpm": "#8f8a82", "card": "#d8d3c8", "card2": "#e2ddd3", + "ink": "#120d0d", "muted": "#4d524b", "rule": "#b6b0a4", "trim": "#4d524b", "trimD": "#223330", + "thread": "#ce1a1e", "threadD": "#65060e", "accent": "#ce1a1e", "lit": "#ecc2bd", + "glow": "#ce1a1e", "onbg": "#d9d4cc", "panel": "#060f0f"}, + "mascot": {"outline": "#081919", "cloth": "#65060e", "trim": "#837f78", "eye": "#ce1a1e", "eye_glint": "#ffd6d6"}, + "overrides": {"TRIM": "#837f78"}, + }, + "terminal": { + "name": "Terminal", "fonts": ("vt323", "vt323"), + "background": {"kind": "solid", "colors": ["#000000"]}, + "panel": {"kind": "solid", "colors": ["#000000"]}, + "colors": {"bg": "#000000", "onp": "#33ff66", "onpm": "#a6ffbf", "card": "#000000", "card2": "#031a09", + "ink": "#33ff66", "muted": "#a6ffbf", "rule": "#1d9940", "trim": "#33ff66", "trimD": "#0b3d18", + "thread": "#ffb000", "threadD": "#4d3500", "accent": "#ffb000", "lit": "#0d4d1f", + "glow": "#33ff66", "onbg": "#33ff66", "panel": "#000000"}, + "mascot": {"outline": "#33ff66", "cloth": "#000000", "trim": "#33ff66", "eye": "#ffb000", "eye_glint": "#ffffff", + "inner_line": "#0b3d18"}, + "overrides": {"BG_HOVER": "#0d4d1f", "STRIPE": "#33ff6610", "FAINT": "#5fd47f", "DASH": "#1d9940"}, + }, +} diff --git a/tools/theme_sounds/__pycache__/recipes.cpython-314.pyc b/tools/theme_sounds/__pycache__/recipes.cpython-314.pyc new file mode 100644 index 0000000..f5369ff Binary files /dev/null and b/tools/theme_sounds/__pycache__/recipes.cpython-314.pyc differ diff --git a/tools/theme_sounds/__pycache__/synth.cpython-314.pyc b/tools/theme_sounds/__pycache__/synth.cpython-314.pyc new file mode 100644 index 0000000..30bb83f Binary files /dev/null and b/tools/theme_sounds/__pycache__/synth.cpython-314.pyc differ diff --git a/tools/theme_sounds/make_theme_sounds.py b/tools/theme_sounds/make_theme_sounds.py new file mode 100644 index 0000000..8f64f70 --- /dev/null +++ b/tools/theme_sounds/make_theme_sounds.py @@ -0,0 +1,90 @@ +"""Render each theme's stand-in sounds to themes//sounds/*.ogg. + +Run from anywhere: python3 -I tools/theme_sounds/make_theme_sounds.py +The sounds are ports of the WebAudio recipes in the theme mockup. They are +placeholders until real recordings replace them. +""" + +import pathlib +import subprocess +import sys +import zlib + +import numpy + +TOOL_FOLDER = pathlib.Path(__file__).resolve().parent +sys.path.insert(0, str(TOOL_FOLDER)) # `-I` leaves the script folder off the path + +from recipes import RECIPES # noqa: E402 +from synth import SAMPLE_RATE, Mix # noqa: E402 + +REPO_ROOT = TOOL_FOLDER.parent.parent + +# Theme id -> recipe for each sound slot. Slot names are the output file names. +THEME_SOUNDS = { + "tarot": {"roll": "harp", "card_turn": "swish"}, + "vaporwave": {"roll": "dreamy", "card_turn": "tapestop"}, + "synthwave": {"roll": "synth", "card_turn": "cassette"}, + "autumn": {"roll": "windchime", "card_turn": "rustle"}, + "rustic": {"roll": "clack", "card_turn": "creak"}, + "woodsy": {"roll": "drops", "card_turn": "leafswish"}, + "sky": {"roll": "airchime", "card_turn": "whoosh"}, + "aero": {"roll": "bubbles", "card_turn": "tink"}, + "gothic": {"roll": "bell", "card_turn": "scrape"}, + "terminal": {"roll": "beeps", "card_turn": "relay"}, +} + +PEAK_DBFS = -3.0 +FADE_IN_SECONDS = 0.005 +FADE_OUT_SECONDS = 0.03 +SILENCE_DBFS = -60.0 # quieter than this, relative to full scale, counts as silence +MAX_SECONDS = 2.5 +MAX_SECONDS_BY_RECIPE = {"bell": 3.0} + + +def render(recipe_name): + """Run one recipe with a seed taken from its name, so re-runs match.""" + mix = Mix(seed=zlib.crc32(recipe_name.encode())) + RECIPES[recipe_name](mix) + return mix.samples + + +def finish(samples, max_seconds): + """Normalise the peak, trim the silent tail, cap the length, add fades.""" + samples = samples * (10.0 ** (PEAK_DBFS / 20.0) / numpy.max(numpy.abs(samples))) + loud_enough = numpy.nonzero(numpy.abs(samples) > 10.0 ** (SILENCE_DBFS / 20.0))[0] + end_index = min(loud_enough[-1] + 1, int(max_seconds * SAMPLE_RATE)) + samples = samples[:end_index].copy() + + fade_in_length = int(FADE_IN_SECONDS * SAMPLE_RATE) + samples[:fade_in_length] *= numpy.linspace(0.0, 1.0, fade_in_length) + fade_out_length = min(int(FADE_OUT_SECONDS * SAMPLE_RATE), len(samples)) + samples[-fade_out_length:] *= numpy.linspace(1.0, 0.0, fade_out_length) + return samples + + +def write_ogg(samples, output_path): + output_path.parent.mkdir(parents=True, exist_ok=True) + command = [ + "ffmpeg", "-y", "-loglevel", "error", + "-f", "f32le", "-ar", str(SAMPLE_RATE), "-ac", "1", "-i", "pipe:0", + "-c:a", "libvorbis", "-q:a", "4", "-map_metadata", "-1", + "-fflags", "+bitexact", "-flags:a", "+bitexact", + str(output_path), + ] + subprocess.run(command, input=samples.astype(" len(self.samples): + grown = numpy.zeros(end_index) + grown[: len(self.samples)] = self.samples + self.samples = grown + self.samples[start_index:end_index] += signal + + +def _time_axis(duration): + sample_count = int(math.ceil((duration + TAIL_SECONDS) * SAMPLE_RATE)) + return numpy.arange(sample_count) / SAMPLE_RATE + + +def exponential_ramp(times, start_value, end_value, ramp_seconds): + """Value of an exponential ramp that starts at time 0 and then holds.""" + progress = numpy.clip(times / ramp_seconds, 0.0, 1.0) + return start_value * (end_value / start_value) ** progress + + +def envelope(times, gain, attack, duration): + """Exponential rise to `gain` over `attack`, then fall to the floor at `duration`.""" + rising = exponential_ramp(times, ENVELOPE_FLOOR, gain, attack) + falling = exponential_ramp(times - attack, gain, ENVELOPE_FLOOR, duration - attack) + return numpy.where(times < attack, rising, falling) + + +def _poly_blep(phase, phase_step): + """Smooths the jump in a saw or square wave to cut aliasing.""" + correction = numpy.zeros_like(phase) + just_after = phase < phase_step + ratio = phase[just_after] / phase_step[just_after] + correction[just_after] = ratio + ratio - ratio * ratio - 1.0 + just_before = phase > 1.0 - phase_step + ratio = (phase[just_before] - 1.0) / phase_step[just_before] + correction[just_before] = ratio * ratio + ratio + ratio + 1.0 + return correction + + +def oscillator(wave_type, frequencies): + """One sample per entry in `frequencies` (Hz), starting at phase 0.""" + phase_step = frequencies / SAMPLE_RATE + phase = numpy.concatenate(([0.0], numpy.cumsum(phase_step)[:-1])) % 1.0 + if wave_type == "sine": + return numpy.sin(2.0 * math.pi * phase) + if wave_type == "triangle": + return 1.0 - 4.0 * numpy.abs(((phase + 0.25) % 1.0) - 0.5) + if wave_type == "sawtooth": + return 2.0 * phase - 1.0 - _poly_blep(phase, phase_step) + if wave_type == "square": + square = numpy.where(phase < 0.5, 1.0, -1.0) + square = square + _poly_blep(phase, phase_step) + return square - _poly_blep((phase + 0.5) % 1.0, phase_step) + raise ValueError("unknown wave type: " + wave_type) + + +def biquad(signal, filter_type, cutoffs, quality): + """Run `signal` through a Web Audio style biquad. `cutoffs` is per sample.""" + angular = 2.0 * math.pi * numpy.minimum(cutoffs, SAMPLE_RATE * 0.49) / SAMPLE_RATE + cosine = numpy.cos(angular) + sine = numpy.sin(angular) + if filter_type == "bandpass": + alpha = sine / (2.0 * quality) + feed = [alpha, numpy.zeros_like(alpha), -alpha] + else: + alpha = sine / 2.0 * 10.0 ** (-quality / 20.0) + if filter_type == "lowpass": + edge = (1.0 - cosine) / 2.0 + feed = [edge, 1.0 - cosine, edge] + elif filter_type == "highpass": + edge = (1.0 + cosine) / 2.0 + feed = [edge, -(1.0 + cosine), edge] + else: + raise ValueError("unknown filter type: " + filter_type) + norm = 1.0 + alpha + feed_now, feed_one, feed_two = [(part / norm).tolist() for part in feed] + back_one = (-2.0 * cosine / norm).tolist() + back_two = ((1.0 - alpha) / norm).tolist() + + output = [0.0] * len(signal) + input_one = input_two = output_one = output_two = 0.0 + for i, sample in enumerate(signal.tolist()): + result = (feed_now[i] * sample + feed_one[i] * input_one + feed_two[i] * input_two + - back_one[i] * output_one - back_two[i] * output_two) + input_two, input_one = input_one, sample + output_two, output_one = output_one, result + output[i] = result + return numpy.array(output) + + +def tone(mix, start, freq, duration, wave_type="sine", freq_end=None, glide=None, + detune_cents=0.0, lowpass=None, gain=0.12, attack=0.005): + """Port of the mockup's `tone(at, f, dur, o)`.""" + times = _time_axis(duration) + if freq_end: + frequencies = exponential_ramp(times, freq, freq_end, glide or duration) + else: + frequencies = numpy.full_like(times, freq) + frequencies = frequencies * 2.0 ** (detune_cents / 1200.0) + signal = oscillator(wave_type, frequencies) + if lowpass: + signal = biquad(signal, "lowpass", numpy.full_like(times, lowpass), 1.0) + mix.add(start, signal * envelope(times, gain, attack, duration)) + + +def noise(mix, start, duration, filter_type="bandpass", freq=1000.0, freq_end=None, + quality=1.0, gain=0.25, attack=0.003): + """Port of the mockup's `noise(at, dur, o)`: filtered white noise.""" + times = _time_axis(duration) + white = mix.random.uniform(-1.0, 1.0, len(times)) + if freq_end: + cutoffs = exponential_ramp(times, freq, freq_end, duration) + else: + cutoffs = numpy.full_like(times, freq) + signal = biquad(white, filter_type, cutoffs, quality) + mix.add(start, signal * envelope(times, gain, attack, duration)) + + +def arpeggio(mix, start, notes, step, duration, **tone_options): + """Port of the mockup's `arp`: one tone per note, `step` seconds apart.""" + for i, freq in enumerate(notes): + tone(mix, start + i * step, freq, duration, **tone_options) diff --git a/ui/actions.gd b/ui/actions.gd index fcaa632..4a476af 100644 --- a/ui/actions.gd +++ b/ui/actions.gd @@ -180,6 +180,12 @@ static func background(m: Main, at: Vector2) -> Array: "tip": "Reusable results (Pages) to drag onto tables"}) list.append({"sep": ""}) list.append({"text": "Theme…", "do": func() -> void: m.add_child(ThemeDialog.new(m))}) + if m.sound: + var levels := [] + for level: Array in SoundBoard.LEVELS: + var mark := "✓ " if m.sound.level_name() == level[0] else " " + levels.append({"text": mark + str(level[0]), "do": m.sound.set_volume.bind(float(level[1]))}) + list.append({"text": "Sound", "sub": levels, "tip": "How loud the theme's sounds are"}) if m.mobile: # The phone layout has no room for these on the bar. var build := m.mode == Main.Mode.BUILD diff --git a/ui/board_backdrop.gd b/ui/board_backdrop.gd new file mode 100644 index 0000000..7dfa953 --- /dev/null +++ b/ui/board_backdrop.gd @@ -0,0 +1,81 @@ +class_name BoardBackdrop +extends RefCounted +## The spread's background, in screen space, back to front: the flat BG +## colour, the theme's background fill, its scene picture, then its tile +## picture (or the old dots / stars pattern when there is no tile). +## See docs/THEMES.md, "Background". + +var glow: Texture2D +var scene: Texture2D +## "bottom", "center" or "top": where the scene is pinned when it is cropped. +var scene_anchor := "center" +var tile: Texture2D +var tile_opacity := 1.0 +var tile_scale := 1.0 + + +func _init(theme_set: Dictionary) -> void: + glow = Style.fill_texture(Style.BG_FILL) + var scene_keys: Dictionary = theme_set.get("background_scene", {}) + scene = ThemeAssets.texture(theme_set, str(scene_keys.get("file", ""))) + scene_anchor = str(scene_keys.get("anchor", "center")) + var tile_keys: Dictionary = theme_set.get("background_tile", {}) + tile = ThemeAssets.texture(theme_set, str(tile_keys.get("file", ""))) + if tile: + tile_opacity = float(tile_keys.get("opacity", 1.0)) + tile_scale = maxf(0.1, float(tile_keys.get("scale", 1.0))) + else: + tile = pattern_texture(Style.PATTERN) + + +func draw(canvas: CanvasItem, rect: Rect2) -> void: + canvas.draw_rect(rect, Style.BG) + if glow: + canvas.draw_texture_rect(glow, rect, false) + if scene: + canvas.draw_texture_rect(scene, _cover(rect, scene.get_size()), false) + if tile: + canvas.draw_set_transform(Vector2.ZERO, 0.0, Vector2.ONE * tile_scale) + var tiled := Rect2(rect.position / tile_scale, rect.size / tile_scale) + canvas.draw_texture_rect(tile, tiled, true, Color(1, 1, 1, tile_opacity)) + canvas.draw_set_transform(Vector2.ZERO) + + +## The scene's rectangle scaled to cover `rect`, centred across and pinned +## top, centre or bottom. +func _cover(rect: Rect2, picture: Vector2) -> Rect2: + var k := maxf(rect.size.x / picture.x, rect.size.y / picture.y) + var drawn := picture * k + var x := rect.position.x + (rect.size.x - drawn.x) / 2.0 + var y := rect.position.y + (rect.size.y - drawn.y) / 2.0 + match scene_anchor: + "top": + y = rect.position.y + "bottom": + y = rect.end.y - drawn.y + return Rect2(Vector2(x, y), drawn) + + +## A small tile for the built-in pattern: "dots" (a faint grid) or "stars" +## (sparse four-point twinkles). Null for "none". +static func pattern_texture(kind: String) -> ImageTexture: + match kind: + "dots": + var img := Image.create(6, 6, false, Image.FORMAT_RGBA8) + img.fill(Color(0, 0, 0, 0)) + img.set_pixel(1, 1, Color(1, 1, 1, 0.06)) + return ImageTexture.create_from_image(img) + "stars": + var img := Image.create(96, 96, false, Image.FORMAT_RGBA8) + img.fill(Color(0, 0, 0, 0)) + var rng := RandomNumberGenerator.new() + rng.seed = 7 + for i in 9: + var p := Vector2i(rng.randi_range(2, 93), rng.randi_range(2, 93)) + var a := rng.randf_range(0.05, 0.13) + img.set_pixelv(p, Color(1, 1, 1, a * 1.6)) + if i % 3 == 0: + for d: Vector2i in [Vector2i(1, 0), Vector2i(-1, 0), Vector2i(0, 1), Vector2i(0, -1)]: + img.set_pixelv(p + d, Color(1, 1, 1, a * 0.7)) + return ImageTexture.create_from_image(img) + return null diff --git a/ui/board_backdrop.gd.uid b/ui/board_backdrop.gd.uid new file mode 100644 index 0000000..19d8eb6 --- /dev/null +++ b/ui/board_backdrop.gd.uid @@ -0,0 +1 @@ +uid://ckghfnaxbeo0i diff --git a/ui/board_view.gd b/ui/board_view.gd index 5bc7013..4727874 100644 --- a/ui/board_view.gd +++ b/ui/board_view.gd @@ -46,9 +46,8 @@ var _band_adds := false var _band_from := Vector2.ZERO var _band_to := Vector2.ZERO var _press_at := Vector2(-1, -1) -## The theme background gradient (null when flat) and tiled pattern (null for none). -var _glow: GradientTexture2D -var _dots: ImageTexture +## The background behind the cards (gradient, scene picture, tile). +var backdrop: BoardBackdrop func setup(p_main: Main) -> void: @@ -84,8 +83,7 @@ func setup(p_main: Main) -> void: minimap.setup(self) add_child(minimap) - _glow = Style.fill_texture(Style.BG_FILL) - _dots = pattern_texture(Style.PATTERN) + backdrop = BoardBackdrop.new(ThemeStore.current) resized.connect(queue_redraw) @@ -175,37 +173,12 @@ func _content_of(n: Control) -> CanvasItem: func _draw() -> void: - var r := Rect2(Vector2.ZERO, size) - draw_rect(r, Style.BG) - if _glow: - draw_texture_rect(_glow, r, false) - if _dots: - draw_texture_rect(_dots, r, true) + backdrop.draw(self, Rect2(Vector2.ZERO, size)) -## A small tile for the background pattern: "dots" (a faint grid) or "stars" -## (sparse four-point twinkles). Null for "none". +## The built-in dots / stars tile (BoardBackdrop.pattern_texture). static func pattern_texture(kind: String) -> ImageTexture: - match kind: - "dots": - var img := Image.create(6, 6, false, Image.FORMAT_RGBA8) - img.fill(Color(0, 0, 0, 0)) - img.set_pixel(1, 1, Color(1, 1, 1, 0.06)) - return ImageTexture.create_from_image(img) - "stars": - var img := Image.create(96, 96, false, Image.FORMAT_RGBA8) - img.fill(Color(0, 0, 0, 0)) - var rng := RandomNumberGenerator.new() - rng.seed = 7 - for i in 9: - var p := Vector2i(rng.randi_range(2, 93), rng.randi_range(2, 93)) - var a := rng.randf_range(0.05, 0.13) - img.set_pixelv(p, Color(1, 1, 1, a * 1.6)) - if i % 3 == 0: - for d: Vector2i in [Vector2i(1, 0), Vector2i(-1, 0), Vector2i(0, 1), Vector2i(0, -1)]: - img.set_pixelv(p + d, Color(1, 1, 1, a * 0.7)) - return ImageTexture.create_from_image(img) - return null + return BoardBackdrop.pattern_texture(kind) ## Drops a half-made selection box or pan (a second finger landed: TouchInput). diff --git a/ui/builtin_themes.gd b/ui/builtin_themes.gd index de84ffa..407414b 100644 --- a/ui/builtin_themes.gd +++ b/ui/builtin_themes.gd @@ -13,6 +13,7 @@ const TAROT := { "id": "tarot", "name": "Tarot", "builtin": true, "pattern": "stars", "logo": "fortune_teller", "card_frame": "ornate", "font_body": "atkinson", "font_display": "rokkitt", + "sounds": {"roll": "sounds/roll.ogg", "card_turn": "sounds/card_turn.ogg"}, # A jewel-tone spread cloth with a soft shine up and to the left. "background": {"kind": "radial", "colors": ["#4b1470", "#2c0744", "#1f0431"], "center": [0.32, 0.28]}, "panel": {"kind": "linear", "colors": ["#260539", "#16021f"], "angle": 90}, @@ -42,5 +43,19 @@ const FELT := { } +## The 2026-11 sets, one folder each (themes//: theme.gd plus its pictures and sounds). +const FOLDER_SETS := [ + preload("res://themes/vaporwave/theme.gd"), preload("res://themes/synthwave/theme.gd"), + preload("res://themes/autumn/theme.gd"), preload("res://themes/rustic/theme.gd"), + preload("res://themes/woodsy/theme.gd"), preload("res://themes/sky/theme.gd"), + preload("res://themes/aero/theme.gd"), preload("res://themes/gothic/theme.gd"), + preload("res://themes/terminal/theme.gd"), +] + + static func all() -> Array[Dictionary]: - return [TAROT, FELT] + var out: Array[Dictionary] = [TAROT] + for set_script: GDScript in FOLDER_SETS: + out.append(set_script.DATA) + out.append(FELT) + return out diff --git a/ui/card_frame.gd b/ui/card_frame.gd index cc8359f..3e68aea 100644 --- a/ui/card_frame.gd +++ b/ui/card_frame.gd @@ -1,47 +1,28 @@ class_name CardFrame extends Control -## The ornamental border around a card: four corner pieces (frame_corner.svg, -## mirrored) joined by beaded strips (frame_border.svg, tiled along each edge so -## it scales to any card size). A small shader recolours the art: its amber -## becomes the trim colour (the card's own colour, else the theme's TRIM) and -## its near-black strip becomes BG_DEEP. +## The ornamental border around a card, drawn from the active FrameSet: four +## corners (one picture, mirrored) joined by a repeated edge tile. GradientMap +## recolours the art: its middle greys become the trim colour (the card's own +## colour, else the theme's TRIM) and its black becomes BG_DEEP. A frame set's +## fixed-colour corner pieces are drawn on top by a child, uncoloured. ## ## It's the card's first child and draws around the card's whole rectangle, -## a little outside it (OUTSET), whatever box the container gives it. +## a little outside it (the set's outset), whatever box the container gives it. -const CORNER: Texture2D = preload("res://assets/ui/frame_corner.svg") -const BORDER: Texture2D = preload("res://assets/ui/frame_border.svg") -## Drawn size relative to the art's source units (corner art is 200 × 194). -const S := 0.28 -## How far the frame reaches outside the card. -const OUTSET := 9.0 -## Extra padding inside a framed card, so the corners clear its contents. -const PAD := 5.0 -# Source-unit geometry (see the comments in the SVGs). -const CORNER_W := 200.0 -const CORNER_H := 194.0 -const TOP_MID := 33.0 ## The top tab's centre line (y) in the corner art. -const SIDE_MID := 29.0 ## The side tab's centre line (x) in the corner art. -const TILE_W := 44.0 -const TILE_H := 50.0 -const TILE_MID := 22.0 - -const SHADER := "shader_type canvas_item; -uniform vec4 dark : source_color; -uniform vec4 trim : source_color; -void fragment() { - vec4 t = texture(TEXTURE, UV); - float l = dot(t.rgb, vec3(0.299, 0.587, 0.114)); - COLOR = vec4(mix(dark.rgb, trim.rgb, smoothstep(0.05, 0.30, l)), t.a * COLOR.a); -}" - -static var _shader: Shader -static var _materials: Dictionary = {} +var _fixed: Control func _init() -> void: mouse_filter = MOUSE_FILTER_IGNORE texture_filter = TEXTURE_FILTER_LINEAR_WITH_MIPMAPS + var fs := FrameSet.active + if fs and fs.corner_fixed: + _fixed = Control.new() + _fixed.mouse_filter = MOUSE_FILTER_IGNORE + _fixed.use_parent_material = false + _fixed.texture_filter = TEXTURE_FILTER_LINEAR_WITH_MIPMAPS + _fixed.draw.connect(_draw_fixed) + add_child(_fixed) set_trim(Color(0, 0, 0, 0)) @@ -49,63 +30,31 @@ func _init() -> void: func set_trim(c: Color) -> void: material = material_for(Style.TRIM if c.a == 0.0 else c) queue_redraw() + if _fixed: + _fixed.queue_redraw() -## Shared materials, one per trim colour. +## The active frame's material for a trim colour (beaded when none is active). static func material_for(trim: Color) -> ShaderMaterial: - var key := trim.to_html() + Style.BG_DEEP.to_html() - if not _materials.has(key): - if _shader == null: - _shader = Shader.new() - _shader.code = SHADER - var mat := ShaderMaterial.new() - mat.shader = _shader - mat.set_shader_parameter("dark", Style.BG_DEEP) - mat.set_shader_parameter("trim", trim) - _materials[key] = mat - return _materials[key] + return (FrameSet.active if FrameSet.active else FrameSet.beaded()).material_for(trim) + + +func _frame_rect() -> Rect2: + var host := get_parent() as Control + return Rect2(-position, host.size).grow(FrameSet.active.outset) func _draw() -> void: - var host := get_parent() as Control - if host == null: + var fs := FrameSet.active + if fs == null or get_parent() == null: return - # Work in the host card's coordinates, grown by OUTSET. - var r := Rect2(-position, host.size).grow(OUTSET) - var cw := CORNER_W * S - var ch := CORNER_H * S - var corner := Vector2(cw, ch) - # Corners: top-left as drawn, the others mirrored. - for flip: Vector2 in [Vector2(1, 1), Vector2(-1, 1), Vector2(1, -1), Vector2(-1, -1)]: - var at := Vector2(r.position.x if flip.x > 0 else r.end.x, r.position.y if flip.y > 0 else r.end.y) - draw_set_transform(at, 0.0, flip) - draw_texture_rect(CORNER, Rect2(Vector2.ZERO, corner), false) - # Sides: vertical strips between the corners' side tabs. - var side_len := r.size.y - 2.0 * ch - for flip: float in [1.0, -1.0]: - var x := (r.position.x if flip > 0 else r.end.x) + flip * SIDE_MID * S - _strip(Vector2(x, r.position.y + ch), side_len, 0.0) - # Top and bottom: the same strip turned on its side. - var top_len := r.size.x - 2.0 * cw - for flip: float in [1.0, -1.0]: - var y := (r.position.y if flip > 0 else r.end.y) + flip * TOP_MID * S - _strip(Vector2(r.position.x + cw, y), top_len, -PI / 2.0) - draw_set_transform(Vector2.ZERO) + var r := _frame_rect() + fs.draw_corners(self, r, fs.corner) + fs.draw_edges(self, r) -## Tiles the bead strip along `length` from `start` (the strip's centre line), -## downwards (angle 0) or rightwards (angle −π/2). Tiles stretch slightly so a -## whole number of beads fits. -func _strip(start: Vector2, length: float, angle: float) -> void: - if length <= 1.0: +func _draw_fixed() -> void: + var fs := FrameSet.active + if fs == null or fs.corner_fixed == null or get_parent() == null: return - var n := maxi(1, roundi(length / (TILE_H * S))) - var tile := length / n - var w := TILE_W * S - if angle == 0.0: - draw_set_transform(start - Vector2(TILE_MID * S, 0), 0.0, Vector2.ONE) - else: - # Rotating by −90° maps the tile's +y (its length) onto +x. - draw_set_transform(start + Vector2(0, TILE_MID * S), angle, Vector2.ONE) - for i in n: - draw_texture_rect(BORDER, Rect2(0, i * tile, w, tile), false) + fs.draw_corners(_fixed, _frame_rect(), fs.corner_fixed) diff --git a/ui/font_catalog.gd b/ui/font_catalog.gd index 0bf9b87..8635756 100644 --- a/ui/font_catalog.gd +++ b/ui/font_catalog.gd @@ -46,6 +46,27 @@ const FAMILIES := { "regular": "Orbitron-Variable.ttf", "variable": true}, "specialelite": {"name": "Special Elite (typewriter)", "group": "Themed", "roles": ["display"], "regular": "SpecialElite-Regular.ttf", "fake_bold": false}, + # Added for the 2026-11 theme sets (all OFL). + "nunito": {"name": "Nunito", "group": "Standard", "roles": ["body", "display"], + "regular": "Nunito-Variable.ttf", "italic": "Nunito-Italic-Variable.ttf", "variable": true}, + "quicksand": {"name": "Quicksand", "group": "Standard", "roles": ["body", "display"], + "regular": "Quicksand-Variable.ttf", "variable": true}, + "asap": {"name": "Asap", "group": "Standard", "roles": ["body", "display"], + "regular": "Asap-Variable.ttf", "italic": "Asap-Italic-Variable.ttf", "variable": true}, + "fraunces": {"name": "Fraunces", "group": "Standard", "roles": ["body", "display"], + "regular": "Fraunces-Variable.ttf", "variable": true}, + "zillaslab": {"name": "Zilla Slab", "group": "Standard", "roles": ["body", "display"], + "regular": "ZillaSlab-Regular.ttf", "bold": "ZillaSlab-Bold.ttf", "italic": "ZillaSlab-Italic.ttf"}, + "alegreya": {"name": "Alegreya", "group": "Standard", "roles": ["body", "display"], + "regular": "Alegreya-Variable.ttf", "italic": "Alegreya-Italic-Variable.ttf", "variable": true}, + "righteous": {"name": "Righteous (retro)", "group": "Themed", "roles": ["display"], + "regular": "Righteous-Regular.ttf", "fake_bold": false}, + "audiowide": {"name": "Audiowide (80s)", "group": "Themed", "roles": ["display"], + "regular": "Audiowide-Regular.ttf", "fake_bold": false}, + "unifraktur": {"name": "UnifrakturMaguntia (blackletter)", "group": "Themed", "roles": ["display"], + "regular": "UnifrakturMaguntia-Book.ttf", "fake_bold": false}, + "vt323": {"name": "VT323 (terminal)", "group": "Themed", "roles": ["body", "display"], + "regular": "VT323-Regular.ttf", "fake_bold": false}, } static var _files: Dictionary = {} diff --git a/ui/frame_set.gd b/ui/frame_set.gd new file mode 100644 index 0000000..b2f0004 --- /dev/null +++ b/ui/frame_set.gd @@ -0,0 +1,121 @@ +class_name FrameSet +extends RefCounted +## One card frame: a top-left corner picture (mirrored for the other corners) +## and an edge tile repeated along the sides, both greyscale and recoloured by +## GradientMap. The beaded frame is built in; a theme with card_frame "art" +## brings its own (docs/THEMES.md, "Frame set geometry"). + +## The frame for the theme in use, or null for plain cards. ThemeStore.apply sets it. +static var active: FrameSet = null + +var corner: Texture2D +## Drawn on each corner in its own colours (no recolouring). Optional. +var corner_fixed: Texture2D +var edge: Texture2D +## Source sizes, before `scale`. +var corner_size := Vector2(200, 194) +var edge_size := Vector2(44, 50) +## The band leaves the corner along x = side_mid (down) and y = top_mid (right). +var side_mid := 29.0 +var top_mid := 33.0 +## The band's centre line in the edge tile. +var edge_mid := 22.0 +var scale := 0.28 +## How far the frame reaches outside the card, and extra padding inside it. +var outset := 9.0 +var pad := 5.0 +## GradientMap stops. +var lo := 0.05 +var mid := 0.30 +var highlight := 0.0 + + +## The frame for a theme set: "ornate" = beaded, "art" = the theme's own. +static func for_theme(theme_set: Dictionary) -> FrameSet: + match str(theme_set.get("card_frame", "plain")): + "ornate": + return beaded() + "art": + return from_theme(theme_set) + return null + + +## The original beaded frame (assets/ui/frame_*.svg). +static func beaded() -> FrameSet: + var fs := FrameSet.new() + fs.corner = preload("res://assets/ui/frame_corner.svg") + fs.edge = preload("res://assets/ui/frame_border.svg") + return fs + + +## A theme's own frame from its "frame" keys; null when its pictures are missing. +static func from_theme(theme_set: Dictionary) -> FrameSet: + var keys: Dictionary = theme_set.get("frame", {}) + var fs := FrameSet.new() + fs.corner = ThemeAssets.texture(theme_set, str(keys.get("corner", "frame_corner.svg"))) + fs.edge = ThemeAssets.texture(theme_set, str(keys.get("edge", "frame_edge.svg"))) + if fs.corner == null or fs.edge == null: + return null + fs.corner_fixed = ThemeAssets.texture(theme_set, str(keys.get("corner_fixed", ""))) + fs.corner_size = ThemeAssets.vec2(keys.get("corner_size"), fs.corner.get_size()) + fs.edge_size = ThemeAssets.vec2(keys.get("edge_size"), fs.edge.get_size()) + fs.side_mid = float(keys.get("side_mid", fs.edge_size.x / 2.0)) + fs.top_mid = float(keys.get("top_mid", fs.edge_size.x / 2.0)) + fs.edge_mid = float(keys.get("edge_mid", fs.edge_size.x / 2.0)) + fs.scale = float(keys.get("scale", 0.25)) + fs.outset = float(keys.get("outset", 6.0)) + fs.pad = float(keys.get("pad", 4.0)) + fs.lo = float(keys.get("lo", 0.05)) + fs.mid = float(keys.get("mid", 0.5)) + fs.highlight = float(keys.get("highlight", 0.45)) + return fs + + +## The recolouring material for a trim colour (the dark part is BG_DEEP). +func material_for(trim: Color) -> ShaderMaterial: + return GradientMap.material(Style.BG_DEEP, trim, lo, mid, highlight) + + +func corner_drawn() -> Vector2: + return corner_size * scale + + +## Draws the four corners around `rect` (already grown by outset) on `canvas`. +func draw_corners(canvas: CanvasItem, rect: Rect2, art: Texture2D) -> void: + for flip: Vector2 in [Vector2(1, 1), Vector2(-1, 1), Vector2(1, -1), Vector2(-1, -1)]: + var at := Vector2(rect.position.x if flip.x > 0 else rect.end.x, rect.position.y if flip.y > 0 else rect.end.y) + canvas.draw_set_transform(at, 0.0, flip) + canvas.draw_texture_rect(art, Rect2(Vector2.ZERO, corner_drawn()), false) + canvas.draw_set_transform(Vector2.ZERO) + + +## Draws the four edges between the corners. +func draw_edges(canvas: CanvasItem, rect: Rect2) -> void: + var cd := corner_drawn() + var side_len := rect.size.y - 2.0 * cd.y + for flip: float in [1.0, -1.0]: + var x := (rect.position.x if flip > 0 else rect.end.x) + flip * side_mid * scale + _strip(canvas, Vector2(x, rect.position.y + cd.y), side_len, 0.0) + var top_len := rect.size.x - 2.0 * cd.x + for flip: float in [1.0, -1.0]: + var y := (rect.position.y if flip > 0 else rect.end.y) + flip * top_mid * scale + _strip(canvas, Vector2(rect.position.x + cd.x, y), top_len, -PI / 2.0) + canvas.draw_set_transform(Vector2.ZERO) + + +## Tiles the edge along `length` from `start` (the band's centre line), +## downwards (angle 0) or rightwards (angle −π/2). Tiles stretch slightly so a +## whole number fits. +func _strip(canvas: CanvasItem, start: Vector2, length: float, angle: float) -> void: + if length <= 1.0: + return + var count := maxi(1, roundi(length / (edge_size.y * scale))) + var tile := length / count + var width := edge_size.x * scale + if angle == 0.0: + canvas.draw_set_transform(start - Vector2(edge_mid * scale, 0), 0.0, Vector2.ONE) + else: + # Rotating by −90° maps the tile's +y (its length) onto +x. + canvas.draw_set_transform(start + Vector2(0, edge_mid * scale), angle, Vector2.ONE) + for i in count: + canvas.draw_texture_rect(edge, Rect2(0, i * tile, width, tile), false) diff --git a/ui/frame_set.gd.uid b/ui/frame_set.gd.uid new file mode 100644 index 0000000..92db7c4 --- /dev/null +++ b/ui/frame_set.gd.uid @@ -0,0 +1 @@ +uid://bvwccdp6ge6ui diff --git a/ui/gradient_map.gd b/ui/gradient_map.gd new file mode 100644 index 0000000..678e0c9 --- /dev/null +++ b/ui/gradient_map.gd @@ -0,0 +1,43 @@ +class_name GradientMap +extends RefCounted +## Recolours greyscale art by how light each pixel is (a "gradient map"): +## black → the dark colour, middle grey → the trim colour, white → the trim +## made lighter. Alpha is kept. Card frames and thread strips use it, so one +## drawing works in every theme and every card or thread colour. +## `lo`: lightness at or below which a pixel is fully dark. `mid`: lightness +## that gives exactly the trim colour. `highlight`: how much lighter white is. + +const SHADER_CODE := "shader_type canvas_item; +uniform vec4 dark : source_color; +uniform vec4 trim : source_color; +uniform vec4 light : source_color; +uniform float lo = 0.05; +uniform float mid = 0.5; +void fragment() { + vec4 art = texture(TEXTURE, UV); + float lightness = dot(art.rgb, vec3(0.299, 0.587, 0.114)); + vec3 shade = mix(dark.rgb, trim.rgb, smoothstep(lo, mid, lightness)); + vec3 shine = mix(trim.rgb, light.rgb, smoothstep(mid, 1.0, lightness)); + COLOR = vec4(lightness <= mid ? shade : shine, art.a * COLOR.a); +}" + +static var _shader: Shader +static var _materials: Dictionary = {} + + +## A shared material for these colours and stops. +static func material(dark: Color, trim: Color, lo: float = 0.05, mid: float = 0.5, highlight: float = 0.45) -> ShaderMaterial: + var key := "%s|%s|%s|%s|%s" % [dark.to_html(), trim.to_html(), lo, mid, highlight] + if not _materials.has(key): + if _shader == null: + _shader = Shader.new() + _shader.code = SHADER_CODE + var mat := ShaderMaterial.new() + mat.shader = _shader + mat.set_shader_parameter("dark", dark) + mat.set_shader_parameter("trim", trim) + mat.set_shader_parameter("light", trim.lightened(highlight)) + mat.set_shader_parameter("lo", lo) + mat.set_shader_parameter("mid", maxf(mid, lo + 0.01)) + _materials[key] = mat + return _materials[key] diff --git a/ui/gradient_map.gd.uid b/ui/gradient_map.gd.uid new file mode 100644 index 0000000..23fb18f --- /dev/null +++ b/ui/gradient_map.gd.uid @@ -0,0 +1 @@ +uid://5iuqsdryxrhx diff --git a/ui/group_mark.gd b/ui/group_mark.gd index 12fd30e..1453c3b 100644 --- a/ui/group_mark.gd +++ b/ui/group_mark.gd @@ -2,7 +2,7 @@ class_name GroupMark extends Control ## The top-right corner of a card in a group, in the group's colour (its own, ## else Style.GROUP), so members are easy to tell from cards that only lie -## inside the group's frame. On the beaded frame it recolours that corner +## inside the group's frame. On a framed card it recolours that corner ## piece; on a plain card it draws a bracket over the corner. ## ## Like CardFrame it draws around the host card's whole rectangle, whatever box @@ -34,7 +34,7 @@ func show_for(g: TableGroup) -> void: return _color = c visible = g != null - material = CardFrame.material_for(c) if g and Style.CARD_FRAME == "ornate" else null + material = FrameSet.active.material_for(c) if g and FrameSet.active else null queue_redraw() @@ -42,10 +42,11 @@ func _draw() -> void: var host := get_parent() as Control if host == null: return - if Style.CARD_FRAME == "ornate": - var r := Rect2(-position, host.size).grow(CardFrame.OUTSET) + var fs := FrameSet.active + if fs: + var r := Rect2(-position, host.size).grow(fs.outset) draw_set_transform(Vector2(r.end.x, r.position.y), 0.0, Vector2(-1, 1)) - draw_texture_rect(CardFrame.CORNER, Rect2(Vector2.ZERO, Vector2(CardFrame.CORNER_W, CardFrame.CORNER_H) * CardFrame.S), false) + draw_texture_rect(fs.corner, Rect2(Vector2.ZERO, fs.corner_drawn()), false) draw_set_transform(Vector2.ZERO) return # Plain: an L along the top and right edges, round where the card is. diff --git a/ui/main.gd b/ui/main.gd index f0e1d7d..394ec25 100644 --- a/ui/main.gd +++ b/ui/main.gd @@ -81,6 +81,8 @@ var local_state: MainState var nav: MainNavigation var undo_redo: MainHistory var inspecting: MainInspectorLink +## The theme's sounds (made in _ready, once the theme is applied). +var sound: SoundBoard var cli: MainCli var layout: MainLayout @@ -115,9 +117,14 @@ func _ready() -> void: if not _saving_enabled: data = ThemeStore.carry_board ThemeStore.carry_board = null - if ThemeStore.current.is_empty(): + var forced_theme := MainCli._arg_value(args, "--theme") + if forced_theme != "": + ThemeStore.apply(ThemeStore.find(forced_theme)) + elif ThemeStore.current.is_empty(): ThemeStore.apply(ThemeStore.find(str(state.get_setting(ThemeStore.SETTING, ThemeStore.DEFAULT_ID)) if state else ThemeStore.DEFAULT_ID)) theme = Style.app_theme() + sound = SoundBoard.new(self) + add_child(sound) if data == null: data = SampleBoard.create() data.id = "fantasy-loot" diff --git a/ui/main_rolling.gd b/ui/main_rolling.gd index fadedaa..43af0e3 100644 --- a/ui/main_rolling.gd +++ b/ui/main_rolling.gd @@ -45,6 +45,8 @@ func start_roll(tid: String, fast: bool = false) -> void: fast = fast or Input.is_key_pressed(KEY_SHIFT) _archive_current() _token += 1 + if m.sound: + m.sound.play("roll") # The roll's token lives in a holder, so a paused roll set aside can be # made current again (RollPauses.answer). var run := {"token": _token} @@ -278,12 +280,16 @@ func _reveal_steps(steps: Array) -> void: var card := m.card_for(tid) if card: card.reveal(last[tid]) + if card.table.card_mode and m.sound: + m.sound.play("card_turn") func _pulse(key: String, my: int) -> void: var length := m.board.pipes.path_length(key) if length <= 0.0 or my != _token: return + if m.sound: + m.sound.play("thread") m.board.pipes.pulse_key = key m.board.pipes.pulse_t = 0.0 _pulse_tween = m.create_tween().set_trans(Tween.TRANS_QUAD).set_ease(Tween.EASE_IN_OUT) diff --git a/ui/main_top_bar.gd b/ui/main_top_bar.gd index cec3f39..1380f92 100644 --- a/ui/main_top_bar.gd +++ b/ui/main_top_bar.gd @@ -34,13 +34,13 @@ func _init(p_main: Main) -> void: m = p_main -## The theme's logo (Style.LOGO): Morgan Fortuna, the fortune-teller mascot, the old tower -## mark, or none. +## The theme's logo (Style.LOGO): its mascot (Morgan Fortuna, the fortune +## teller, by default; recoloured by MascotArt), the old tower mark, or none. func _logo() -> Control: match Style.LOGO: - "fortune_teller": + "fortune_teller", "mascot": var tr := TextureRect.new() - tr.texture = preload("res://assets/art/fortune_teller_logo.svg") + tr.texture = MascotArt.texture(ThemeStore.current, 128) tr.expand_mode = TextureRect.EXPAND_IGNORE_SIZE tr.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED tr.texture_filter = CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS diff --git a/ui/mascot_art.gd b/ui/mascot_art.gd new file mode 100644 index 0000000..d116c58 --- /dev/null +++ b/ui/mascot_art.gd @@ -0,0 +1,85 @@ +class_name MascotArt +extends RefCounted +## The theme's mascot as a picture, recoloured by colour role. A mascot SVG +## names its parts by role (``); the theme's mascot_colors +## give each role a colour, and roles it leaves out keep the colour in the file. +## Morgan Fortuna is the default mascot. See docs/THEMES.md, "Mascot colour roles". + +## Morgan's roles, in the order the theme editor lists them. +const ROLES := ["outline", "cloth", "trim", "eye", "eye_glint", "inner_line"] +const ROLE_LABELS := {"outline": "Outline", "cloth": "Robe", "trim": "Trim", "eye": "Eye", + "eye_glint": "Eye shine", "inner_line": "Inner lines"} +## Imported with the Keep File importer, so its text is in the export. +const MORGAN := "res://assets/art/fortune_teller_logo.svg" + +static var _cache: Dictionary = {} + + +## The SVG file a theme's logo uses ("" for none or the tower mark). +static func source(theme_set: Dictionary) -> String: + match str(theme_set.get("logo", "none")): + "fortune_teller": + return MORGAN + "mascot": + return ThemeAssets.resolve(theme_set, str(theme_set.get("mascot", ""))) + return "" + + +## The mascot drawn `pixels` wide, or null when the theme has none. +static func texture(theme_set: Dictionary, pixels: int) -> Texture2D: + var path := source(theme_set) + if path == "": + return null + var colors: Dictionary = theme_set.get("mascot_colors", {}) + var key := "%s|%s|%d" % [path, JSON.stringify(colors), pixels] + if not _cache.has(key): + _cache[key] = _render(path, colors, pixels) + return _cache[key] + + +## The colours a file uses for each role it has (for the theme editor). +static func file_colors(path: String) -> Dictionary: + var out := {} + var svg := ThemeAssets.text(path) + var finder := RegEx.create_from_string("<(?:path|g)\\b[^>]*>") + for found in finder.search_all(svg): + var tag := found.get_string() + var id := _attribute(tag, "id") + if id in ROLES: + out[id] = _attribute(tag, "fill") + return out + + +## The SVG text with each role's fill replaced. +static func recolour(svg: String, colors: Dictionary) -> String: + var finder := RegEx.create_from_string("<(?:path|g)\\b[^>]*>") + var out := "" + var from := 0 + for found in finder.search_all(svg): + var tag := found.get_string() + var id := _attribute(tag, "id") + if not colors.has(id): + continue + var fill := RegEx.create_from_string("\\bfill=\"[^\"]*\"") + var new_tag := fill.sub(tag, "fill=\"%s\"" % str(colors[id])) if fill.search(tag) else tag.replace(" String: + var found := RegEx.create_from_string("\\b%s=\"([^\"]*)\"" % name).search(tag) + return found.get_string(1) if found else "" + + +static func _render(path: String, colors: Dictionary, pixels: int) -> Texture2D: + var svg := ThemeAssets.text(path) + if svg == "": + return null + var width_found := RegEx.create_from_string("]*\\bwidth=\"([\\d.]+)").search(svg) + var width := float(width_found.get_string(1)) if width_found else 2048.0 + var image := Image.new() + if image.load_svg_from_string(recolour(svg, colors), float(pixels) / width) != OK: + return null + image.generate_mipmaps() + return ImageTexture.create_from_image(image) diff --git a/ui/mascot_art.gd.uid b/ui/mascot_art.gd.uid new file mode 100644 index 0000000..9fcd6dd --- /dev/null +++ b/ui/mascot_art.gd.uid @@ -0,0 +1 @@ +uid://c3fbkashr002w diff --git a/ui/pipe_layer.gd b/ui/pipe_layer.gd index 37ef922..1ce7318 100644 --- a/ui/pipe_layer.gd +++ b/ui/pipe_layer.gd @@ -101,6 +101,8 @@ func _batch_item() -> RID: RenderingServer.canvas_item_set_draw_behind_parent(rid, true) _items.append(rid) _items_used += 1 + # A theme's thread strip sets a material on its item; reused items start clean. + RenderingServer.canvas_item_set_material(_items[_items_used - 1], RID()) return _items[_items_used - 1] @@ -127,6 +129,10 @@ func _batch_pipe(pts: PackedVector2Array, hovered: bool, own: String = "") -> vo if _far: _coarse(rid, pts, col, 10.0) return + if ThreadStrip.active: + ThreadStrip.active.add_to(rid, pts, col.lightened(0.35) if hovered else col, dark) + ThreadStrip.active.add_pins(_batch_item(), pts) + return _line(rid, pts, dark, 11.0) _line(rid, pts, col.lightened(0.35) if hovered else col, 6.0) RenderingServer.canvas_item_add_set_transform(rid, Transform2D(0.0, Vector2(0, -1.5))) @@ -337,6 +343,9 @@ func _draw_diamond(pts: PackedVector2Array, lit: bool, otherwise: bool) -> void: func _draw_pipe(pts: PackedVector2Array, lit: bool, hovered: bool) -> void: + if ThreadStrip.active and not _far: + _strip_pipe(pts, lit, hovered) + return if lit: draw_polyline(pts, Color(Style.ACCENT, 0.18), 20.0, true) draw_polyline(pts, Style.ACCENT_DARK if lit else Style.THREAD_DARK, 11.0, true) @@ -349,6 +358,16 @@ func _draw_pipe(pts: PackedVector2Array, lit: bool, hovered: bool) -> void: draw_set_transform(Vector2.ZERO) +## A lit or hovered pipe in the theme's thread picture. Its own canvas items +## (made after the unlit ones, so drawn over them) keep the material off labels. +func _strip_pipe(pts: PackedVector2Array, lit: bool, hovered: bool) -> void: + if lit: + _line(_batch_item(), pts, Color(Style.ACCENT, 0.18), ThreadStrip.active.width * 2.0) + var trim := Style.ACCENT if lit else (Style.THREAD.lightened(0.35) if hovered else Style.THREAD) + ThreadStrip.active.add_to(_batch_item(), pts, trim, Style.ACCENT_DARK if lit else Style.THREAD_DARK) + ThreadStrip.active.add_pins(_batch_item(), pts) + + ## An unlit pipe to or from a collapsed group: thinner and quieter, so the ## lit path of the last roll stands out on a big board. func _draw_bundle(pts: PackedVector2Array) -> void: diff --git a/ui/sound_board.gd b/ui/sound_board.gd new file mode 100644 index 0000000..382c5ba --- /dev/null +++ b/ui/sound_board.gd @@ -0,0 +1,95 @@ +class_name SoundBoard +extends Node +## Plays the theme's sounds: "roll" (a roll starts), "card_turn" (a Deck mode +## result is revealed), "thread" (a roll travels along a thread), "click" (a +## button is pressed) and "ambient" (loops while the theme is on). A theme +## without a sound for an event stays quiet. The volume is an app setting. + +const SETTING := "sound_volume" +## Volume levels for View ▾ → Sound: [label, linear volume]. +const LEVELS := [["Off", 0.0], ["Quiet", 0.35], ["Medium", 0.65], ["Loud", 1.0]] +const DEFAULT_VOLUME := 0.35 +const EVENTS := ["roll", "card_turn", "thread", "click", "ambient"] +## Short sounds can overlap this many at a time. +const VOICES := 4 + +var m: Main +var volume := DEFAULT_VOLUME +var _streams: Dictionary = {} +var _voices: Array[AudioStreamPlayer] = [] +var _next_voice := 0 +var _ambient: AudioStreamPlayer + + +func _init(p_main: Main) -> void: + m = p_main + name = "SoundBoard" + if m.state: + volume = clampf(float(m.state.get_setting(SETTING, DEFAULT_VOLUME)), 0.0, 1.0) + var sounds: Dictionary = ThemeStore.current.get("sounds", {}) + for event: String in EVENTS: + var stream := ThemeAssets.sound(ThemeStore.current, str(sounds.get(event, ""))) + if stream: + _streams[event] = stream + for i in VOICES: + var voice := AudioStreamPlayer.new() + _voices.append(voice) + add_child(voice) + _ambient = AudioStreamPlayer.new() + add_child(_ambient) + + +func _ready() -> void: + if _streams.has("click"): + get_tree().node_added.connect(_hook_button) + _start_ambient() + + +func has(event: String) -> bool: + return _streams.has(event) + + +func play(event: String) -> void: + if volume <= 0.0 or not _streams.has(event) or event == "ambient": + return + var voice := _voices[_next_voice] + _next_voice = (_next_voice + 1) % VOICES + voice.stream = _streams[event] + voice.volume_db = linear_to_db(volume) + voice.play() + + +func set_volume(level: float) -> void: + volume = clampf(level, 0.0, 1.0) + if m.state: + m.state.set_setting(SETTING, volume) + m.state.save() + _start_ambient() + + +## The label of the level closest to the current volume. +func level_name() -> String: + var best: Array = LEVELS[0] + for level: Array in LEVELS: + if absf(float(level[1]) - volume) < absf(float(best[1]) - volume): + best = level + return str(best[0]) + + +func _start_ambient() -> void: + if not _streams.has("ambient") or volume <= 0.0: + _ambient.stop() + return + var stream: AudioStream = _streams["ambient"] + if "loop" in stream: + stream.set("loop", true) + _ambient.stream = stream + _ambient.volume_db = linear_to_db(volume * 0.5) + if not _ambient.playing: + _ambient.play() + + +func _hook_button(node: Node) -> void: + var button := node as BaseButton + if button and not button.pressed.is_connected(play): + button.pressed.connect(play.bind("click")) diff --git a/ui/sound_board.gd.uid b/ui/sound_board.gd.uid new file mode 100644 index 0000000..3a04fcb --- /dev/null +++ b/ui/sound_board.gd.uid @@ -0,0 +1 @@ +uid://djxoh073jp8ft diff --git a/ui/table_card.gd b/ui/table_card.gd index bd0b3b5..c090701 100644 --- a/ui/table_card.gd +++ b/ui/table_card.gd @@ -94,7 +94,7 @@ func setup(p_main: Main, p_table: RollTable) -> void: list_ui = TableCardList.new(self) skin.build_styles() - if Style.CARD_FRAME == "ornate": + if FrameSet.active: frame = CardFrame.new() add_child(frame) group_mark = GroupMark.new() diff --git a/ui/table_card_skin.gd b/ui/table_card_skin.gd index ad9d319..932e7eb 100644 --- a/ui/table_card_skin.gd +++ b/ui/table_card_skin.gd @@ -102,8 +102,8 @@ func dim_drawn() -> void: func build_styles() -> void: card._style_normal = Style.box(Style.CARD, 10) - if Style.CARD_FRAME == "ornate": - card._style_normal.set_content_margin_all(CardFrame.PAD) + if FrameSet.active: + card._style_normal.set_content_margin_all(FrameSet.active.pad) card._style_normal.shadow_color = Color(0, 0, 0, 0.32) card._style_normal.shadow_size = 16 card._style_normal.shadow_offset = Vector2(0, 8) diff --git a/ui/theme_assets.gd b/ui/theme_assets.gd new file mode 100644 index 0000000..d0b571c --- /dev/null +++ b/ui/theme_assets.gd @@ -0,0 +1,120 @@ +class_name ThemeAssets +extends RefCounted +## Finds and loads the files a theme names: pictures, sounds and mascot SVGs. +## A path is relative to the theme's folder (built in: res://themes//; +## the user's own: user://themes//) or a full res:// or user:// path. +## Each file loads once; ThemeStore.apply clears the cache. See docs/THEMES.md. + +static var _cache: Dictionary = {} + + +## The folder a theme's relative paths start from. +static func folder(theme_set: Dictionary) -> String: + var id := str(theme_set.get("id", "")) + if bool(theme_set.get("builtin", false)): + return "res://themes/%s/" % id + return ThemeStore.DIR + id + "/" + + +## The full path for a file named in a theme ("" stays ""). +static func resolve(theme_set: Dictionary, file: String) -> String: + if file == "": + return "" + if file.begins_with("res://") or file.begins_with("user://"): + return file + return folder(theme_set) + file + + +static func clear_cache() -> void: + _cache.clear() + + +## A picture (SVG, PNG, JPG or WebP), or null when the file is missing. +static func texture(theme_set: Dictionary, file: String) -> Texture2D: + var path := resolve(theme_set, file) + if path == "": + return null + if not _cache.has(path): + _cache[path] = _load_texture(path) + return _cache[path] + + +## A sound (OGG, WAV or MP3), or null when the file is missing. +static func sound(theme_set: Dictionary, file: String) -> AudioStream: + var path := resolve(theme_set, file) + if path == "": + return null + if not _cache.has(path): + _cache[path] = _load_sound(path) + return _cache[path] + + +## A file's text ("" when missing). Built-in files read this way must use the +## Keep File importer so they are in the export. +static func text(path: String) -> String: + if path == "" or not FileAccess.file_exists(path): + return "" + return FileAccess.get_file_as_string(path) + + +## A size pair from a theme ([w, h]), or `fallback`. +static func vec2(value: Variant, fallback: Vector2) -> Vector2: + if value is Array and (value as Array).size() == 2: + return Vector2(float(value[0]), float(value[1])) + return fallback + + +static func _load_texture(path: String) -> Texture2D: + if path.begins_with("res://") and ResourceLoader.exists(path): + return load(path) as Texture2D + if not FileAccess.file_exists(path): + return null + var image := Image.new() + var err: int + if path.get_extension().to_lower() == "svg": + err = image.load_svg_from_string(FileAccess.get_file_as_string(path)) + else: + err = image.load(path) + if err != OK: + return null + image.generate_mipmaps() + return ImageTexture.create_from_image(image) + + +static func _load_sound(path: String) -> AudioStream: + if path.begins_with("res://") and ResourceLoader.exists(path): + return load(path) as AudioStream + if not FileAccess.file_exists(path): + return null + match path.get_extension().to_lower(): + "ogg": + return AudioStreamOggVorbis.load_from_file(path) + "wav": + return AudioStreamWAV.load_from_file(path) + "mp3": + return AudioStreamMP3.load_from_file(path) + return null + + +## Every key that names a file, as [key] or [key, subkey]. +const FILE_KEYS := [["mascot"], ["background_scene", "file"], ["background_tile", "file"], + ["frame", "corner"], ["frame", "corner_fixed"], ["frame", "edge"], ["thread", "strip"], ["thread", "pin"]] + + +## A copy of a theme whose relative file names are made full paths from +## `base`, so the files are still found after the copy moves (a user copy of a +## built-in theme keeps using the built-in's folder). +static func pin_paths(theme_set: Dictionary, base: String) -> Dictionary: + var out := theme_set.duplicate(true) + var full := func(file: String) -> String: + return file if file == "" or file.begins_with("res://") or file.begins_with("user://") else base + file + for key: Array in FILE_KEYS: + if key.size() == 1: + if out.has(key[0]): + out[key[0]] = full.call(str(out[key[0]])) + elif out.get(key[0]) is Dictionary and (out[key[0]] as Dictionary).has(key[1]): + out[key[0]][key[1]] = full.call(str(out[key[0]][key[1]])) + if out.get("sounds") is Dictionary: + for event: String in out["sounds"]: + out["sounds"][event] = full.call(str(out["sounds"][event])) + return out diff --git a/ui/theme_assets.gd.uid b/ui/theme_assets.gd.uid new file mode 100644 index 0000000..991344f --- /dev/null +++ b/ui/theme_assets.gd.uid @@ -0,0 +1 @@ +uid://c2is0s1fyhohj diff --git a/ui/theme_dialog.gd b/ui/theme_dialog.gd index 62ae50d..30c05fd 100644 --- a/ui/theme_dialog.gd +++ b/ui/theme_dialog.gd @@ -69,9 +69,15 @@ func _rebuild() -> void: var row := HBoxContainer.new() row.add_theme_constant_override("separation", 24) row.add_child(ModalCard.field("Background pattern", _choice(ThemeStore.PATTERNS, "pattern", "dots"))) - row.add_child(ModalCard.field("Card border", _choice(ThemeStore.CARD_FRAMES, "card_frame", "plain"))) - row.add_child(ModalCard.field("Logo", _choice(ThemeStore.LOGOS, "logo", "none"))) + row.add_child(ModalCard.field("Card border", _choice(_offered(ThemeStore.CARD_FRAMES, "art", _work.has("frame")), "card_frame", "plain"))) + var logo := _choice(_offered(ThemeStore.LOGOS, "mascot", _work.has("mascot")), "logo", "none") + logo.item_selected.connect(func(_i: int) -> void: _rebuild.call_deferred()) + row.add_child(ModalCard.field("Logo", logo)) _content.add_child(row) + if str(_work.get("logo", "")) in ["fortune_teller", "mascot"]: + _content.add_child(_mascot_colors()) + if not bool(_work.get("builtin", false)) and _work.has("id"): + _content.add_child(_folder_row()) _content.add_child(_font_row()) _content.add_child(ModalCard.section("Colours")) var grid := GridContainer.new() @@ -119,6 +125,50 @@ func _font_row() -> Control: return box +## Options without `id` unless the theme has the files for it. +func _offered(options: Array, id: String, has_files: bool) -> Array: + return options.filter(func(o: Array) -> bool: return o[0] != id or has_files) + + +## One swatch per mascot colour role; untouched roles keep the file's colour. +func _mascot_colors() -> Control: + var box := VBoxContainer.new() + box.add_child(ModalCard.section("Mascot colours")) + var grid := GridContainer.new() + grid.columns = 6 + grid.add_theme_constant_override("h_separation", 10) + box.add_child(grid) + var drawn := MascotArt.file_colors(MascotArt.source(_work)) + var mine: Dictionary = _work.get("mascot_colors", {}) + for role: String in MascotArt.ROLES: + if not drawn.has(role) and not mine.has(role): + continue + var start := Color.from_string(str(mine.get(role, drawn.get(role, "#000"))), Color.BLACK) + grid.add_child(FillEditor.swatch(start, func(c: Color) -> void: + var colors: Dictionary = _work.get_or_add("mascot_colors", {}) + colors[role] = "#" + c.to_html(false) + _dirty = true)) + grid.add_child(ModalCard.note(str(MascotArt.ROLE_LABELS.get(role, role)), Style.INK)) + return box + + +## Where this theme's pictures and sounds go, with a button that opens it. +func _folder_row() -> Control: + var row := HBoxContainer.new() + row.add_theme_constant_override("separation", 12) + var path := ThemeAssets.folder(_work) + var text := ModalCard.note("Pictures and sounds for this theme go in its folder (see the Theme Art Guide).", Style.MUTED) + text.size_flags_horizontal = SIZE_EXPAND_FILL + text.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART + row.add_child(text) + var open := ModalCard.make_button("Open folder") + open.pressed.connect(func() -> void: + DirAccess.make_dir_recursive_absolute(path) + OS.shell_open(ProjectSettings.globalize_path(path))) + row.add_child(open) + return row + + func _color(tok: String) -> Color: return Color.from_string(str((_work["colors"] as Dictionary).get(tok, "#000")), Color.BLACK) @@ -154,7 +204,8 @@ func _use() -> void: func _save_as_new() -> void: var start := str(_work.get("name", "Theme")) + " (mine)" add_child(ModalCard.ask_text("Save theme", "Name", start, "Save", func(name: String) -> void: - var t := _work.duplicate(true) + # A built-in's pictures and sounds stay in its folder: name them in full. + var t := ThemeAssets.pin_paths(_work, ThemeAssets.folder(_work)) if bool(_work.get("builtin", false)) else _work.duplicate(true) t["name"] = name t.erase("id") t.erase("builtin") diff --git a/ui/theme_store.gd b/ui/theme_store.gd index 2168fc3..0572cc8 100644 --- a/ui/theme_store.gd +++ b/ui/theme_store.gd @@ -1,7 +1,8 @@ class_name ThemeStore extends RefCounted ## Theme sets: the built-ins (BuiltinThemes) plus the user's own, saved as JSON -## in user://themes/. apply() writes a set into Style's tokens; the app then +## in user://themes/ (their pictures and sounds in user://themes//; see +## docs/THEMES.md). apply() writes a set into Style's tokens; the app then ## rebuilds its UI (Main.restyle) so every control picks the new colours up. ## Where user sets live (a test points this elsewhere). @@ -56,8 +57,8 @@ const TOKENS := [ ["VALUE_BORDER", "Value box border", false], ] const PATTERNS := [["none", "None"], ["dots", "Dots"], ["stars", "Stars"]] -const LOGOS := [["fortune_teller", "Morgan (fortune teller)"], ["tower", "Tower"], ["none", "None"]] -const CARD_FRAMES := [["ornate", "Beaded"], ["plain", "Plain"]] +const LOGOS := [["fortune_teller", "Morgan (fortune teller)"], ["mascot", "The theme's own mascot"], ["tower", "Tower"], ["none", "None"]] +const CARD_FRAMES := [["ornate", "Beaded"], ["art", "The theme's own frame"], ["plain", "Plain"]] ## The open spread, handed across the scene reload that applies a theme. static var carry_board: TowerBoard = null @@ -95,6 +96,9 @@ static func find(id: String) -> Dictionary: static func save(t: Dictionary) -> String: var out := t.duplicate(true) var id := str(out.get("id", "")) + # A copy of a built-in theme uses the built-in's files: name them in full. + if bool(t.get("builtin", false)) or _is_builtin(id): + out = ThemeAssets.pin_paths(out, ThemeAssets.folder(t)) if id == "" or bool(out.get("builtin", false)) or _is_builtin(id): id = _new_id(str(out.get("name", "My theme"))) out["id"] = id @@ -129,6 +133,9 @@ static func apply(t: Dictionary) -> void: Style.CARD_FRAME = str(t.get("card_frame", "plain")) Style.set_fonts(str(t.get("font_body", "")), str(t.get("font_display", ""))) current = t + ThemeAssets.clear_cache() + FrameSet.active = FrameSet.for_theme(t) + ThreadStrip.active = ThreadStrip.for_theme(t) ## Applies a set, remembers it, and rebuilds the app's UI around the open spread. diff --git a/ui/thread_strip.gd b/ui/thread_strip.gd new file mode 100644 index 0000000..3b03120 --- /dev/null +++ b/ui/thread_strip.gd @@ -0,0 +1,78 @@ +class_name ThreadStrip +extends RefCounted +## A theme's thread picture: one greyscale strip repeated along a thread's +## curve and recoloured by GradientMap (the thread's colour, else THREAD; lit +## threads use ACCENT), with an optional pin picture at both ends. +## See docs/THEMES.md, "Thread strip". + +## The strip for the theme in use, or null for the drawn threads. ThemeStore.apply sets it. +static var active: ThreadStrip = null + +var texture: Texture2D +var pin: Texture2D +## Source size of one tile [length, height]; drawn `width` px thick. +var strip_size := Vector2(64, 16) +var width := 10.0 +var pin_size := 14.0 +var lo := 0.05 +var mid := 0.5 +var highlight := 0.45 + + +static func for_theme(theme_set: Dictionary) -> ThreadStrip: + var keys: Dictionary = theme_set.get("thread", {}) + var tex := ThemeAssets.texture(theme_set, str(keys.get("strip", ""))) + if tex == null: + return null + var ts := ThreadStrip.new() + ts.texture = tex + ts.strip_size = ThemeAssets.vec2(keys.get("strip_size"), tex.get_size()) + ts.width = float(keys.get("width", 10.0)) + ts.pin = ThemeAssets.texture(theme_set, str(keys.get("pin", ""))) + ts.pin_size = float(keys.get("pin_size", 14.0)) + ts.lo = float(keys.get("lo", 0.05)) + ts.mid = float(keys.get("mid", 0.5)) + ts.highlight = float(keys.get("highlight", 0.45)) + return ts + + +## Draws the strip along `pts` into the canvas item `rid`, coloured `trim` +## over `dark`. `rid` gets the recolouring material, so draw nothing else in it. +func add_to(rid: RID, pts: PackedVector2Array, trim: Color, dark: Color) -> void: + var count := pts.size() + if count < 2: + return + var tile_length := strip_size.x * width / strip_size.y + var half := width / 2.0 + var points := PackedVector2Array() + var uvs := PackedVector2Array() + var colors := PackedColorArray() + var indices := PackedInt32Array() + var along := 0.0 + for i in count: + if i > 0: + along += pts[i].distance_to(pts[i - 1]) + var dir := (pts[mini(i + 1, count - 1)] - pts[maxi(i - 1, 0)]).normalized() + var normal := Vector2(-dir.y, dir.x) * half + points.append(pts[i] + normal) + points.append(pts[i] - normal) + uvs.append(Vector2(along / tile_length, 0.0)) + uvs.append(Vector2(along / tile_length, 1.0)) + colors.append(Color.WHITE) + colors.append(Color.WHITE) + for i in count - 1: + var a := i * 2 + indices.append_array([a, a + 1, a + 2, a + 1, a + 3, a + 2]) + RenderingServer.canvas_item_set_default_texture_repeat(rid, RenderingServer.CANVAS_ITEM_TEXTURE_REPEAT_ENABLED) + RenderingServer.canvas_item_set_default_texture_filter(rid, RenderingServer.CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS) + RenderingServer.canvas_item_set_material(rid, GradientMap.material(dark, trim, lo, mid, highlight).get_rid()) + RenderingServer.canvas_item_add_triangle_array(rid, indices, points, colors, uvs, PackedInt32Array(), PackedFloat32Array(), texture.get_rid()) + + +## Draws the end pins (uncoloured) into `rid`, if the theme has a pin. +func add_pins(rid: RID, pts: PackedVector2Array) -> void: + if pin == null or pts.size() < 2: + return + for at: Vector2 in [pts[0], pts[pts.size() - 1]]: + var box := Rect2(at - Vector2.ONE * pin_size / 2.0, Vector2.ONE * pin_size) + RenderingServer.canvas_item_add_texture_rect(rid, box, pin.get_rid()) diff --git a/ui/thread_strip.gd.uid b/ui/thread_strip.gd.uid new file mode 100644 index 0000000..8e2c8b5 --- /dev/null +++ b/ui/thread_strip.gd.uid @@ -0,0 +1 @@ +uid://ca5sxow76bt88