From ef49315fe298b545a93c261f6397bb40ee9be4fe Mon Sep 17 00:00:00 2001 From: ZGT23 <3458926299@qq.com> Date: Fri, 8 May 2026 17:48:39 +1000 Subject: [PATCH 1/2] Add mouse_movement usage example --- .../input/mouse_movement-1-example-oop.cs | 40 +++ .../mouse_movement-1-example-top-level.cs | 32 +++ .../input/mouse_movement-1-example.cpp | 37 +++ .../input/mouse_movement-1-example.png | Bin 0 -> 18842 bytes .../input/mouse_movement-1-example.py | 29 +++ .../input/mouse_movement-1-example.txt | 1 + .../json-files/usage-example-references.json | 244 ++++++++++++++---- 7 files changed, 338 insertions(+), 45 deletions(-) create mode 100644 public/usage-examples/input/mouse_movement-1-example-oop.cs create mode 100644 public/usage-examples/input/mouse_movement-1-example-top-level.cs create mode 100644 public/usage-examples/input/mouse_movement-1-example.cpp create mode 100644 public/usage-examples/input/mouse_movement-1-example.png create mode 100644 public/usage-examples/input/mouse_movement-1-example.py create mode 100644 public/usage-examples/input/mouse_movement-1-example.txt diff --git a/public/usage-examples/input/mouse_movement-1-example-oop.cs b/public/usage-examples/input/mouse_movement-1-example-oop.cs new file mode 100644 index 000000000..5ee4961c5 --- /dev/null +++ b/public/usage-examples/input/mouse_movement-1-example-oop.cs @@ -0,0 +1,40 @@ +using SplashKitSDK; + +namespace MouseMovementExample +{ + public static class Program + { + public static void Main() + { + SplashKit.OpenWindow("Mouse Movement Display", 800, 600); + + double circleX = 400; + double circleY = 300; + + while (!SplashKit.QuitRequested()) + { + SplashKit.ProcessEvents(); + + Vector2D movement = SplashKit.MouseMovement(); + + circleX += movement.X; + circleY += movement.Y; + + SplashKit.ClearScreen(Color.White); + + SplashKit.DrawText("Move the mouse to see mouse_movement() values.", Color.Black, 20, 20); + SplashKit.DrawText("Movement X: " + movement.X, Color.Black, 20, 60); + SplashKit.DrawText("Movement Y: " + movement.Y, Color.Black, 20, 100); + + SplashKit.FillCircle(Color.Blue, circleX, circleY, 15); + SplashKit.DrawCircle(Color.Black, circleX, circleY, 15); + + SplashKit.DrawLine(Color.Red, circleX, circleY, circleX + movement.X * 5, circleY + movement.Y * 5); + + SplashKit.RefreshScreen(60); + } + + SplashKit.CloseAllWindows(); + } + } +} \ No newline at end of file diff --git a/public/usage-examples/input/mouse_movement-1-example-top-level.cs b/public/usage-examples/input/mouse_movement-1-example-top-level.cs new file mode 100644 index 000000000..d43df14e6 --- /dev/null +++ b/public/usage-examples/input/mouse_movement-1-example-top-level.cs @@ -0,0 +1,32 @@ +using SplashKitSDK; +using static SplashKitSDK.SplashKit; + +OpenWindow("Mouse Movement Display", 800, 600); + +double circleX = 400; +double circleY = 300; + +while (!QuitRequested()) +{ + ProcessEvents(); + + Vector2D movement = MouseMovement(); + + circleX += movement.X; + circleY += movement.Y; + + ClearScreen(ColorWhite()); + + DrawText("Move the mouse to see mouse_movement() values.", ColorBlack(), 20, 20); + DrawText("Movement X: " + movement.X, ColorBlack(), 20, 60); + DrawText("Movement Y: " + movement.Y, ColorBlack(), 20, 100); + + FillCircle(ColorBlue(), circleX, circleY, 15); + DrawCircle(ColorBlack(), circleX, circleY, 15); + + DrawLine(ColorRed(), circleX, circleY, circleX + movement.X * 5, circleY + movement.Y * 5); + + RefreshScreen(60); +} + +CloseAllWindows(); \ No newline at end of file diff --git a/public/usage-examples/input/mouse_movement-1-example.cpp b/public/usage-examples/input/mouse_movement-1-example.cpp new file mode 100644 index 000000000..ad83a2d3b --- /dev/null +++ b/public/usage-examples/input/mouse_movement-1-example.cpp @@ -0,0 +1,37 @@ +#include "splashkit.h" +#include + +int main() +{ + open_window("Mouse Movement Display", 800, 600); + + double circle_x = 400; + double circle_y = 300; + + while (!quit_requested()) + { + process_events(); + + vector_2d movement = mouse_movement(); + + circle_x += movement.x; + circle_y += movement.y; + + clear_screen(COLOR_WHITE); + + draw_text("Move the mouse to see mouse_movement() values.", COLOR_BLACK, 20, 20); + draw_text(std::string("Movement X: ") + std::to_string(movement.x), COLOR_BLACK, 20, 60); + draw_text(std::string("Movement Y: ") + std::to_string(movement.y), COLOR_BLACK, 20, 100); + + fill_circle(COLOR_BLUE, circle_x, circle_y, 15); + draw_circle(COLOR_BLACK, circle_x, circle_y, 15); + + draw_line(COLOR_RED, circle_x, circle_y, circle_x + movement.x * 5, circle_y + movement.y * 5); + + refresh_screen(60); + } + + close_all_windows(); + + return 0; +} \ No newline at end of file diff --git a/public/usage-examples/input/mouse_movement-1-example.png b/public/usage-examples/input/mouse_movement-1-example.png new file mode 100644 index 0000000000000000000000000000000000000000..019f415127f34a35c0545cbf3e09eadd47dec522 GIT binary patch literal 18842 zcmeHv2~?9=wr;d6hZ01@0cCP%MF9atK*l(Llp>-sPYLrph|CEjmIDX~SfvsL0TpFP z0+BHg2tg51FhqnTKp+Unlo*g92}uZfe=P03eP6%3>UFs@D(_UD0=}#Y zIBs(s1ggkdzvT5J@O|B-pIxFrpbah3zbo1zN_;_}(>kXuj@!pWID>Nc_xdHN3-R#P z{h+JI{8x6#JDVJT=ohdm@`rURe44SRQj^#5A#Y!otUDZK*jyD=@E1du6+V^zdhj3V zD|FJY*AXZuliMyS=wLSvzPNwiW7Wit+Zi&eVsBmFzVhl^K=b1W3EEa)KP8GlnIcWl z#R5}`HMP{vVWJF=eqcU?7(ze3*xs9?AJQ&wrF;SL$tp`nGAk$PUfc}=y$QhT%g&~U z$C5{b@S8K`u8frqAzPS|4wCb^SZXLxRMK^GvlbY6X*r@#1$aW_Ew#?7?+=N+PWbi&qFand@1U%0vn3F zc+brep&vaE*_L5>pKDE8TAu5ekx*$G3Qc_C%su#YQv)}6x{-HXq1`J*g$9$__taY0q*I(xv)CAY&MvDu&VDOhn5u2oqbB{X9c91MDtEq;O zIWwtNlBT7eTqFVOUSCXh5X?TWF%ZrHna$C|FU9@^7(^{U8A-o zMVt-pha5K;c@EubpAFf7JZ&_6&nkPO0NM1JfyZ&zNeBOaaJFn9IB<{zElk$u7{!n0w=1O&5*P6g6-m9-BDI43$mJV4*#+k8&zsC%cp4Gr3MEbM zyohDW+#;V>n+*cVBn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Q4fLDW>4;vUbs=_~41WV@+B=g(bo$N=~HlSg?Nr3RT^lJoa z-uXbLa)bHe$KY|`7Y(!<;%3Unzs~l?0f3kovxW*UZdX#$lz@*ip4{sm@AQ$jblUQq KMfnNOtN#miZqtMS literal 0 HcmV?d00001 diff --git a/public/usage-examples/input/mouse_movement-1-example.py b/public/usage-examples/input/mouse_movement-1-example.py new file mode 100644 index 000000000..7bf667fff --- /dev/null +++ b/public/usage-examples/input/mouse_movement-1-example.py @@ -0,0 +1,29 @@ +from splashkit import * + +open_window("Mouse Movement Display", 800, 600) + +circle_x = 400 +circle_y = 300 + +while not quit_requested(): + process_events() + + movement = mouse_movement() + + circle_x += movement.x + circle_y += movement.y + + clear_screen(color_white()) + + draw_text_no_font_no_size("Move the mouse to see mouse_movement() values.", color_black(), 20, 20) + draw_text_no_font_no_size("Movement X: " + str(movement.x), color_black(), 20, 60) + draw_text_no_font_no_size("Movement Y: " + str(movement.y), color_black(), 20, 100) + + fill_circle(color_blue(), circle_x, circle_y, 15) + draw_circle(color_black(), circle_x, circle_y, 15) + + draw_line(color_red(), circle_x, circle_y, circle_x + movement.x * 5, circle_y + movement.y * 5) + + refresh_screen_with_target_fps(60) + +close_all_windows() \ No newline at end of file diff --git a/public/usage-examples/input/mouse_movement-1-example.txt b/public/usage-examples/input/mouse_movement-1-example.txt new file mode 100644 index 000000000..a40e100e6 --- /dev/null +++ b/public/usage-examples/input/mouse_movement-1-example.txt @@ -0,0 +1 @@ +Tracking Mouse Movement in a Window \ No newline at end of file diff --git a/scripts/json-files/usage-example-references.json b/scripts/json-files/usage-example-references.json index 001a67fe5..8addb8186 100644 --- a/scripts/json-files/usage-example-references.json +++ b/scripts/json-files/usage-example-references.json @@ -2,7 +2,7 @@ "audio": [ { "funcKey": "play_music_named", - "title": "Music Playback", + "title": "Music Playback\r", "url": "/api/audio/#play-music-named", "functions": [ "audio_ready", @@ -14,7 +14,7 @@ }, { "funcKey": "resume_music", - "title": "Pausing and Resuming Game Music", + "title": "Pausing and Resuming Game Music\r", "url": "/api/audio/#resume-music", "functions": [ "audio_ready", @@ -39,7 +39,7 @@ }, { "funcKey": "stop_music", - "title": "Stop/Start Music", + "title": "Stop/Start Music\r", "url": "/api/audio/#stop-music", "functions": [ "audio_ready", @@ -61,6 +61,29 @@ } ], "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" + ] + }, { "funcKey": "string_to_color", "title": "Color from Hex Code", @@ -186,7 +209,7 @@ }, { "funcKey": "closest_point_on_circle", - "title": "Closest Point to Mouse on Circle", + "title": "Closest Point to Mouse on Circle\r", "url": "/api/geometry/#closest-point-on-circle", "functions": [ "open_window", @@ -205,6 +228,25 @@ "close_all_windows" ] }, + { + "funcKey": "lines_intersect", + "title": "Simple Line Intersect Check", + "url": "/api/geometry/#lines-intersect", + "functions": [ + "open_window", + "Point2D", + "line_from_point_to_point", + "draw_line_record", + "color_red", + "draw_text_no_font_no_size", + "color_black", + "color_blue", + "color_green", + "refresh_screen", + "delay", + "close_all_windows" + ] + }, { "funcKey": "line_intersects_rect", "title": "Avoid the Rectangle", @@ -300,25 +342,6 @@ "close_all_windows" ] }, - { - "funcKey": "lines_intersect", - "title": "Simple Line Intersect Check", - "url": "/api/geometry/#lines-intersect", - "functions": [ - "open_window", - "Point2D", - "line_from_point_to_point", - "draw_line_record", - "color_red", - "draw_text_no_font_no_size", - "color_black", - "color_blue", - "color_green", - "refresh_screen", - "delay", - "close_all_windows" - ] - }, { "funcKey": "point_at", "title": "Flower Grid", @@ -552,7 +575,7 @@ }, { "funcKey": "random_window_point", - "title": "Random Portals", + "title": "Random Portals\r", "url": "/api/geometry/#random-window-point", "functions": [ "open_window", @@ -568,6 +591,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", @@ -605,6 +654,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", @@ -619,7 +686,7 @@ }, { "funcKey": "draw_bitmap_named", - "title": "SplashKit Logo", + "title": "SplashKit Logo\r", "url": "/api/graphics/#draw-bitmap-named", "functions": [ "open_window", @@ -641,6 +708,26 @@ "SplashKit" ] }, + { + "funcKey": "draw_circle", + "title": "Circle Showcase\r", + "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", @@ -1085,7 +1172,7 @@ }, { "funcKey": "fill_rectangle_on_bitmap", - "title": "Cityscape", + "title": "Cityscape\r", "url": "/api/graphics/#fill-rectangle-on-bitmap", "functions": [ "open_window", @@ -1156,7 +1243,7 @@ }, { "funcKey": "fill_triangle_on_bitmap", - "title": "Hooray! A Red Hat", + "title": "Hooray! A Red Hat\r", "url": "/api/graphics/#fill-triangle-on-bitmap", "functions": [ "open_window", @@ -1216,7 +1303,7 @@ }, { "funcKey": "free_font", - "title": "Freeing Fonts", + "title": "Freeing Fonts\r", "url": "/api/graphics/#free-font", "functions": [ "open_window", @@ -1233,6 +1320,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", @@ -1255,7 +1361,7 @@ }, { "funcKey": "load_font", - "title": "Using Fonts", + "title": "Using Fonts\r", "url": "/api/graphics/#load-font", "functions": [ "open_window", @@ -1305,7 +1411,7 @@ }, { "funcKey": "text_width_font_named", - "title": "Underline Text using Text Width", + "title": "Underline Text using Text Width\r", "url": "/api/graphics/#text-width-font-named", "functions": [ "open_window", @@ -1322,6 +1428,29 @@ ] } ], + "input": [ + { + "funcKey": "mouse_movement", + "title": "Tracking Mouse Movement in a Window", + "url": "/api/input/#mouse-movement", + "functions": [ + "open_window", + "quit_requested", + "process_events", + "clear_screen", + "color_white", + "draw_text_no_font_no_size", + "color_black", + "fill_circle", + "color_blue", + "draw_circle", + "draw_line", + "color_red", + "refresh_screen_with_target_fps", + "close_all_windows" + ] + } + ], "networking": [ { "funcKey": "dec_to_hex", @@ -1366,7 +1495,7 @@ "physics": [ { "funcKey": "sprite_bitmap_collision", - "title": "Does SplashKit have bugs?", + "title": "Does SplashKit have bugs?\r", "url": "/api/physics/#sprite-bitmap-collision", "functions": [ "open_window", @@ -1386,7 +1515,7 @@ }, { "funcKey": "sprite_collision", - "title": "Colliding Sprites", + "title": "Colliding Sprites\r", "url": "/api/physics/#sprite-collision", "functions": [ "open_window", @@ -1405,7 +1534,7 @@ }, { "funcKey": "sprite_point_collision", - "title": "Determine Sprite Collisions with Points", + "title": "Determine Sprite Collisions with Points\r", "url": "/api/physics/#sprite-point-collision", "functions": [ "open_window", @@ -1428,7 +1557,7 @@ }, { "funcKey": "sprite_rectangle_collision", - "title": "Detect Sprite Collisions with Rectangles", + "title": "Detect Sprite Collisions with Rectangles\r", "url": "/api/physics/#sprite-rectangle-collision", "functions": [ "open_window", @@ -1453,7 +1582,7 @@ "raspberry": [ { "funcKey": "raspi_i2c_write_data", - "title": "LED Text Scrolling", + "title": "LED Text Scrolling\r", "url": "/api/raspberry/#raspi-i2c-write-data", "functions": [ "write_line", @@ -1470,7 +1599,7 @@ "sprites": [ { "funcKey": "create_sprite", - "title": "Creating a Player Sprite", + "title": "Creating a Player Sprite\r", "url": "/api/sprites/#create-sprite", "functions": [ "open_window", @@ -1488,7 +1617,7 @@ }, { "funcKey": "draw_sprite", - "title": "Drawing a Player Sprite", + "title": "Drawing a Player Sprite\r", "url": "/api/sprites/#draw-sprite", "functions": [ "open_window", @@ -1506,7 +1635,7 @@ }, { "funcKey": "free_sprite", - "title": "Freeing a Sprite", + "title": "Freeing a Sprite\r", "url": "/api/sprites/#free-sprite", "functions": [ "open_window", @@ -1528,7 +1657,7 @@ }, { "funcKey": "sprite_set_position", - "title": "Setting Sprite Position", + "title": "Setting Sprite Position\r", "url": "/api/sprites/#sprite-set-position", "functions": [ "open_window", @@ -1548,7 +1677,7 @@ }, { "funcKey": "sprite_set_velocity", - "title": "Setting Velocity of Sprite", + "title": "Setting Velocity of Sprite\r", "url": "/api/sprites/#sprite-set-velocity", "functions": [ "open_window", @@ -1570,7 +1699,7 @@ }, { "funcKey": "sprite_set_x", - "title": "Setting Sprite X-coordinate", + "title": "Setting Sprite X-coordinate\r", "url": "/api/sprites/#sprite-set-x", "functions": [ "open_window", @@ -1587,7 +1716,7 @@ }, { "funcKey": "sprite_set_y", - "title": "Setting Sprite Y-coordinate", + "title": "Setting Sprite Y-coordinate\r", "url": "/api/sprites/#sprite-set-y", "functions": [ "open_window", @@ -1604,7 +1733,7 @@ }, { "funcKey": "sprite_x", - "title": "Sprite x-coordinate", + "title": "Sprite x-coordinate\r", "url": "/api/sprites/#sprite-x", "functions": [ "open_window", @@ -1624,7 +1753,7 @@ }, { "funcKey": "sprite_y", - "title": "Sprite y-coordinate", + "title": "Sprite y-coordinate\r", "url": "/api/sprites/#sprite-y", "functions": [ "open_window", @@ -1736,7 +1865,7 @@ }, { "funcKey": "current_ticks", - "title": "How many ticks?", + "title": "How many ticks?\r", "url": "/api/utilities/#current-ticks", "functions": [ "write_line", @@ -1853,5 +1982,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 From 311d708a817e0f19824bd1aa2cedca149d487805 Mon Sep 17 00:00:00 2001 From: ZGT23 <3458926299@qq.com> Date: Fri, 8 May 2026 19:00:36 +1000 Subject: [PATCH 2/2] Remove unrelated generated references --- .../json-files/usage-example-references.json | 244 ++++-------------- 1 file changed, 45 insertions(+), 199 deletions(-) diff --git a/scripts/json-files/usage-example-references.json b/scripts/json-files/usage-example-references.json index 8addb8186..001a67fe5 100644 --- a/scripts/json-files/usage-example-references.json +++ b/scripts/json-files/usage-example-references.json @@ -2,7 +2,7 @@ "audio": [ { "funcKey": "play_music_named", - "title": "Music Playback\r", + "title": "Music Playback", "url": "/api/audio/#play-music-named", "functions": [ "audio_ready", @@ -14,7 +14,7 @@ }, { "funcKey": "resume_music", - "title": "Pausing and Resuming Game Music\r", + "title": "Pausing and Resuming Game Music", "url": "/api/audio/#resume-music", "functions": [ "audio_ready", @@ -39,7 +39,7 @@ }, { "funcKey": "stop_music", - "title": "Stop/Start Music\r", + "title": "Stop/Start Music", "url": "/api/audio/#stop-music", "functions": [ "audio_ready", @@ -61,29 +61,6 @@ } ], "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" - ] - }, { "funcKey": "string_to_color", "title": "Color from Hex Code", @@ -209,7 +186,7 @@ }, { "funcKey": "closest_point_on_circle", - "title": "Closest Point to Mouse on Circle\r", + "title": "Closest Point to Mouse on Circle", "url": "/api/geometry/#closest-point-on-circle", "functions": [ "open_window", @@ -228,25 +205,6 @@ "close_all_windows" ] }, - { - "funcKey": "lines_intersect", - "title": "Simple Line Intersect Check", - "url": "/api/geometry/#lines-intersect", - "functions": [ - "open_window", - "Point2D", - "line_from_point_to_point", - "draw_line_record", - "color_red", - "draw_text_no_font_no_size", - "color_black", - "color_blue", - "color_green", - "refresh_screen", - "delay", - "close_all_windows" - ] - }, { "funcKey": "line_intersects_rect", "title": "Avoid the Rectangle", @@ -342,6 +300,25 @@ "close_all_windows" ] }, + { + "funcKey": "lines_intersect", + "title": "Simple Line Intersect Check", + "url": "/api/geometry/#lines-intersect", + "functions": [ + "open_window", + "Point2D", + "line_from_point_to_point", + "draw_line_record", + "color_red", + "draw_text_no_font_no_size", + "color_black", + "color_blue", + "color_green", + "refresh_screen", + "delay", + "close_all_windows" + ] + }, { "funcKey": "point_at", "title": "Flower Grid", @@ -575,7 +552,7 @@ }, { "funcKey": "random_window_point", - "title": "Random Portals\r", + "title": "Random Portals", "url": "/api/geometry/#random-window-point", "functions": [ "open_window", @@ -591,32 +568,6 @@ "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", @@ -654,24 +605,6 @@ "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", @@ -686,7 +619,7 @@ }, { "funcKey": "draw_bitmap_named", - "title": "SplashKit Logo\r", + "title": "SplashKit Logo", "url": "/api/graphics/#draw-bitmap-named", "functions": [ "open_window", @@ -708,26 +641,6 @@ "SplashKit" ] }, - { - "funcKey": "draw_circle", - "title": "Circle Showcase\r", - "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", @@ -1172,7 +1085,7 @@ }, { "funcKey": "fill_rectangle_on_bitmap", - "title": "Cityscape\r", + "title": "Cityscape", "url": "/api/graphics/#fill-rectangle-on-bitmap", "functions": [ "open_window", @@ -1243,7 +1156,7 @@ }, { "funcKey": "fill_triangle_on_bitmap", - "title": "Hooray! A Red Hat\r", + "title": "Hooray! A Red Hat", "url": "/api/graphics/#fill-triangle-on-bitmap", "functions": [ "open_window", @@ -1303,7 +1216,7 @@ }, { "funcKey": "free_font", - "title": "Freeing Fonts\r", + "title": "Freeing Fonts", "url": "/api/graphics/#free-font", "functions": [ "open_window", @@ -1320,25 +1233,6 @@ "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", @@ -1361,7 +1255,7 @@ }, { "funcKey": "load_font", - "title": "Using Fonts\r", + "title": "Using Fonts", "url": "/api/graphics/#load-font", "functions": [ "open_window", @@ -1411,7 +1305,7 @@ }, { "funcKey": "text_width_font_named", - "title": "Underline Text using Text Width\r", + "title": "Underline Text using Text Width", "url": "/api/graphics/#text-width-font-named", "functions": [ "open_window", @@ -1428,29 +1322,6 @@ ] } ], - "input": [ - { - "funcKey": "mouse_movement", - "title": "Tracking Mouse Movement in a Window", - "url": "/api/input/#mouse-movement", - "functions": [ - "open_window", - "quit_requested", - "process_events", - "clear_screen", - "color_white", - "draw_text_no_font_no_size", - "color_black", - "fill_circle", - "color_blue", - "draw_circle", - "draw_line", - "color_red", - "refresh_screen_with_target_fps", - "close_all_windows" - ] - } - ], "networking": [ { "funcKey": "dec_to_hex", @@ -1495,7 +1366,7 @@ "physics": [ { "funcKey": "sprite_bitmap_collision", - "title": "Does SplashKit have bugs?\r", + "title": "Does SplashKit have bugs?", "url": "/api/physics/#sprite-bitmap-collision", "functions": [ "open_window", @@ -1515,7 +1386,7 @@ }, { "funcKey": "sprite_collision", - "title": "Colliding Sprites\r", + "title": "Colliding Sprites", "url": "/api/physics/#sprite-collision", "functions": [ "open_window", @@ -1534,7 +1405,7 @@ }, { "funcKey": "sprite_point_collision", - "title": "Determine Sprite Collisions with Points\r", + "title": "Determine Sprite Collisions with Points", "url": "/api/physics/#sprite-point-collision", "functions": [ "open_window", @@ -1557,7 +1428,7 @@ }, { "funcKey": "sprite_rectangle_collision", - "title": "Detect Sprite Collisions with Rectangles\r", + "title": "Detect Sprite Collisions with Rectangles", "url": "/api/physics/#sprite-rectangle-collision", "functions": [ "open_window", @@ -1582,7 +1453,7 @@ "raspberry": [ { "funcKey": "raspi_i2c_write_data", - "title": "LED Text Scrolling\r", + "title": "LED Text Scrolling", "url": "/api/raspberry/#raspi-i2c-write-data", "functions": [ "write_line", @@ -1599,7 +1470,7 @@ "sprites": [ { "funcKey": "create_sprite", - "title": "Creating a Player Sprite\r", + "title": "Creating a Player Sprite", "url": "/api/sprites/#create-sprite", "functions": [ "open_window", @@ -1617,7 +1488,7 @@ }, { "funcKey": "draw_sprite", - "title": "Drawing a Player Sprite\r", + "title": "Drawing a Player Sprite", "url": "/api/sprites/#draw-sprite", "functions": [ "open_window", @@ -1635,7 +1506,7 @@ }, { "funcKey": "free_sprite", - "title": "Freeing a Sprite\r", + "title": "Freeing a Sprite", "url": "/api/sprites/#free-sprite", "functions": [ "open_window", @@ -1657,7 +1528,7 @@ }, { "funcKey": "sprite_set_position", - "title": "Setting Sprite Position\r", + "title": "Setting Sprite Position", "url": "/api/sprites/#sprite-set-position", "functions": [ "open_window", @@ -1677,7 +1548,7 @@ }, { "funcKey": "sprite_set_velocity", - "title": "Setting Velocity of Sprite\r", + "title": "Setting Velocity of Sprite", "url": "/api/sprites/#sprite-set-velocity", "functions": [ "open_window", @@ -1699,7 +1570,7 @@ }, { "funcKey": "sprite_set_x", - "title": "Setting Sprite X-coordinate\r", + "title": "Setting Sprite X-coordinate", "url": "/api/sprites/#sprite-set-x", "functions": [ "open_window", @@ -1716,7 +1587,7 @@ }, { "funcKey": "sprite_set_y", - "title": "Setting Sprite Y-coordinate\r", + "title": "Setting Sprite Y-coordinate", "url": "/api/sprites/#sprite-set-y", "functions": [ "open_window", @@ -1733,7 +1604,7 @@ }, { "funcKey": "sprite_x", - "title": "Sprite x-coordinate\r", + "title": "Sprite x-coordinate", "url": "/api/sprites/#sprite-x", "functions": [ "open_window", @@ -1753,7 +1624,7 @@ }, { "funcKey": "sprite_y", - "title": "Sprite y-coordinate\r", + "title": "Sprite y-coordinate", "url": "/api/sprites/#sprite-y", "functions": [ "open_window", @@ -1865,7 +1736,7 @@ }, { "funcKey": "current_ticks", - "title": "How many ticks?\r", + "title": "How many ticks?", "url": "/api/utilities/#current-ticks", "functions": [ "write_line", @@ -1982,30 +1853,5 @@ "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