Skip to content

Commit

Permalink
图标更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperIceCN committed Oct 7, 2020
1 parent ab37506 commit dabe099
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 4 deletions.
Binary file added icons/BN插件.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/JSON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/Nukkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/事件.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/位置.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/函数.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/列表.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/创世.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/变量.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/字符串.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/实用工具.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/循环.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/拓展.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/数学.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/方块物品.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/物品栏.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/玩家.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/生物.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/窗口.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/粒子.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/红石音乐.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/逻辑.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 30 additions & 4 deletions js/bnViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,41 @@ var createModule=new MutationObserver(function (mutations,createModule) {
if(value.addedNodes[0].childNodes[0].childNodes[0]==null){return;}
if(value.addedNodes[0].childNodes[0].classList.contains("blocklyTreeRow")){//blocklyTreeRow
if(value.addedNodes[0].childNodes[0].childNodes[0].getAttribute("class")=='blocklyTreeIcon blocklyTreeIconNone'){
value.addedNodes[0].childNodes[0].childNodes[0].style.backgroundImage = 'url("./icons/component.png")';
value.addedNodes[0].childNodes[0].childNodes[0].style.backgroundSize = "100% 100%";
value.addedNodes[0].childNodes[0].childNodes[0].style.backgroundImage = 'url("'+getIconURL(value.addedNodes[0].childNodes[0].outerText)+'")';
value.addedNodes[0].childNodes[0].childNodes[0].style.backgroundSize = "contain";
}
}
})
createModule.takeRecords();
});
createModule.observe(document.querySelectorAll("div[class='blocklyToolboxDiv blocklyNonSelectable']")[0],{ childList: true, subtree: true });
//获取修饰图标
function getIconText(From){
return "#"
function getIconURL(From){
switch (From) {
case "逻辑":
case "循环":
case "数学":
case "字符串":
case "列表":
case "JSON":
case "BN插件":
case "Nukkit":
case "玩家":
case "事件":
case "位置":
case "创世":
case "窗口":
case "方块物品":
case "物品栏":
case "生物":
case "粒子":
case "函数":
case "变量":
case "实用工具":
case "红石音乐":
return "./icons/"+From+".png"
break;
default:
return "./icons/拓展.png";
}
}

0 comments on commit dabe099

Please sign in to comment.