Skip to content

Commit

Permalink
rename a couple other things
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Aug 8, 2023
1 parent 6a1e677 commit 8bccc78
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions extensions/TheShovel/CustomStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
let askInputBorderWidth = -1;
let askBoxIcon = '';
let askInputText = '';
let askBoxButtonImage = '';
let askButtonImage = '';
let askInputBorder = '';

// CSS selectors
Expand Down Expand Up @@ -167,8 +167,8 @@
if (askInputBorderWidth >= 0) {
css += `${askBoxInner} { border-width: ${askInputBorderWidth}px !important; }`;
}
if (askBoxButtonImage) {
css += `${askBoxButton} { background-image: url("${encodeURI(askBoxButtonImage)}") !important; background-repeat: no-repeat; background-size: contain; }`;
if (askButtonImage) {
css += `${askBoxButton} { background-image: url("${encodeURI(askButtonImage)}") !important; background-repeat: no-repeat; background-size: contain; }`;
css += `${askBoxIcon} { visibility: hidden; }`;
}
if (askInputBorder) {
Expand Down Expand Up @@ -378,7 +378,7 @@
blockIconURI: miscIcon,
opcode: 'allowscrollrule',
blockType: Scratch.BlockType.COMMAND,
text: 'set list scroll rule to [SCROLLRULE]',
text: 'set list scrolling to [SCROLLRULE]',
arguments: {
SCROLLRULE: {
type: Scratch.ArgumentType.STRING,
Expand All @@ -403,7 +403,7 @@
blockIconURI: miscIcon,
opcode: 'setvarpos',
blockType: Scratch.BlockType.COMMAND,
text: 'set position of variable with label [NAME] to x: [X] y: [Y]',
text: 'set position of variable [NAME] to x: [X] y: [Y]',
arguments: {
X: {
type: Scratch.ArgumentType.NUMBER,
Expand All @@ -423,7 +423,7 @@
blockIconURI: miscIcon,
opcode: 'setlistpos',
blockType: Scratch.BlockType.COMMAND,
text: 'set position of list with label [NAME] to x: [X] y: [Y]',
text: 'set position of list [NAME] to x: [X] y: [Y]',
arguments: {
X: {
type: Scratch.ArgumentType.NUMBER,
Expand Down Expand Up @@ -483,8 +483,8 @@
SCROLL_MENU: {
acceptReporters: true,
items: [
'auto',
'hidden'
'enabled',
'disabled'
]
},
VALUEGET_LIST: {
Expand Down Expand Up @@ -653,7 +653,7 @@
askInputBorderWidth = -1;
askBoxIcon = '';
askInputText = '';
askBoxButtonImage = '';
askButtonImage = '';
askInputBorder = '';

Check warning on line 657 in extensions/TheShovel/CustomStyles.js

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
applyCSS();
}
Expand Down Expand Up @@ -706,12 +706,12 @@
} else if (args.ITEM === 'ask prompt input roundness') {
return askInputRoundness;
} else if (args.ITEM === 'ask prompt button image') {
// TODO
} else if (args.ITEM === 'list scroll rule') {
return askButtonImage;
} else if (args.ITEM === 'list scrolling') {
if (allowScrolling) {
return 'auto';
return 'enabled';
} else {
return 'hidden';
return 'disabled';
}
}
return '';
Expand All @@ -720,7 +720,7 @@
setAskURI(args) {
return Scratch.canFetch(args.URL).then(allowed => {
if (allowed) {
askBoxButtonImage = args.URL;
askButtonImage = args.URL;
applyCSS();
}
});
Expand Down

0 comments on commit 8bccc78

Please sign in to comment.