Skip to content

Commit

Permalink
merge-upstream: use actual category colours when applicable (#1231)
Browse files Browse the repository at this point in the history
With the introduction of High Contrast mode, extensions like Looks Plus
should use the actual category colours by default so their high contrast
colours match.
  • Loading branch information
LilyMakesThings committed Jan 9, 2024
1 parent df42d96 commit 95d37cb
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 0 deletions.
19 changes: 19 additions & 0 deletions extensions/Lily/ClonesPlus.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "createCloneWithVar",
Expand All @@ -84,6 +85,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},

"---",
Expand All @@ -103,13 +105,15 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "touchingMainSprite",
blockType: Scratch.BlockType.BOOLEAN,
text: "touching main sprite?",
filter: [Scratch.TargetType.SPRITE],
disableMonitor: true,
extensions: ["colours_control"],
},

"---",
Expand Down Expand Up @@ -137,6 +141,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "getVariableOfClone",
Expand All @@ -158,6 +163,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "setVariableOfMainSprite",
Expand All @@ -174,6 +180,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "getVariableOfMainSprite",
Expand All @@ -187,6 +194,7 @@
menu: "variablesMenu",
},
},
extensions: ["colours_control"],
},

"---",
Expand All @@ -206,6 +214,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "getThingOfClone",
Expand All @@ -228,6 +237,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "getThingOfMainSprite",
Expand All @@ -242,6 +252,7 @@
menu: "thingOfMenu",
},
},
extensions: ["colours_control"],
},

"---",
Expand All @@ -256,6 +267,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_control"],
},
{
opcode: "stopScriptsInClone",
Expand All @@ -272,12 +284,14 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},
{
opcode: "stopScriptsInMainSprite",
blockType: Scratch.BlockType.COMMAND,
text: "stop scripts in main sprite",
filter: [Scratch.TargetType.SPRITE],
extensions: ["colours_control"],
},

"---",
Expand All @@ -292,6 +306,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_control"],
},
{
opcode: "deleteCloneWithVar",
Expand All @@ -308,6 +323,7 @@
defaultValue: "1",
},
},
extensions: ["colours_control"],
},

"---",
Expand All @@ -318,6 +334,7 @@
text: "is clone?",
filter: [Scratch.TargetType.SPRITE],
disableMonitor: true,
extensions: ["colours_control"],
},

"---",
Expand All @@ -326,6 +343,7 @@
opcode: "cloneCount",
blockType: Scratch.BlockType.REPORTER,
text: "clone count",
extensions: ["colours_control"],
},
{
opcode: "spriteCloneCount",
Expand All @@ -338,6 +356,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_control"],
},
],
menus: {
Expand Down
14 changes: 14 additions & 0 deletions extensions/Lily/LooksPlus.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},
{
opcode: "hideSprite",
Expand All @@ -63,6 +64,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},
{
opcode: "spriteVisible",
Expand All @@ -74,6 +76,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},

"---",
Expand All @@ -92,6 +95,7 @@
defaultValue: "1",
},
},
extensions: ["colours_looks"],
},
{
opcode: "spriteLayerNumber",
Expand All @@ -103,6 +107,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},
{
opcode: "effectValue",
Expand All @@ -119,6 +124,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},

"---",
Expand All @@ -133,6 +139,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},
{
opcode: "costumeAttribute",
Expand All @@ -147,6 +154,7 @@
type: Scratch.ArgumentType.COSTUME,
},
},
extensions: ["colours_looks"],
},

"---",
Expand All @@ -156,6 +164,7 @@
blockType: Scratch.BlockType.REPORTER,
text: "snapshot stage",
disableMonitor: true,
extensions: ["colours_looks"],
},

"---",
Expand All @@ -178,6 +187,7 @@
defaultValue: "<svg />",
},
},
extensions: ["colours_looks"],
},
{
opcode: "restoreCostumeContent",
Expand All @@ -188,6 +198,7 @@
type: Scratch.ArgumentType.COSTUME,
},
},
extensions: ["colours_looks"],
},
{
opcode: "costumeContent",
Expand All @@ -208,6 +219,7 @@
menu: "spriteMenu",
},
},
extensions: ["colours_looks"],
},

"---",
Expand All @@ -230,6 +242,7 @@
defaultValue: "<svg />",
},
},
extensions: ["colours_looks"],
},
{
opcode: "colorHex",
Expand All @@ -241,6 +254,7 @@
defaultValue: "#FFD983",
},
},
extensions: ["colours_looks"],
},
],
menus: {
Expand Down
17 changes: 17 additions & 0 deletions extensions/Lily/MoreEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,14 @@
dataURI: stopIcon,
},
},
extensions: ["colours_event"],
},
{
opcode: "forever",
blockType: Scratch.BlockType.EVENT,
text: "forever",
isEdgeActivated: false,
extensions: ["colours_event"],
},

"---",
Expand All @@ -249,6 +251,7 @@
menu: "boolean",
},
},
extensions: ["colours_event"],
},
{
opcode: "whileTrueFalse",
Expand All @@ -264,6 +267,7 @@
menu: "boolean",
},
},
extensions: ["colours_event"],
},

"---",
Expand All @@ -281,6 +285,7 @@
type: null,
},
},
extensions: ["colours_event"],
},
{
opcode: "everyDuration",
Expand All @@ -293,6 +298,7 @@
defaultValue: 3,
},
},
extensions: ["colours_event"],
},

"---",
Expand All @@ -313,6 +319,7 @@
menu: "action",
},
},
extensions: ["colours_event"],
},
{
opcode: "whileKeyPressed",
Expand All @@ -326,6 +333,7 @@
menu: "keyboardButtons",
},
},
extensions: ["colours_event"],
},

"---",
Expand All @@ -344,6 +352,7 @@
},
},
hideFromPalette: true,
extensions: ["colours_event"],
},
{
opcode: "broadcastToTargetAndWait",
Expand All @@ -359,6 +368,7 @@
},
},
hideFromPalette: true,
extensions: ["colours_event"],
},

"---",
Expand All @@ -376,6 +386,7 @@
},
},
hideFromPalette: true,
extensions: ["colours_event"],
},
{
opcode: "broadcastDataAndWait",
Expand All @@ -390,6 +401,7 @@
},
},
hideFromPalette: true,
extensions: ["colours_event"],
},
{
blockType: Scratch.BlockType.XML,
Expand All @@ -401,6 +413,7 @@
text: "received data",
disableMonitor: true,
allowDropAnywhere: true,
extensions: ["colours_event"],
},

"---",
Expand All @@ -423,6 +436,7 @@
},
},
hideFromPalette: true,
extensions: ["colours_event"],
},
{
opcode: "broadcastDataToTargetAndWait",
Expand All @@ -442,6 +456,7 @@
},
},
hideFromPalette: true,
extensions: ["colours_event"],
},
{
blockType: Scratch.BlockType.XML,
Expand All @@ -454,13 +469,15 @@
text: "before project saves",
shouldRestartExistingThreads: true,
isEdgeActivated: false,
extensions: ["colours_event"],
},
{
blockType: Scratch.BlockType.EVENT,
opcode: "afterSave",
text: "after project saves",
shouldRestartExistingThreads: true,
isEdgeActivated: false,
extensions: ["colours_event"],
},
],
menus: {
Expand Down
Loading

0 comments on commit 95d37cb

Please sign in to comment.