Skip to content

Commit

Permalink
Merge pull request #108 from haroldo-ok/fix-electron-prompt
Browse files Browse the repository at this point in the history
Fix bug on Electron where the variable creation dialog wasn't opening when clicking on the "Create variable..." button
  • Loading branch information
haroldo-ok authored Oct 1, 2024
2 parents d9caf79 + d9ca2e1 commit e3e7df5
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 3 deletions.
69 changes: 67 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vcs-game-maker",
"version": "0.25.1",
"version": "0.25.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand All @@ -21,6 +21,7 @@
"file-saver": "^2.0.5",
"handlebars": "^4.7.7",
"lodash": "^4.17.21",
"smalltalk": "^4.1.2",
"vue": "^2.6.14",
"vue-code-highlight": "^0.7.8",
"vue-router": "^3.2.0",
Expand Down
10 changes: 10 additions & 0 deletions src/blocks/prompt-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Blockly from 'blockly/core';

const smalltalk = require('smalltalk');

Blockly.prompt = function(message, defaultValue, callback) {
smalltalk
.prompt('Prompt', message, defaultValue)
.then(callback)
.catch(() => {});
};
2 changes: 2 additions & 0 deletions src/components/ActionEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import bBasic from 'batari-basic';
import BlocklyComponent from './BlocklyComponent.vue';
import '../blocks/prompt-fix';
import '../blocks/background';
import '../blocks/collision';
import '../blocks/event';
Expand Down

0 comments on commit e3e7df5

Please sign in to comment.