Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default defineConfig({
collapsed: false,
items: [
{ label: "Overview", link: "guides/" },
{
{
label: "Getting Started",
collapsed: false,
items: [
Expand All @@ -121,7 +121,7 @@ export default defineConfig({
{ label: "Loading Resources with Bundles", link: "guides/resources/loading-resources-with-bundles" },
{ label: "Getting Started With Audio", link: "guides/audio/getting-started-with-audio" },
{ label: "Using Animations", link: "guides/animations/using-animations" },
{ label: "SplashKit Camera", link: "guides/input/using-splashkit-camera" },
{ label: "SplashKit Camera", link: "guides/camera/using-splashkit-camera" },
{ label: "Useful Utilities", link: "guides/utilities/useful-utilities" },
{ label: "Using JSON in SplashKit", link: "guides/json/getting-started-with-json" },
{ label: "SplashKit Colors", link: "guides/color/splashkit-colors" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ if button_at_position("Write To Terminal!", rectangle_from(300, 260, 200, 24)):
</TabItem>
</Tabs>

Note how rather than _creating_ the button, and then checking if it's been clicked seperately, we've used a _single_ call to [Button](/api/interface/#button), that both shows the button _and_ returns whether its been clicked.
Note how rather than _creating_ the button, and then checking if it's been clicked separately, we've used a _single_ call to [Button](/api/interface/#button), that both shows the button _and_ returns whether its been clicked.

Now when we click on the button, our text gets printed in the terminal! You can of course put whatever code you want - for instance, the button could start your game, add an item to your stock program, or pop up extra info.
![Clicking the button - on click, the text 'The button was clicked!' is printed in the terminal](/gifs/guides/interface/clicking_button_write_terminal.gif)
Expand Down