Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfranke committed Dec 12, 2024
1 parent 0646c36 commit a435f8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ Adds a preset interface that shows an interactive list of all licenses. Custom l

### Usage

Use the `GodotLicensing` singleton to add custom copyrights and licenses. \
Use the `GodotLicensing` singleton to add custom copyrights and licenses (see below). \
Use the `LicensingInterface` node to show all copyrights and licenses to users.

**Note**: It is recommended to set `display/window/stretch` such that licenses
show on all platforms. For example, set `mode` to `canvas_items` and `aspect` to `stretch`.
**Note**: It is recommended to set `display/window/stretch` such that the full interface shows on all resolutions. For example, set `mode` to `canvas_items` and `aspect` to `stretch`.

**Note**: `LicensingInterface` has a minimum size of `256px` × `256px`.

Expand Down
20 changes: 8 additions & 12 deletions addons/godot_licensing/godot_licensing.gd
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
## [url=https://github.com/nathanfranke/godot-licensing]GodotLicensing[/url] by
## nathanfranke
## [url=https://github.com/nathanfranke/godot-licensing]GodotLicensing[/url] by nathanfranke
##
## Use the [GodotLicensing] singleton to add custom copyrights and licenses.[br]
## Use the [LicensingInterface] node to show all copyrights and licenses to
## users.
## Use the [GodotLicensing] singleton to add custom copyrights and licenses (see below).
## [br]
##
## Use the [LicensingInterface] node to show all copyrights and licenses to users.
## [br][br]
##
## [b]Note[/b]: It is recommended to set [code]display/window/stretch[/code]
## such that licenses show on all platforms. For example, set [code]mode[/code]
## to [code]canvas_items[/code] and [code]aspect[/code] to [code]stretch[/code].
## [b]Note[/b]: It is recommended to set [code]display/window/stretch[/code] such that the full interface shows on all resolutions. For example, set [code]mode[/code] to [code]canvas_items[/code] and [code]aspect[/code] to [code]stretch[/code].
## [br][br]
##
## [b]Note[/b]: [LicensingInterface] has a minimum size of
## [code]256px[/code] × [code]256px[/code].
## [b]Note[/b]: [LicensingInterface] has a minimum size of [code]256px[/code] × [code]256px[/code].
## [br][br]
##
## Example copyright with license:
Expand Down Expand Up @@ -55,8 +52,7 @@ var _custom_copyrights := []
var _custom_licenses := {}


## Adds a copyright. [code]license[/code] is optional. See [GodotLicensing] for
## usage.
## Adds a copyright. [code]license[/code] is optional. See [GodotLicensing] for usage.
func add_copyright(copyright: Dictionary) -> void:
assert(copyright.has(&"name"), "Expected key: 'name'.")
assert(copyright.get(&"parts") is Array, "Expected array key: 'parts'.")
Expand Down

0 comments on commit a435f8f

Please sign in to comment.