132646f6c3
ci / verify (push) Successful in 48s
Crusenho's Complete UI Essential Pack is CC BY 4.0 -- redistributable and
commercial-friendly, confirmed from the License.txt the pack itself ships --
so unlike the two bdragon packs a subset is committed: twelve PNGs, 48 KB,
under assets/sprites/ui/. Only what is used, because each committed PNG costs
a Godot .import sidecar and a directory nothing references is one nobody
prunes.
UiTheme builds a Theme in code from it -- button states, panels, line edits --
and every screen roots itself through UiTheme.themed_root(). The HUD's bars are
the pack's frame with a tinted fill, drawn as three horizontal slices because
Godot's nine-patch lives on nodes and the HUD is drawn rather than built from
controls. Inventory slots use the pack's slot art at exactly twice the source
size; a non-integer scale on a 1px border reads as a wobble along every edge.
The credits screen is the other half of the request and it is a licence
obligation, not a nicety: two packs are now CC BY, which asks for attribution
"in any reasonable manner", and a markdown file in a source repo is not
reasonable for someone who downloaded a build. Settings -> Credits shows every
source with its terms and a link to the licence text. test_credits.gd asserts
CREDITS.md and docs/ASSETS.md name every entry, so the three cannot drift.
Two things found by actually looking at the screen, which is the point:
- The FIRST version of this styled nothing. A Control inherits its theme from
Control ANCESTORS only, and the chain breaks at the first plain Node or
CanvasLayer -- which is every screen here. get_window().theme set the
property, changed nothing, and read as correct. check.sh, 458 tests and a
clean smoke run all passed with the entire interface unstyled. The theme
test now instantiates every screen and asks what its buttons resolve.
- The settings screen showed Fire bound to the right mouse button, because
the test suite was writing the player's real user://settings.cfg --
rebinding calls save() and nothing had redirected the path. Settings.path
is now redirectable, the fixture points it at a scratch file, and a test
asserts the default is still the player's own.
tools/screenshot.tscn is what found both. It boots the client windowed and
saves the menus, the HUD, settings and credits. Manual, needs a display, and
the only thing in the project that can tell you the interface rendered.
check.sh clean, 460 tests, SMOKE PASS, all four diagnostics green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
77 lines
2.5 KiB
GDScript
77 lines
2.5 KiB
GDScript
class_name Credits
|
|
extends RefCounted
|
|
## Every third-party asset the game ships, and the terms it ships under.
|
|
##
|
|
## This is not decoration. Two of these packs are CC BY 4.0, which requires
|
|
## attribution "in any reasonable manner" -- a file in the repository is not
|
|
## reasonable for a player who downloaded a build, so the game has to say so
|
|
## itself. See [CreditsScreen].
|
|
##
|
|
## `tests/unit/test_credits.gd` asserts every entry here also appears in
|
|
## CREDITS.md, so the two cannot drift apart.
|
|
|
|
## Each entry: what it is, who made it, the licence, a link, and what it is
|
|
## used for. `required` marks the ones the licence obliges us to show.
|
|
const SOURCES: Array[Dictionary] = [
|
|
{
|
|
"name": "16x16 DungeonTileset II",
|
|
"author": "0x72 (Robert Norenberg)",
|
|
"licence": "CC0 1.0 (public domain)",
|
|
"url": "https://0x72.itch.io/dungeontileset-ii",
|
|
"used_for": "Terrain, characters, bosses, item icons",
|
|
"required": false,
|
|
},
|
|
{
|
|
"name": "Complete UI Essential Pack",
|
|
"author": "Crusenho Agus Hennihuno",
|
|
"licence": "CC BY 4.0",
|
|
"url": "https://crusenho.itch.io/complete-ui-essential-pack",
|
|
"used_for": "Buttons, panels, bars, inventory slots",
|
|
"required": true,
|
|
},
|
|
{
|
|
"name": "Pixel Combat SFX",
|
|
"author": "Helton Yan",
|
|
"licence": "CC BY 4.0",
|
|
"url": "https://heltonyan.itch.io/pixelcombat",
|
|
"used_for": "All sound effects",
|
|
"required": true,
|
|
},
|
|
{
|
|
"name": "Fire Pixel Bullet 16x16",
|
|
"author": "bdragon1727",
|
|
"licence": "Custom - not redistributable",
|
|
"url": "https://bdragon1727.itch.io/fire-pixel-bullet-16x16",
|
|
"used_for": "Bullet sprites (local builds only)",
|
|
"required": false,
|
|
},
|
|
{
|
|
"name": "750+ Effect and FX Pixel All",
|
|
"author": "bdragon1727",
|
|
"licence": "Custom - not redistributable",
|
|
"url": "https://bdragon1727.itch.io/750-effect-and-fx-pixel-all",
|
|
"used_for": "Impact effects (local builds only)",
|
|
"required": false,
|
|
},
|
|
]
|
|
|
|
## CC BY asks for a link to the licence itself, not only to the work.
|
|
const LICENCE_LINKS := {
|
|
"CC BY 4.0": "https://creativecommons.org/licenses/by/4.0/",
|
|
"CC0 1.0 (public domain)": "https://creativecommons.org/publicdomain/zero/1.0/",
|
|
}
|
|
|
|
|
|
## The packs whose licence actually obliges us to credit them. Everything else
|
|
## in [constant SOURCES] is there because the work deserves it.
|
|
static func required() -> Array[Dictionary]:
|
|
var out: Array[Dictionary] = []
|
|
for entry in SOURCES:
|
|
if bool(entry["required"]):
|
|
out.append(entry)
|
|
return out
|
|
|
|
|
|
static func licence_url(licence: String) -> String:
|
|
return String(LICENCE_LINKS.get(licence, ""))
|