From d14f7fe796f815682f59ceb203fdfedea6c204bd Mon Sep 17 00:00:00 2001 From: luk3yx Date: Thu, 27 Feb 2025 18:26:47 +1300 Subject: [PATCH] Update documentation (again) --- .gitattributes | 1 - generate_docs.py => doc/generate_docs.py | 2 +- doc/hiding-elements.md | 2 +- doc/padding.md | 2 +- doc/tooltips.md | 4 ++++ 5 files changed, 7 insertions(+), 4 deletions(-) rename generate_docs.py => doc/generate_docs.py (99%) diff --git a/.gitattributes b/.gitattributes index 5b37b6e..4330127 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ .* export-ignore doc export-ignore -*.py export-ignore mkdocs.yml export-ignore diff --git a/generate_docs.py b/doc/generate_docs.py similarity index 99% rename from generate_docs.py rename to doc/generate_docs.py index d0fbe38..ab40f44 100644 --- a/generate_docs.py +++ b/doc/generate_docs.py @@ -169,7 +169,7 @@ if __name__ == '__main__': elements = fetch_elements() print('Done.') - with open('doc/elements.md', 'w') as f: + with open('elements.md', 'w') as f: f.write('# Auto-generated elements list\n\n') f.write('This is probably broken.') for element_name, variants in elements.items(): diff --git a/doc/hiding-elements.md b/doc/hiding-elements.md index c9e1a04..b99b05f 100644 --- a/doc/hiding-elements.md +++ b/doc/hiding-elements.md @@ -17,4 +17,4 @@ gui.VBox{ ## Alternatives If you don't want hidden elements to take up any space, see the documentation -for [gui.Nil](layout-elements.md#guinil). +for [`gui.Nil`](layout-elements.md#guinil). diff --git a/doc/padding.md b/doc/padding.md index b806a57..53034f5 100644 --- a/doc/padding.md +++ b/doc/padding.md @@ -1,4 +1,4 @@ -## Padding, spacing, and backgrounds +# Padding, spacing, and backgrounds All elements can have a `padding` value, which will add the specified amount of padding around the element. The "root" element of the form (the one returned by diff --git a/doc/tooltips.md b/doc/tooltips.md index 398ad6d..be33188 100644 --- a/doc/tooltips.md +++ b/doc/tooltips.md @@ -9,3 +9,7 @@ gui.Image{ tooltip = "Air", } ``` + +There is also a [`gui.Tooltip`](elements.md#guitooltip) element which lets you +change the background colour of the tooltip. As with `gui.Style`, it is +invisible and won't affect padding.