diff --git a/editor/js/display.js b/editor/js/display.js index de6379c917018e86e17b1c7f74888884670055b5..91eb1bd81c3cd86501ea00b496c478686703f815 100644 --- a/editor/js/display.js +++ b/editor/js/display.js @@ -49,7 +49,7 @@ class Display { tool.getName() + '"><img src="' + TOOL_ICON_SRC + - tool.getKey() + + tool.getIcon() + TOOL_ICON_FORMAT + '"></button>' ); diff --git a/editor/js/tools/collecttool.js b/editor/js/tools/collecttool.js index 5554a0fff8683b2728ed1fcf3868cbfea2e04ef4..fa2ab96c0371bcccf9f1202d30920c93820832d7 100644 --- a/editor/js/tools/collecttool.js +++ b/editor/js/tools/collecttool.js @@ -1,6 +1,6 @@ class CollectTool extends Tool { constructor(key) { - super("Collect", key); + super("Collect", "collect", key); } onNodeClick(node) { diff --git a/editor/js/tools/deletetool.js b/editor/js/tools/deletetool.js index 6f990000c62e00d626fe4be61ef8e9566d6625df..35110df55b173e77ffa172fd710974f81388f3b4 100644 --- a/editor/js/tools/deletetool.js +++ b/editor/js/tools/deletetool.js @@ -1,6 +1,6 @@ class DeleteTool extends Tool { constructor(key) { - super("Delete", key); + super("Delete", "delete", key); } onNodeClick(node) { diff --git a/editor/js/tools/selecttool.js b/editor/js/tools/selecttool.js index 4c4b42742ae6e8487306d35cb1eefecae1003194..c50a7263253525bb0680f66f54eefe9132e01240 100644 --- a/editor/js/tools/selecttool.js +++ b/editor/js/tools/selecttool.js @@ -1,6 +1,6 @@ class SelectTool extends Tool { constructor(key) { - super("Select", key); + super("Select", "select", key); } onNodeClick(node) { diff --git a/editor/js/tools/tool.js b/editor/js/tools/tool.js index 3cbce813ea45f57bc259851910246814dcf88759..babede8b2a1a6d6a1b148d7e45fd046fcbf7665f 100644 --- a/editor/js/tools/tool.js +++ b/editor/js/tools/tool.js @@ -1,6 +1,7 @@ class Tool { - constructor(name, key) { + constructor(name, icon, key) { this.name = name; + this.icon = icon; this.key = key; this.warnings = false; } @@ -13,6 +14,10 @@ class Tool { return this.key; } + getIcon() { + return this.icon; + } + onNodeClick(node) { if (this.warnings) { console.warn('Method "onNodeClick" not implemented.');