Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fustyles authored Sep 29, 2023
1 parent 02ac3e5 commit e51d9b2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 22 deletions.
4 changes: 2 additions & 2 deletions SpBlocklyJS/GameElements_20190131/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ Blockly.Msg["CATPAGEELEMENTS_PASSWORD"] = "password";
Blockly.Msg["CATPAGEELEMENTS_FORM"] = "form";
Blockly.Msg["CATPAGEELEMENTS_VIDEO"] = "video";
Blockly.Msg["CATPAGEELEMENTS_FONT"] = "font";
Blockly.Msg["CATPAGEELEMENTS_AJAX"] = "AJAX";
Blockly.Msg["CATPAGEELEMENTS_FETCH"] = "FETCH";
Blockly.Msg["CATPAGEELEMENTS_AJAX"] = "Ajax";
Blockly.Msg["CATPAGEELEMENTS_FETCH"] = "Fetch";
Blockly.Msg.SPAN_ID = "Span ID";
Blockly.Msg.SPAN_CREATE = "Span Create";
Blockly.Msg.SPAN_VALUE = "Value";
Expand Down
12 changes: 11 additions & 1 deletion SpBlocklyJS/GameElements_20190131/gameelements.js
Original file line number Diff line number Diff line change
Expand Up @@ -4603,7 +4603,16 @@ function HextoRgb(color) {
now.setMinutes(now.getMinutes() + minutes);
now.setSeconds(now.getSeconds() + seconds);
return now;
}
}

function icon_google(input_element, input_id, input_value) {
var obj = document.getElementById("game"+input_element+"_"+input_id);
obj.className = "material-icons_custom";
if (input_element=="button")
obj.value = input_value;
else
obj.innerText = input_value;
}

window.table_create = table_create;
window.table_set = table_set;
Expand Down Expand Up @@ -4777,5 +4786,6 @@ function HextoRgb(color) {
window.include_file = include_file;
window.getDatetime = getDatetime;
window.setDatetime = setDatetime;
window.icon_google = icon_google;

}(window, window.document));
16 changes: 1 addition & 15 deletions SpBlocklyJS/GameElements_20190131/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@ Blockly.JavaScript['custom_googleicon'] = function (block) {
var element = block.getFieldValue('element');
var id = Blockly.JavaScript.valueToCode(block, 'id', Blockly.JavaScript.ORDER_ATOMIC);
var val = Blockly.JavaScript.valueToCode(block, 'val', Blockly.JavaScript.ORDER_ATOMIC);
if ((id.indexOf("'")==0)&&(id.lastIndexOf("'")==id.length-1))
id = id.substring(1,id.length-1);
if ((id.indexOf('"')==0)&&(id.lastIndexOf('"')==id.length-1))
id = id.substring(1,id.length-1);
var el = element;
if ((element.indexOf("'")==0)&&(element.lastIndexOf("'")==element.length-1))
el = element.substring(1,element.length-1);
if ((element.indexOf('"')==0)&&(element.lastIndexOf('"')==element.length-1))
el = element.substring(1,element.length-1);

el = "document.getElementById('game"+el+"_"+id+"')";

if (element=="button")
var code = el+".className = 'material-icons_custom';\n"+el+".value = "+val+";\n";
else
var code = el+".className = 'material-icons_custom';\n"+el+".innerText = "+val+";\n";
var code = 'icon_google("'+element+'", '+id+', '+val+');\n';
return code;
};

Expand Down
4 changes: 2 additions & 2 deletions SpBlocklyJS/GameElements_20190131/zh-hans.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ Blockly.Msg["CATPAGEELEMENTS_PASSWORD"] = "密码栏位";
Blockly.Msg["CATPAGEELEMENTS_FORM"] = "表单";
Blockly.Msg["CATPAGEELEMENTS_VIDEO"] = "视讯媒体";
Blockly.Msg["CATPAGEELEMENTS_FONT"] = "字型";
Blockly.Msg["CATPAGEELEMENTS_AJAX"] = "AJAX";
Blockly.Msg["CATPAGEELEMENTS_FETCH"] = "FETCH";
Blockly.Msg["CATPAGEELEMENTS_AJAX"] = "Ajax";
Blockly.Msg["CATPAGEELEMENTS_FETCH"] = "Fetch";
Blockly.Msg.SPAN_ID = "行内容器 代码";
Blockly.Msg.SPAN_CREATE = "行内容器 建立";
Blockly.Msg.SPAN_VALUE = "值";
Expand Down
4 changes: 2 additions & 2 deletions SpBlocklyJS/GameElements_20190131/zh-hant.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,8 @@ Blockly.Msg["CATPAGEELEMENTS_PASSWORD"] = "密碼欄位";
Blockly.Msg["CATPAGEELEMENTS_FORM"] = "表單";
Blockly.Msg["CATPAGEELEMENTS_VIDEO"] = "視訊媒體";
Blockly.Msg["CATPAGEELEMENTS_FONT"] = "字型";
Blockly.Msg["CATPAGEELEMENTS_AJAX"] = "AJAX";
Blockly.Msg["CATPAGEELEMENTS_FETCH"] = "FETCH";
Blockly.Msg["CATPAGEELEMENTS_AJAX"] = "Ajax";
Blockly.Msg["CATPAGEELEMENTS_FETCH"] = "Fetch";
Blockly.Msg.SPAN_ID = "行內容器 代碼";
Blockly.Msg.SPAN_CREATE = "行內容器 建立";
Blockly.Msg.SPAN_VALUE = "值";
Expand Down

0 comments on commit e51d9b2

Please sign in to comment.