diff --git a/public/usage-examples/geometry/center_point-1-example.txt b/public/usage-examples/geometry/center_point-1-example.txt index 0e626a369..32f26d51b 100644 --- a/public/usage-examples/geometry/center_point-1-example.txt +++ b/public/usage-examples/geometry/center_point-1-example.txt @@ -1 +1,4 @@ -Glowing Circle \ No newline at end of file +Splashkit Function: CenterPoint + +Overview of example functionality: +This example demonstrates how to use the CenterPoint function to calculate the center of a circle. The program then uses this point to draw a glowing blue circle positioned in the middle of the window. \ No newline at end of file diff --git a/public/usage-examples/geometry/circle_radius-1-example.txt b/public/usage-examples/geometry/circle_radius-1-example.txt index ab3ded268..86bea96a4 100644 --- a/public/usage-examples/geometry/circle_radius-1-example.txt +++ b/public/usage-examples/geometry/circle_radius-1-example.txt @@ -1 +1,4 @@ -Using the Circle Radius \ No newline at end of file +Splashkit Function: CircleRadius + +Overview of example functionality: +This example demonstrates how to use the CircleRadius function to retrieve the radius of a circle. The program allows the user to enter a radius value and then draws a circle based on that input, displaying the radius on the screen. \ No newline at end of file diff --git a/public/usage-examples/geometry/circle_x-1-example.txt b/public/usage-examples/geometry/circle_x-1-example.txt index b1a8abc60..be8880a1f 100644 --- a/public/usage-examples/geometry/circle_x-1-example.txt +++ b/public/usage-examples/geometry/circle_x-1-example.txt @@ -1 +1,4 @@ -X-coordinate in middle of Circle \ No newline at end of file +Splashkit Function: CircleX + +Overview of example functionality: +This example demonstrates how to use the CircleX function to retrieve the X position of a circle. The program displays the circle on the screen and shows its horizontal position value. \ No newline at end of file diff --git a/public/usage-examples/geometry/circle_y-1-example.txt b/public/usage-examples/geometry/circle_y-1-example.txt index 319a6b09b..c7d5506f1 100644 --- a/public/usage-examples/geometry/circle_y-1-example.txt +++ b/public/usage-examples/geometry/circle_y-1-example.txt @@ -1 +1,4 @@ -Using the Circle Y-coordinate \ No newline at end of file +Splashkit Function: CircleY + +Overview of example functionality: +This example demonstrates how to use the CircleY function to retrieve the Y position of a circle. The program displays the circle on the screen and shows its vertical position value. \ No newline at end of file diff --git a/public/usage-examples/physics/0-README.md b/public/usage-examples/physics/0-README.md index 419295163..d6e228964 100644 --- a/public/usage-examples/physics/0-README.md +++ b/public/usage-examples/physics/0-README.md @@ -1,5 +1,12 @@ # Files for Usage Examples -To contribute a function usage example, please read the [CONTRIBUTING file](/public/usage-examples/CONTRIBUTING.mdx) +The physics usage examples have been organised into subfolders by example type: -Note: You can use 'CTRL + click' (or 'Command + click' on macOS) on the path above for quick access +- sprite-bitmap-collision +- sprite-collision +- sprite-point-collision +- sprite-rectangle-collision + +Each subfolder contains all related files for that example, including code, images, text descriptions, and resources. + +To contribute a function usage example, please read the [CONTRIBUTING file](/public/usage-examples/CONTRIBUTING.mdx). \ No newline at end of file diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-example-oop.cs b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example-oop.cs similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-example-oop.cs rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example-oop.cs diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-example-top-level.cs b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example-top-level.cs similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-example-top-level.cs rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example-top-level.cs diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-example.cpp b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.cpp similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-example.cpp rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.cpp diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-example.png b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.png similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-example.png rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.png diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-example.py b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.py similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-example.py rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.py diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-example.txt b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.txt similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-example.txt rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-example.txt diff --git a/public/usage-examples/physics/sprite_bitmap_collision-1-resources.zip b/public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-resources.zip similarity index 100% rename from public/usage-examples/physics/sprite_bitmap_collision-1-resources.zip rename to public/usage-examples/physics/sprite_bitmap_collision/sprite_bitmap_collision-1-resources.zip diff --git a/public/usage-examples/physics/sprite_collision-1-example-oop.cs b/public/usage-examples/physics/sprite_collision/sprite_collision-1-example-oop.cs similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-example-oop.cs rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-example-oop.cs diff --git a/public/usage-examples/physics/sprite_collision-1-example-top-level.cs b/public/usage-examples/physics/sprite_collision/sprite_collision-1-example-top-level.cs similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-example-top-level.cs rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-example-top-level.cs diff --git a/public/usage-examples/physics/sprite_collision-1-example.cpp b/public/usage-examples/physics/sprite_collision/sprite_collision-1-example.cpp similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-example.cpp rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-example.cpp diff --git a/public/usage-examples/physics/sprite_collision-1-example.png b/public/usage-examples/physics/sprite_collision/sprite_collision-1-example.png similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-example.png rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-example.png diff --git a/public/usage-examples/physics/sprite_collision-1-example.py b/public/usage-examples/physics/sprite_collision/sprite_collision-1-example.py similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-example.py rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-example.py diff --git a/public/usage-examples/physics/sprite_collision-1-example.txt b/public/usage-examples/physics/sprite_collision/sprite_collision-1-example.txt similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-example.txt rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-example.txt diff --git a/public/usage-examples/physics/sprite_collision-1-resources.zip b/public/usage-examples/physics/sprite_collision/sprite_collision-1-resources.zip similarity index 100% rename from public/usage-examples/physics/sprite_collision-1-resources.zip rename to public/usage-examples/physics/sprite_collision/sprite_collision-1-resources.zip diff --git a/public/usage-examples/physics/sprite_point_collision-1-example-oop.cs b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example-oop.cs similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-example-oop.cs rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example-oop.cs diff --git a/public/usage-examples/physics/sprite_point_collision-1-example-top-level.cs b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example-top-level.cs similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-example-top-level.cs rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example-top-level.cs diff --git a/public/usage-examples/physics/sprite_point_collision-1-example.cpp b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.cpp similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-example.cpp rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.cpp diff --git a/public/usage-examples/physics/sprite_point_collision-1-example.png b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.png similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-example.png rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.png diff --git a/public/usage-examples/physics/sprite_point_collision-1-example.py b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.py similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-example.py rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.py diff --git a/public/usage-examples/physics/sprite_point_collision-1-example.txt b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.txt similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-example.txt rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-example.txt diff --git a/public/usage-examples/physics/sprite_point_collision-1-resources.zip b/public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-resources.zip similarity index 100% rename from public/usage-examples/physics/sprite_point_collision-1-resources.zip rename to public/usage-examples/physics/sprite_point_collision/sprite_point_collision-1-resources.zip diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-example-oop.cs b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example-oop.cs similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-example-oop.cs rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example-oop.cs diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-example-top-level.cs b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example-top-level.cs similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-example-top-level.cs rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example-top-level.cs diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-example.cpp b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.cpp similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-example.cpp rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.cpp diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-example.png b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.png similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-example.png rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.png diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-example.py b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.py similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-example.py rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.py diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-example.txt b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.txt similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-example.txt rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-example.txt diff --git a/public/usage-examples/physics/sprite_rectangle_collision-1-resources.zip b/public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-resources.zip similarity index 100% rename from public/usage-examples/physics/sprite_rectangle_collision-1-resources.zip rename to public/usage-examples/physics/sprite_rectangle_collision/sprite_rectangle_collision-1-resources.zip diff --git a/scripts/api-pages-script.cjs b/scripts/api-pages-script.cjs old mode 100644 new mode 100755 index 3a625e378..f59bb49f4 --- a/scripts/api-pages-script.cjs +++ b/scripts/api-pages-script.cjs @@ -75,20 +75,32 @@ const sk_colors = ["alice_blue", "antique_white", "aqua", "aquamarine", "azure", // ------------------------------------------------------------------------------ // Get a list of all the files in a directory and it's subdirectories // ------------------------------------------------------------------------------ -function getAllFiles(dir, allFilesList = []) { - try { +function getAllFiles(dir, allFilesList = [], rootDir = dir) +{ + try + { const files = fs.readdirSync(dir); - files.map(file => { - const name = dir + '/' + file; - if (fs.statSync(name).isDirectory()) { // check if subdirectory is present - getAllFiles(name, allFilesList); // do recursive execution for subdirectory - } else { - allFilesList.push(file); // push filename into the array + + files.forEach(file => + { + const fullPath = path.join(dir, file); + + if (fs.statSync(fullPath).isDirectory()) + { + getAllFiles(fullPath, allFilesList, rootDir); } - }) - } catch (err) { + else + { + const relativePath = path.relative(rootDir, fullPath).replaceAll("\\", "/"); + allFilesList.push(relativePath); + } + }); + } + catch (err) + { console.error(kleur.yellow(`Warning: Unable to access directory ${dir}`), err); } + return allFilesList; } @@ -247,18 +259,19 @@ function getUsageExampleImports(categoryKey, functionKey) { let categoryPath = '/usage-examples/' + categoryKey; let categoryFilePath = './public/usage-examples/' + categoryKey; - const functionFiles = getAllFiles(categoryFilePath).filter(file => file.startsWith(functionKey)); + const functionFiles = getAllFiles(categoryFilePath).filter(file => path.basename(file).startsWith(functionKey)); if (functionFiles.length > 0) { const txtFiles = functionFiles.filter(file => file.endsWith('.txt')) if (txtFiles.length > 0) { - txtFiles.forEach((exampleTxtKey) => { + txtFiles.forEach((exampleTxtPath) => { + let exampleTxtKey = path.basename(exampleTxtPath); let exampleKey = exampleTxtKey.replaceAll(".txt", ""); let importTitle = exampleKey.replaceAll("-", "_"); languageOrder.forEach((lang) => { const languageFiles = functionFiles.filter(file => file.endsWith(languageFileExtensions[lang])); - let codeFilePath = categoryPath + "/" + exampleTxtKey.replaceAll(".txt", languageFileExtensions[lang]); + let codeFilePath = categoryPath + "/" + exampleTxtPath.replaceAll(".txt", languageFileExtensions[lang]); // import code if available if (languageFiles.length > 0) { @@ -335,12 +348,13 @@ function getUsageExampleContent(jsonData, categoryKey, groupName, functionKey) { let categoryFilePath = './public/usage-examples/' + categoryKey; let exampleKey = functionKey.replaceAll(".txt", ""); - const functionFiles = getAllFiles(categoryFilePath).filter(file => file.startsWith(exampleKey)); + const functionFiles = getAllFiles(categoryFilePath).filter(file => path.basename(file).startsWith(exampleKey)); if (functionFiles.length > 0) { const functionExampleFiles = functionFiles.filter(file => file.endsWith(".txt")); - functionExampleFiles.forEach((exampleTxtKey) => { + functionExampleFiles.forEach((exampleTxtPath) => { + const exampleTxtKey = path.basename(exampleTxtPath); // import code if available if (functionFiles.length > 0) { @@ -349,14 +363,14 @@ function getUsageExampleContent(jsonData, categoryKey, groupName, functionKey) { // Description let exampleNum = exampleKey.replace(/\D/g, ''); mdxData += `**Example ${exampleNum}**: `; - let exampleTxt = fs.readFileSync(categoryFilePath + "/" + exampleTxtKey); - mdxData += exampleTxt.toString(); + let exampleText = fs.readFileSync(path.join(categoryFilePath, exampleTxtPath)); + mdxData += exampleText.toString(); mdxData += "\n\n"; // Code tabs mdxData += "\n"; languageOrder.forEach((lang) => { - const languageFiles = functionFiles.filter(file => file.startsWith(exampleKey)).filter(file => file.endsWith(languageFileExtensions[lang])); + const languageFiles = functionFiles.filter(file => path.basename(file).startsWith(exampleKey)).filter(file => file.endsWith(languageFileExtensions[lang])); if (languageFiles.length > 0) { languageCodeAvailable[lang] = true; diff --git a/scripts/json-files/guides-groups.json b/scripts/json-files/guides-groups.json index 7fe7bccde..3f1385eaa 100644 --- a/scripts/json-files/guides-groups.json +++ b/scripts/json-files/guides-groups.json @@ -1,10 +1,10 @@ [ + "Camera", + "Graphics", "animations", "audio", "beyond-splashkit", - "camera", "color", - "graphics", "input", "interface", "json", diff --git a/scripts/json-files/usage-example-references.json b/scripts/json-files/usage-example-references.json index c41688ec6..f48a877d9 100644 --- a/scripts/json-files/usage-example-references.json +++ b/scripts/json-files/usage-example-references.json @@ -38,10 +38,35 @@ ] } ], + "color": [ + { + "funcKey": "saturation_of", + "title": "Draws a rectangle in a random colour. The colour's saturation value is displayed on screen", + "url": "/api/color/#saturation-of", + "functions": [ + "open_window", + "random_rgb_color", + "round", + "rectangle_from", + "clear_screen", + "color_white", + "fill_rectangle_record", + "draw_text_no_font_no_size", + "color_black", + "red_of", + "green_of", + "blue_of", + "alpha_of", + "refresh_screen", + "delay", + "close_all_windows" + ] + } + ], "geometry": [ { "funcKey": "center_point", - "title": "Glowing Circle", + "title": "Splashkit Function: CenterPoint", "url": "/api/geometry/#center-point", "functions": [ "open_window", @@ -59,7 +84,7 @@ }, { "funcKey": "circle_radius", - "title": "Using the Circle Radius", + "title": "Splashkit Function: CircleRadius", "url": "/api/geometry/#circle-radius", "functions": [ "open_window", @@ -98,7 +123,7 @@ }, { "funcKey": "circle_x", - "title": "X-coordinate in middle of Circle", + "title": "Splashkit Function: CircleX", "url": "/api/geometry/#circle-x", "functions": [ "circle", @@ -118,7 +143,7 @@ }, { "funcKey": "circle_y", - "title": "Using the Circle Y-coordinate", + "title": "Splashkit Function: CircleY", "url": "/api/geometry/#circle-y", "functions": [ "circle", @@ -524,6 +549,32 @@ "close_window" ] }, + { + "funcKey": "rectangle_around", + "title": "A perpetually moving circle which increases and decreases in size, surrounded by a rectangle shape", + "url": "/api/geometry/#rectangle-around", + "functions": [ + "open_window", + "create_timer", + "start_timer", + "quit_requested", + "point_at", + "cosine", + "sine", + "circle_at", + "timer_ticks", + "reset_timer", + "process_events", + "clear_screen_to_white", + "draw_rectangle_record", + "color_black", + "rectangle_around_circle", + "fill_circle_record", + "color_red", + "refresh_screen", + "close_all_windows" + ] + }, { "funcKey": "same_point", "title": "Point 2D Guessing Game", @@ -561,6 +612,24 @@ "close_all_windows" ] }, + { + "funcKey": "bitmap_center", + "title": "Draw a bitmap with a red dot at its center\r", + "url": "/api/graphics/#bitmap-center", + "functions": [ + "open_window", + "load_bitmap", + "clear_screen", + "color_white", + "draw_bitmap", + "fill_circle_record", + "color_red", + "circle_at", + "refresh_screen", + "delay", + "close_all_windows" + ] + }, { "funcKey": "clear_screen", "title": "Background Color", @@ -597,6 +666,26 @@ "SplashKit" ] }, + { + "funcKey": "draw_circle", + "title": "Circle Showcase", + "url": "/api/graphics/#draw-circle", + "functions": [ + "open_window", + "clear_screen", + "color_white", + "fill_circle", + "color_red", + "color_blue", + "color_green", + "color_orange", + "color_purple", + "random_rgb_color", + "refresh_screen", + "delay", + "close_all_windows" + ] + }, { "funcKey": "draw_circle_on_bitmap", "title": "Creating a Red Planet", @@ -1189,6 +1278,25 @@ "close_all_windows" ] }, + { + "funcKey": "get_font_style", + "title": "The program automatically cycles through font styles for a given font (also displaying example text), with the numerical value of each style being shown on screen\r", + "url": "/api/graphics/#get-font-style", + "functions": [ + "open_window", + "font_named", + "quit_requested", + "process_events", + "set_font_style", + "clear_screen_to_white", + "draw_text_no_font_no_size", + "color_black", + "draw_text", + "refresh_screen", + "delay", + "close_all_windows" + ] + }, { "funcKey": "has_font", "title": "Checking for Font using Variable", @@ -1300,93 +1408,6 @@ ] } ], - "physics": [ - { - "funcKey": "sprite_bitmap_collision", - "title": "Does SplashKit have bugs?", - "url": "/api/physics/#sprite-bitmap-collision", - "functions": [ - "open_window", - "load_bitmap", - "create_sprite", - "point_at", - "sprite_set_position", - "clear_screen", - "color_white", - "draw_sprite", - "draw_bitmap", - "write_line", - "refresh_screen", - "delay", - "close_all_windows" - ] - }, - { - "funcKey": "sprite_collision", - "title": "Colliding Sprites", - "url": "/api/physics/#sprite-collision", - "functions": [ - "open_window", - "load_bitmap", - "create_sprite", - "point_at", - "sprite_set_position", - "clear_screen", - "color_white", - "draw_sprite", - "write_line", - "refresh_screen", - "delay", - "close_all_windows" - ] - }, - { - "funcKey": "sprite_point_collision", - "title": "Determine Sprite Collisions with Points", - "url": "/api/physics/#sprite-point-collision", - "functions": [ - "open_window", - "load_bitmap", - "create_sprite", - "point_at", - "sprite_set_position", - "clear_screen", - "color_white", - "draw_sprite", - "fill_circle_record", - "color_black", - "circle_at", - "color_red", - "write_line", - "refresh_screen", - "delay", - "close_all_windows" - ] - }, - { - "funcKey": "sprite_rectangle_collision", - "title": "Detect Sprite Collisions with Rectangles", - "url": "/api/physics/#sprite-rectangle-collision", - "functions": [ - "open_window", - "load_bitmap", - "create_sprite", - "point_at", - "sprite_set_position", - "rectangle_from", - "clear_screen", - "color_white", - "draw_sprite", - "fill_rectangle_record", - "color_black", - "color_red", - "write_line", - "refresh_screen", - "delay", - "close_all_windows" - ] - } - ], "raspberry": [ { "funcKey": "raspi_i2c_write_data", @@ -1790,5 +1811,30 @@ "write_line" ] } + ], + "windows": [ + { + "funcKey": "close_window", + "title": "Starts a countdown to close the window at the push of a button.", + "url": "/api/windows/#close-window", + "functions": [ + "open_window", + "create_timer", + "quit_requested", + "process_events", + "clear_window", + "color_white", + "button_at_position", + "rectangle_from", + "start_timer", + "draw_text_font_as_string", + "color_black", + "timer_ticks", + "reset_timer", + "draw_interface", + "refresh_window", + "close_all_windows" + ] + } ] } \ No newline at end of file