mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 09:03:28 +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() {
|
||||
// Deletes current icon.
|
||||
if (iconOverlay) {
|
||||
|
@ -111,6 +115,7 @@ ToolIcon = function (side) {
|
|||
setHand: setHand,
|
||||
update: update,
|
||||
display: display,
|
||||
setColor: setColor,
|
||||
clear: clear,
|
||||
destroy: destroy
|
||||
};
|
||||
|
|
|
@ -212,6 +212,10 @@
|
|||
toolIcon.display(icon);
|
||||
}
|
||||
|
||||
function setToolColor(color) {
|
||||
toolIcon.setColor(color);
|
||||
}
|
||||
|
||||
function clearToolIcon() {
|
||||
toolIcon.clear();
|
||||
toolMenu.clearTool();
|
||||
|
@ -266,6 +270,7 @@
|
|||
return {
|
||||
setHand: setHand,
|
||||
setToolIcon: setToolIcon,
|
||||
setToolColor: setToolColor,
|
||||
clearToolIcon: clearToolIcon,
|
||||
SCALE_TOOL: toolIcon.SCALE_TOOL,
|
||||
CLONE_TOOL: toolIcon.CLONE_TOOL,
|
||||
|
@ -1271,6 +1276,9 @@
|
|||
case "ungroupButton":
|
||||
grouping.ungroup();
|
||||
break;
|
||||
case "setColor":
|
||||
ui.setToolColor(parameter);
|
||||
break;
|
||||
default:
|
||||
debug("ERROR: Unexpected command in onUICommand()!");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue