|
@@ -26,13 +26,14 @@ class UIToolbar {
|
|
|
_tr("Text"),
|
|
|
_tr("Clone"),
|
|
|
_tr("Blur"),
|
|
|
+ _tr("Smudge"),
|
|
|
_tr("Particle"),
|
|
|
_tr("ColorID"),
|
|
|
_tr("Picker"),
|
|
|
_tr("Gizmo"),
|
|
|
_tr("Bake")
|
|
|
];
|
|
|
- var toolCount = [10, 2, 1, 1];
|
|
|
+ var toolCount = [11, 2, 1, 1];
|
|
|
|
|
|
public function new() {
|
|
|
inst = this;
|
|
@@ -69,6 +70,7 @@ class UIToolbar {
|
|
|
"(" + Config.keymap.tool_text + ") - " + tr("Hold {key} to use the text as a mask", ["key" => Config.keymap.decal_mask]),
|
|
|
"(" + Config.keymap.tool_clone + ") - " + tr("Hold {key} to set source", ["key" => Config.keymap.set_clone_source]),
|
|
|
"(" + Config.keymap.tool_blur + ")",
|
|
|
+ "(" + Config.keymap.tool_smudge + ")",
|
|
|
"(" + Config.keymap.tool_particle + ")",
|
|
|
"(" + Config.keymap.tool_colorid + ")",
|
|
|
"(" + Config.keymap.tool_picker + ")"
|
|
@@ -80,7 +82,7 @@ class UIToolbar {
|
|
|
var rect = Res.tile50(img, i, 0);
|
|
|
var _y = ui._y;
|
|
|
if (ui.image(img, iconAccent, null, rect.x, rect.y, rect.w, rect.h) == State.Started) Context.selectTool(i);
|
|
|
- if (i == 8 && Context.raw.colorIdPicked) {
|
|
|
+ if (i == ToolColorId && Context.raw.colorIdPicked) {
|
|
|
ui.g.drawScaledSubImage(RenderPath.active.renderTargets.get("texpaint_colorid").image, 0, 0, 1, 1, 0, _y + 1.5 * ui.SCALE(), 5 * ui.SCALE(), 34 * ui.SCALE());
|
|
|
}
|
|
|
if (ui.isHovered) ui.tooltip(tr(toolNames[i]) + " " + keys[i]);
|
|
@@ -98,7 +100,7 @@ class UIToolbar {
|
|
|
else if (UIHeader.inst.worktab.position == SpaceMaterial) {
|
|
|
ui._x += 2;
|
|
|
if (Context.raw.tool == ToolPicker) ui.fill(-1, 2, size + 2, size + 2, ui.t.HIGHLIGHT_COL);
|
|
|
- if (ui.image(img, iconAccent, null, imgw * 9, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker);
|
|
|
+ if (ui.image(img, iconAccent, null, imgw * ToolPicker, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker);
|
|
|
if (ui.isHovered) ui.tooltip(tr("Picker") + " (V)");
|
|
|
ui._x -= 2;
|
|
|
ui._y += 2;
|
|
@@ -106,14 +108,14 @@ class UIToolbar {
|
|
|
else if (UIHeader.inst.worktab.position == SpaceBake) {
|
|
|
ui._x += 2;
|
|
|
if (Context.raw.tool == ToolBake) ui.fill(-1, 2, size + 2, size + 2, ui.t.HIGHLIGHT_COL);
|
|
|
- if (ui.image(img, iconAccent, null, imgw * 11, 0, imgw, imgw) == State.Started) Context.selectTool(ToolBake);
|
|
|
+ if (ui.image(img, iconAccent, null, imgw * ToolBake, 0, imgw, imgw) == State.Started) Context.selectTool(ToolBake);
|
|
|
if (ui.isHovered) ui.tooltip(tr("Bake") + " (K)");
|
|
|
ui._x -= 2;
|
|
|
ui._y += 2;
|
|
|
|
|
|
ui._x += 2;
|
|
|
if (Context.raw.tool == ToolPicker) ui.fill(-1, 2, size + 2, size + 2, ui.t.HIGHLIGHT_COL);
|
|
|
- if (ui.image(img, iconAccent, null, imgw * 9, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker);
|
|
|
+ if (ui.image(img, iconAccent, null, imgw * ToolPicker, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker);
|
|
|
if (ui.isHovered) ui.tooltip(tr("Picker") + " (V)");
|
|
|
ui._x -= 2;
|
|
|
ui._y += 2;
|