Begin new icons

This commit is contained in:
luboslenco
2020-08-06 14:04:05 +02:00
parent 4824859498
commit 7aa59a6c19
3 changed files with 9 additions and 8 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 70 KiB

+9 -8
View File
@@ -8,7 +8,7 @@ class UIToolbar {
public static var inst: UIToolbar;
public static inline var defaultToolbarW = 54;
public static inline var defaultToolbarW = 36;
public var toolbarHandle = new Handle();
public var toolbarw = defaultToolbarW;
@@ -38,7 +38,7 @@ class UIToolbar {
var ui = UISidebar.inst.ui;
if (ui.window(toolbarHandle, 0, UIHeader.inst.headerh, toolbarw, System.windowHeight() - UIHeader.inst.headerh)) {
ui._y += 2;
ui._y += 1;
ui.imageScrollAlign = false;
var img = Res.get("icons.k");
@@ -60,8 +60,9 @@ class UIToolbar {
for (i in 0...toolCount[SpacePaint]) {
ui._x += 2;
if (Context.tool == i) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2);
if (ui.image(img, -1, null, i * imgw, 0, imgw, imgw) == State.Started) Context.selectTool(i);
if (Context.tool == i) ui.fill(-1, 2, 32 + 2, 32 + 2, ui.t.HIGHLIGHT_COL);
var rect = Res.tile50(img, i, 0);
if (ui.image(img, -1, null, rect.x, rect.y, rect.w, rect.h) == State.Started) Context.selectTool(i);
if (ui.isHovered) ui.tooltip(tr(toolNames[i]) + " " + keys[i]);
ui._x -= 2;
ui._y += 2;
@@ -69,14 +70,14 @@ class UIToolbar {
}
else if (UIHeader.inst.worktab.position == SpaceMaterial) {
ui._x += 2;
if (Context.tool == ToolGizmo) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2);
if (Context.tool == ToolGizmo) ui.fill(-1, 2, 32 + 2, 32 + 2, ui.t.HIGHLIGHT_COL);
if (ui.image(img, -1, null, imgw * 10, 0, imgw, imgw) == State.Started) Context.selectTool(ToolGizmo);
if (ui.isHovered) ui.tooltip(tr("Gizmo") + " (G)");
ui._x -= 2;
ui._y += 2;
ui._x += 2;
if (Context.tool == ToolPicker) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2);
if (Context.tool == ToolPicker) ui.fill(-1, 2, 32 + 2, 32 + 2, ui.t.HIGHLIGHT_COL);
if (ui.image(img, -1, null, imgw * 9, 0, imgw, imgw) == State.Started) Context.selectTool(ToolPicker);
if (ui.isHovered) ui.tooltip(tr("Picker") + " (V)");
ui._x -= 2;
@@ -84,7 +85,7 @@ class UIToolbar {
}
else if (UIHeader.inst.worktab.position == SpaceBake) {
ui._x += 2;
if (Context.tool == ToolBake) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2);
if (Context.tool == ToolBake) ui.fill(-1, 2, 32 + 2, 32 + 2, ui.t.HIGHLIGHT_COL);
if (ui.image(img, -1, null, imgw * 11, 0, imgw, imgw) == State.Started) Context.selectTool(ToolBake);
if (ui.isHovered) ui.tooltip(tr("Bake") + " (K)");
ui._x -= 2;
@@ -92,7 +93,7 @@ class UIToolbar {
}
else if (UIHeader.inst.worktab.position == SpaceRender) {
ui._x += 2;
if (Context.tool == ToolGizmo) ui.rect(-1, -1, 50 + 2, 50 + 2, ui.t.HIGHLIGHT_COL, 2);
if (Context.tool == ToolGizmo) ui.fill(-1, 2, 32 + 2, 32 + 2, ui.t.HIGHLIGHT_COL);
if (ui.image(img, -1, null, imgw * 10, 0, imgw, imgw) == State.Started) Context.selectTool(ToolGizmo);
if (ui.isHovered) ui.tooltip(tr("Gizmo") + " (G)");
ui._x -= 2;