From d8a21f10f62e64a4f6a57eace0afd4ce733e1a05 Mon Sep 17 00:00:00 2001 From: ske Date: Sat, 6 Jul 2024 09:54:48 -0300 Subject: [PATCH] Fix hello-tophat.md --- src/hello-tophat.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hello-tophat.md b/src/hello-tophat.md index 826b67d..5f19218 100644 --- a/src/hello-tophat.md +++ b/src/hello-tophat.md @@ -12,10 +12,10 @@ import ( ) fn init*() { - window.setup("Hello tophat!", 600, 600) + window::setup("Hello tophat!", 600, 600) - window.onFrame.register({ - canvas.drawText("Hello tophat!", { 1, 1 }, th.black, 2) + window::onFrame.register({ + canvas::drawText("Hello tophat!", { 1, 1 }, th.black, 2) }) } ``` @@ -44,21 +44,21 @@ aren't on the file system. All modules have their documentation available [here](api/README.md). ```umka -fn main() { +fn init*() { ``` This declares the `init` function and exports it. This function your game's entry point. ```umka - window.setup("Hello tophat!", 600, 600) + window::setup("Hello tophat!", 600, 600) ``` This function call creates a window. It will set the title to "Hello tophat!" and the dimensions to 600x600. ```umka - window.onFrame.register({ + window::onFrame.register({ ``` This registers a callback to the `onFrame` signal. What this means is that the @@ -66,7 +66,7 @@ code in the brackets will be called on every frame. This is you game's main loop. ```umka - canvas.drawText("Hello tophat!", { 1, 1 }, th.black, 2) + canvas::drawText("Hello tophat!", { 1, 1 }, th.black, 2) ``` This function draws the text `Hello tophat!` at position `1, 1`, with black