mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:37:49 +02:00
Update icon color as current color is changed
This commit is contained in:
parent
d0143c2c19
commit
75b481adab
2 changed files with 13 additions and 0 deletions
|
@ -90,6 +90,10 @@ ToolIcon = function (side) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setColor(color) {
|
||||||
|
Overlays.editOverlay(iconOverlay, { color: color });
|
||||||
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
// Deletes current icon.
|
// Deletes current icon.
|
||||||
if (iconOverlay) {
|
if (iconOverlay) {
|
||||||
|
@ -111,6 +115,7 @@ ToolIcon = function (side) {
|
||||||
setHand: setHand,
|
setHand: setHand,
|
||||||
update: update,
|
update: update,
|
||||||
display: display,
|
display: display,
|
||||||
|
setColor: setColor,
|
||||||
clear: clear,
|
clear: clear,
|
||||||
destroy: destroy
|
destroy: destroy
|
||||||
};
|
};
|
||||||
|
|
|
@ -212,6 +212,10 @@
|
||||||
toolIcon.display(icon);
|
toolIcon.display(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setToolColor(color) {
|
||||||
|
toolIcon.setColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
function clearToolIcon() {
|
function clearToolIcon() {
|
||||||
toolIcon.clear();
|
toolIcon.clear();
|
||||||
toolMenu.clearTool();
|
toolMenu.clearTool();
|
||||||
|
@ -266,6 +270,7 @@
|
||||||
return {
|
return {
|
||||||
setHand: setHand,
|
setHand: setHand,
|
||||||
setToolIcon: setToolIcon,
|
setToolIcon: setToolIcon,
|
||||||
|
setToolColor: setToolColor,
|
||||||
clearToolIcon: clearToolIcon,
|
clearToolIcon: clearToolIcon,
|
||||||
SCALE_TOOL: toolIcon.SCALE_TOOL,
|
SCALE_TOOL: toolIcon.SCALE_TOOL,
|
||||||
CLONE_TOOL: toolIcon.CLONE_TOOL,
|
CLONE_TOOL: toolIcon.CLONE_TOOL,
|
||||||
|
@ -1271,6 +1276,9 @@
|
||||||
case "ungroupButton":
|
case "ungroupButton":
|
||||||
grouping.ungroup();
|
grouping.ungroup();
|
||||||
break;
|
break;
|
||||||
|
case "setColor":
|
||||||
|
ui.setToolColor(parameter);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
debug("ERROR: Unexpected command in onUICommand()!");
|
debug("ERROR: Unexpected command in onUICommand()!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue