diff --git a/development/docs-template.ejs b/development/docs-template.ejs index e2510f93b6..f3915ad923 100644 --- a/development/docs-template.ejs +++ b/development/docs-template.ejs @@ -42,17 +42,20 @@ font-weight: bold; font-size: 1.1em; } - nav > * { + nav > div { display: flex; - align-items: center; max-width: 600px; margin: 0 auto; - padding: 0.5rem 0.25rem; + } + nav a { + display: flex; gap: 0.5rem; + padding: 0.5rem 0.25rem 0.5rem 0; + align-items: center; text-decoration: none; color: inherit !important; } - nav > *:hover { + nav a:hover { text-decoration: underline; } nav img { @@ -115,6 +118,7 @@ width: 100%; overflow-x: auto; white-space: pre; + line-height: 42px; /* reasonable estimation to reduce layout shift */ } .render-scratchblocks svg { display: block; @@ -128,10 +132,12 @@
diff --git a/docs/CubesterYT/KeySimulation.md b/docs/CubesterYT/KeySimulation.md index cdb8eeffd4..ee132577a4 100644 --- a/docs/CubesterYT/KeySimulation.md +++ b/docs/CubesterYT/KeySimulation.md @@ -21,3 +21,11 @@ click (left v) mouse button at x: (0) y: (0) for (0.1) seconds (without waiting This will trigger "mouse down?" and "when this sprite clicked" blocks as well as update the "mouse x" and "mouse y" blocks. It can't be used to click on buttons in the editor, for example. When `0` is used as a duration, the button will be pressed for exactly one frame. + +## Move mouse + +```scratch +move mouse to x: (0) y: (0) :: #BF0000 +``` + +This will update the values of the "mouse x" and "mouse y" block without clicking. diff --git a/docs/CubesterYT/WindowControls.md b/docs/CubesterYT/WindowControls.md index b0efe57279..2d6e61a07b 100644 --- a/docs/CubesterYT/WindowControls.md +++ b/docs/CubesterYT/WindowControls.md @@ -2,15 +2,13 @@ This extension provides a set of blocks that gives you greater control over the Program Window. -Note: Most of these blocks only work in Electron, Pop Ups/Web Apps containing HTML packaged projects, and normal Web Apps. +**Note: Most of these blocks only work in Electron, Pop Ups/Web Apps containing HTML packaged projects, and normal Web Apps.** -Examples include, but are not limited to: TurboWarp Desktop App, TurboWarp Web App, Pop Up/Web App windows that contain the HTML packaged project, and plain Electron. +Examples include, but are not limited to: **TurboWarp Desktop App, TurboWarp Web App, Pop Up/Web App windows that contain the HTML packaged project, and plain Electron.** -Blocks that still work outside of these will be specified. +**Blocks that still work outside of these will be specified.** -
- -

Move Window Block (#)

+## Move Window Block ```scratch move window to x: (0) y: (0) :: #359ed4 @@ -18,15 +16,13 @@ move window to x: (0) y: (0) :: #359ed4 Moves the Program Window to the defined "x" and "y" coordinate on the screen. -
- -

Move Window to Preset Block (#)

+## Move Window to Preset Block Moves the Program Window to a preset. -The menu area has ten options, ("center", "right", "left", "top", "bottom", "top right", "top left", "bottom right", "bottom left", "random position") +The menu area has ten options, **("center", "right", "left", "top", "bottom", "top right", "top left", "bottom right", "bottom left", "random position")** -#### Center +### Center ```scratch move window to the (center v) :: #359ed4 @@ -34,7 +30,7 @@ move window to the (center v) :: #359ed4 When choosing "center", it will move the Program Window to the center of the screen. -#### Right +### Right ```scratch move window to the (right v) :: #359ed4 @@ -42,7 +38,7 @@ move window to the (right v) :: #359ed4 When choosing "right", it will move the Program Window to the right of the screen. -#### Left +### Left ```scratch move window to the (left v) :: #359ed4 @@ -50,7 +46,7 @@ move window to the (left v) :: #359ed4 When choosing "left", it will move the Program Window to the left of the screen. -#### Top +### Top ```scratch move window to the (top v) :: #359ed4 @@ -58,7 +54,7 @@ move window to the (top v) :: #359ed4 When choosing "top", it will move the Program Window to the top of the screen. -#### Bottom +### Bottom ```scratch move window to the (bottom v) :: #359ed4 @@ -66,7 +62,7 @@ move window to the (bottom v) :: #359ed4 When choosing "bottom", it will move the Program Window to the bottom of the screen. -#### Top Right +### Top Right ```scratch move window to the (top right v) :: #359ed4 @@ -74,7 +70,7 @@ move window to the (top right v) :: #359ed4 When choosing "top right", it will move the Program Window to the top right of the screen. -#### Top Left +### Top Left ```scratch move window to the (top left v) :: #359ed4 @@ -82,7 +78,7 @@ move window to the (top left v) :: #359ed4 When choosing "top left", it will move the Program Window to the top left of the screen. -#### Bottom Right +### Bottom Right ```scratch move window to the (bottom right v) :: #359ed4 @@ -90,7 +86,7 @@ move window to the (bottom right v) :: #359ed4 When choosing "bottom right", it will move the Program Window to the bottom right of the screen. -#### Bottom Left +### Bottom Left ```scratch move window to the (bottom left v) :: #359ed4 @@ -98,7 +94,7 @@ move window to the (bottom left v) :: #359ed4 When choosing "bottom left", it will move the Program Window to the bottom left of the screen. -#### Random Position +### Random Position ```scratch move window to the (random position v) :: #359ed4 @@ -106,9 +102,7 @@ move window to the (random position v) :: #359ed4 When choosing "random position", it will move the Program Window to a random position on the screen. -
- -

Change "x" Block (#)

+## Change "x" Block ```scratch change window x by (50) :: #359ed4 @@ -116,9 +110,7 @@ change window x by (50) :: #359ed4 Dynamically changes the "x" position of the Program Window on the screen. -
- -

Set "x" Block (#)

+## Set "x" Block ```scratch set window x to (100) :: #359ed4 @@ -126,9 +118,7 @@ set window x to (100) :: #359ed4 Statically changes the "x" position of the Program Window on the screen. -
- -

Change "y" Block (#)

+## Change "y" Block ```scratch change window y by (50) :: #359ed4 @@ -136,9 +126,7 @@ change window y by (50) :: #359ed4 Dynamically changes the "y" position of the Program Window on the screen. -
- -

Set "y" Block (#)

+## Set "y" Block ```scratch set window y to (100) :: #359ed4 @@ -146,9 +134,7 @@ set window y to (100) :: #359ed4 Statically changes the "y" position of the Program Window on the screen. -
- -

Window "x" Reporter (#)

+## Window "x" Reporter ```scratch (window x :: #359ed4) @@ -156,11 +142,9 @@ Statically changes the "y" position of the Program Window on the screen. This reporter returns the "x" position of the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. +**This is supported outside of Electron, Pop Ups, and Web Apps.** -
- -

Window "y" Reporter (#)

+## Window "y" Reporter ```scratch (window y :: #359ed4) @@ -168,11 +152,9 @@ This reporter returns the "x" position of the Program Window. This reporter returns the "y" position of the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Resize Window Block (#)

+## Resize Window Block ```scratch resize window to width: (1000) height: (1000) :: #359ed4 @@ -180,15 +162,13 @@ resize window to width: (1000) height: (1000) :: #359ed4 Resizes the Program Window to the defined width and height values. -
- -

Resize Window Preset Block (#)

+## Resize Window Preset Block Resizes the Program Window to a preset. -The menu area has eight options, ("480x360", "640x480", "1280x720", "1920x1080", "2560x1440", "2048x1080", "3840x2160", "7680x4320") +The menu area has eight options, **("480x360", "640x480", "1280x720", "1920x1080", "2560x1440", "2048x1080", "3840x2160", "7680x4320")** -#### 480x360 +### 480x360 ```scratch resize window to (480x360 v) :: #359ed4 @@ -196,7 +176,7 @@ resize window to (480x360 v) :: #359ed4 When choosing "480x360", it will resize the Program Window to 480x360 (360p). The aspect ratio for this size is 4:3. -#### 640x480 +### 640x480 ```scratch resize window to (640x480 v) :: #359ed4 @@ -204,7 +184,7 @@ resize window to (640x480 v) :: #359ed4 When choosing "640x480", it will resize the Program Window to 640x480 (480p). The aspect ratio for this size is 4:3. -#### 1280x720 +### 1280x720 ```scratch resize window to (1280x720 v) :: #359ed4 @@ -212,7 +192,7 @@ resize window to (1280x720 v) :: #359ed4 When choosing "1280x720", it will resize the Program Window to 1280x720 (720p). The aspect ratio for this size is 16:9. -#### 1920x1080 +### 1920x1080 ```scratch resize window to (1920x1080 v) :: #359ed4 @@ -220,7 +200,7 @@ resize window to (1920x1080 v) :: #359ed4 When choosing "1920x1080", it will resize the Program Window to 1920x1080 (1080p). The aspect ratio for this size is 16:9. -#### 2560x1440 +### 2560x1440 ```scratch resize window to (2560x1440 v) :: #359ed4 @@ -228,7 +208,7 @@ resize window to (2560x1440 v) :: #359ed4 When choosing "2560x1440", it will resize the Program Window to 2560x1440 (1440p). The aspect ratio for this size is 16:9. -#### 2048x1080 +### 2048x1080 ```scratch resize window to (2048x1080 v) :: #359ed4 @@ -236,7 +216,7 @@ resize window to (2048x1080 v) :: #359ed4 When choosing "2048x1080", it will resize the Program Window to 2048x1080 (2K/1080p[Higher Pixel Rate]). The aspect ratio for this size is 1:1.77. -#### 3840x2160 +### 3840x2160 ```scratch resize window to (3840x2160 v) :: #359ed4 @@ -244,7 +224,7 @@ resize window to (3840x2160 v) :: #359ed4 When choosing "3840x2160", it will resize the Program Window to 3840x2160 (4K). The aspect ratio for this size is 1:1.9. -#### 7680x4320 +### 7680x4320 ```scratch resize window to (7680x4320 v) :: #359ed4 @@ -252,9 +232,7 @@ resize window to (7680x4320 v) :: #359ed4 When choosing "7680x4320", it will resize the Program Window to 7680x4320 (8K). The aspect ratio for this size is 16:9. -
- -

Change Width Block (#)

+## Change Width Block ```scratch change window width by (50) :: #359ed4 @@ -262,9 +240,7 @@ change window width by (50) :: #359ed4 Dynamically changes the width of the Program Window. -
- -

Set Width Block (#)

+## Set Width Block ```scratch set window width to (1000) :: #359ed4 @@ -272,9 +248,7 @@ set window width to (1000) :: #359ed4 Statically changes the width of the Program Window. -
- -

Change Height Block (#)

+## Change Height Block ```scratch change window height by (50) :: #359ed4 @@ -282,9 +256,7 @@ change window height by (50) :: #359ed4 Dynamically changes the height of the Program Window. -
- -

Set Height Block (#)

+## Set Height Block ```scratch set window height to (1000) :: #359ed4 @@ -292,9 +264,7 @@ set window height to (1000) :: #359ed4 Statically changes the height of the Program Window. -
- -

Match Stage Size Block (#)

+## Match Stage Size Block ```scratch match stage size :: #359ed4 @@ -302,9 +272,9 @@ match stage size :: #359ed4 Resizes the Program Window to match the aspect ratio of the stage. Works best when the stage is dynamically changed. -Example: When using runtime options to change the stage size, using this block can help you adapt to the new stage size. +**Example: When using runtime options to change the stage size, using this block can help you adapt to the new stage size.** -Try this example script in a packaged project: +**Try this example script in a packaged project:** ```scratch when green flag clicked @@ -318,9 +288,7 @@ match stage size :: #359ed4 move window to the (center v) :: #359ed4 ``` -
- -

Window Width Reporter (#)

+## Window Width Reporter ```scratch (window width :: #359ed4) @@ -328,11 +296,9 @@ move window to the (center v) :: #359ed4 This reporter returns the width of the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. +**This is supported outside of Electron, Pop Ups, and Web Apps.** -
- -

Window Height Reporter (#)

+## Window Height Reporter ```scratch (window height :: #359ed4) @@ -340,11 +306,9 @@ This reporter returns the width of the Program Window. This reporter returns the height of the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Is Window Touching Screen Edge Boolean (#)

+## Is Window Touching Screen Edge Boolean ```scratch @@ -352,11 +316,9 @@ This reporter returns the height of the Program Window. This boolean returns true or false for whether or not the Program Window is touching the screen's edge. -This is supported outside of Electron, Pop Ups, and Web Apps. +**This is supported outside of Electron, Pop Ups, and Web Apps.** -
- -

Screen Width Reporter (#)

+## Screen Width Reporter ```scratch (screen width :: #359ed4) @@ -364,11 +326,9 @@ This boolean returns true or false for whether or not the Program Window is touc This reporter returns the width of the Screen. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Screen Height Reporter (#)

+## Screen Height Reporter ```scratch (screen height :: #359ed4) @@ -376,11 +336,9 @@ This reporter returns the width of the Screen. This reporter returns the height of the Screen. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Is Window Focused Boolean (#)

+## Is Window Focused Boolean ```scratch @@ -388,11 +346,9 @@ This reporter returns the height of the Screen. This boolean returns true or false for whether or not the Program Window is in focus. -This is supported outside of Electron, Pop Ups, and Web Apps. +**This is supported outside of Electron, Pop Ups, and Web Apps.** -
- -

Set Window Title Block (#)

+## Set Window Title Block ```scratch set window title to ["Hello World!] :: #359ed4 @@ -400,11 +356,9 @@ set window title to ["Hello World!] :: #359ed4 Changes the title of the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Window Title Reporter (#)

+## Window Title Reporter ```scratch (window title :: #359ed4) @@ -412,11 +366,9 @@ Changes the title of the Program Window. This reporter returns the title of the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Enter Fullscreen Block (#)

+## Enter Fullscreen Block ```scratch enter fullscreen :: #359ed4 @@ -424,11 +376,9 @@ enter fullscreen :: #359ed4 Makes the Program Window enter Fullscreen. -This is supported outside of Electron, Pop Ups, and Web Apps. +**This is supported outside of Electron, Pop Ups, and Web Apps.** -
- -

Exit Fullscreen Block (#)

+## Exit Fullscreen Block ```scratch exit fullscreen :: #359ed4 @@ -436,11 +386,9 @@ exit fullscreen :: #359ed4 Makes the Program Window exit Fullscreen. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Is Window Fullscreen Boolean (#)

+## Is Window Fullscreen Boolean ```scratch @@ -448,11 +396,9 @@ Makes the Program Window exit Fullscreen. This boolean returns true or false for whether or not the Program Window is in fullscreen. -This is supported outside of Electron, Pop Ups, and Web Apps. - -
+**This is supported outside of Electron, Pop Ups, and Web Apps.** -

Close Window Block (#)

+## Close Window Block ```scratch close window :: cap :: #359ed4 @@ -460,4 +406,4 @@ close window :: cap :: #359ed4 Closes the Program Window. -This is supported outside of Electron, Pop Ups, and Web Apps. \ No newline at end of file +**This is supported outside of Electron, Pop Ups, and Web Apps.**