瀏覽代碼

Update zui bindings

luboslenco 1 年之前
父節點
當前提交
8bc7d1f912
共有 50 個文件被更改,包括 995 次插入348 次删除
  1. 二進制
      armorforge/Assets/default_brush.arm
  2. 二進制
      armorforge/Assets/default_material.arm
  3. 二進制
      armorlab/Assets/default_brush.arm
  4. 29 6
      armorlab/Sources/nodes/image_texture_node.ts
  5. 24 4
      armorlab/Sources/nodes/inpaint_node.ts
  6. 37 8
      armorlab/Sources/nodes/photo_to_pbr_node.ts
  7. 13 3
      armorlab/Sources/nodes/rgb_node.ts
  8. 21 4
      armorlab/Sources/nodes/text_to_photo_node.ts
  9. 24 4
      armorlab/Sources/nodes/tiling_node.ts
  10. 12 3
      armorlab/Sources/nodes/upscale_node.ts
  11. 23 4
      armorlab/Sources/nodes/variance_node.ts
  12. 二進制
      armorpaint/Assets/default_brush.arm
  13. 二進制
      armorpaint/Assets/default_material.arm
  14. 43 9
      armorpaint/Sources/nodes/brush_output_node.ts
  15. 17 4
      armorpaint/Sources/nodes/input_node.ts
  16. 29 6
      armorpaint/Sources/nodes/tex_image_node.ts
  17. 21 21
      armorpaint/Sources/tab_layers.ts
  18. 二進制
      armorsculpt/Assets/default_brush.arm
  19. 二進制
      armorsculpt/Assets/default_material.arm
  20. 3 3
      base/Sources/base.ts
  21. 4 4
      base/Sources/box_preferences.ts
  22. 1 1
      base/Sources/box_projects.ts
  23. 10 1
      base/Sources/config.ts
  24. 10 3
      base/Sources/nodes/float_node.ts
  25. 29 7
      base/Sources/nodes/math_node.ts
  26. 17 4
      base/Sources/nodes/random_node.ts
  27. 22 5
      base/Sources/nodes/separate_vector_node.ts
  28. 17 4
      base/Sources/nodes/time_node.ts
  29. 28 7
      base/Sources/nodes/vector_math_node.ts
  30. 22 5
      base/Sources/nodes/vector_node.ts
  31. 399 87
      base/Sources/nodes_material.ts
  32. 0 1
      base/Sources/parser_material.ts
  33. 5 5
      base/Sources/tab_brushes.ts
  34. 1 1
      base/Sources/tab_console.ts
  35. 5 5
      base/Sources/tab_fonts.ts
  36. 2 2
      base/Sources/tab_history.ts
  37. 9 9
      base/Sources/tab_materials.ts
  38. 1 1
      base/Sources/tab_script.ts
  39. 4 4
      base/Sources/tab_swatches.ts
  40. 5 5
      base/Sources/tab_textures.ts
  41. 21 21
      base/Sources/ui_base.ts
  42. 1 1
      base/Sources/ui_box.ts
  43. 17 17
      base/Sources/ui_files.ts
  44. 4 4
      base/Sources/ui_header.ts
  45. 17 17
      base/Sources/ui_menu.ts
  46. 6 6
      base/Sources/ui_menubar.ts
  47. 23 23
      base/Sources/ui_nodes.ts
  48. 1 1
      base/Sources/ui_status.ts
  49. 16 16
      base/Sources/ui_toolbar.ts
  50. 2 2
      base/Sources/ui_view2d.ts

二進制
armorforge/Assets/default_brush.arm


二進制
armorforge/Assets/default_material.arm


二進制
armorlab/Assets/default_brush.arm


+ 29 - 6
armorlab/Sources/nodes/image_texture_node.ts

@@ -38,7 +38,11 @@ let image_texture_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -48,7 +52,11 @@ let image_texture_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -56,21 +64,36 @@ let image_texture_node_def: zui_node_t = {
 			name: _tr("Alpha"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 1.0
+			default_value: 1.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("file"),
 			type: "ENUM",
+			output: -1,
 			default_value: 0,
-			data: ""
+			data: "",
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		},
 		{
 			name: _tr("color_space"),
 			type: "ENUM",
+			output: -1,
 			default_value: 0,
-			data: ["linear", "srgb"]
+			data: ["linear", "srgb"],
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 24 - 4
armorlab/Sources/nodes/inpaint_node.ts

@@ -194,7 +194,11 @@ let inpaint_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(1.0, 1.0, 1.0, 1.0)
+			default_value: f32_array_create_xyzw(1.0, 1.0, 1.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -204,20 +208,36 @@ let inpaint_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("auto"),
 			type: "BOOL",
+			output: 0,
 			default_value: true,
-			output: 0
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		},
 		{
 			name: "inpaint_node_buttons",
 			type: "CUSTOM",
+			output: -1,
+			default_value: null,
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
 			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 37 - 8
armorlab/Sources/nodes/photo_to_pbr_node.ts

@@ -191,7 +191,11 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -201,7 +205,11 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Base Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -209,7 +217,11 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Occlusion"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 1.0
+			default_value: 1.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -217,7 +229,11 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Roughness"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 1.0
+			default_value: 1.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -225,7 +241,11 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Metallic"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -233,7 +253,11 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Normal Map"),
 			type: "VECTOR",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -241,8 +265,13 @@ let photo_to_pbr_node_def: zui_node_t = {
 			name: _tr("Height"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 1.0
+			default_value: 1.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 13 - 3
armorlab/Sources/nodes/rgb_node.ts

@@ -50,7 +50,11 @@ let rgb_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0)
+			default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
@@ -58,7 +62,13 @@ let rgb_node_def: zui_node_t = {
 			name: _tr("default_value"),
 			type: "RGBA",
 			output: 0,
-			default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0)
+			default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0),
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 21 - 4
armorlab/Sources/nodes/text_to_photo_node.ts

@@ -265,22 +265,39 @@ let text_to_photo_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("tiling"),
 			type: "BOOL",
+			output: 0,
 			default_value: false,
-			output: 0
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		},
 		{
 			name: "text_to_photo_node_buttons",
 			type: "CUSTOM",
-			height: 1
+			output: -1,
+			default_value: null,
+			height: 1,
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		}
-	]
+	],
+	width: 0
 };
 
 let text_to_photo_node_text_input_ids: i32[] = [49406,  49407,  49407, 49407, 49407, 49407, 49407, 49407, 49407,

+ 24 - 4
armorlab/Sources/nodes/tiling_node.ts

@@ -110,7 +110,11 @@ let tiling_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -120,20 +124,36 @@ let tiling_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("auto"),
 			type: "BOOL",
+			output: 0,
 			default_value: true,
-			output: 0
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		},
 		{
 			name: "tiling_node_buttons",
 			type: "CUSTOM",
+			output: -1,
+			default_value: null,
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
 			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 12 - 3
armorlab/Sources/nodes/upscale_node.ts

@@ -138,7 +138,11 @@ let upscale_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -148,8 +152,13 @@ let upscale_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 23 - 4
armorlab/Sources/nodes/variance_node.ts

@@ -94,7 +94,11 @@ let variance_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -102,7 +106,11 @@ let variance_node_def: zui_node_t = {
 			name: _tr("Strength"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.5
+			default_value: 0.5,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -112,14 +120,25 @@ let variance_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "RGBA",
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: "variance_node_buttons",
 			type: "CUSTOM",
+			output: -1,
+			default_value: null,
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
 			height: 1
 		}
-	]
+	],
+	width: 0
 };

二進制
armorpaint/Assets/default_brush.arm


二進制
armorpaint/Assets/default_material.arm


+ 43 - 9
armorpaint/Sources/nodes/brush_output_node.ts

@@ -155,7 +155,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Position"),
 // 			type: "VECTOR",
 // 			color: 0xff63c763,
-// 			default_value: f32([0.0, 0.0, 0.0])
+// 			default_value: f32([0.0, 0.0, 0.0]),
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		},
 // 		{
 // 			id: 0,
@@ -163,7 +167,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Radius"),
 // 			type: "VALUE",
 // 			color: 0xffa1a1a1,
-// 			default_value: 1.0
+// 			default_value: 1.0,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		},
 // 		{
 // 			id: 0,
@@ -171,7 +179,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Scale"),
 // 			type: "VALUE",
 // 			color: 0xffa1a1a1,
-// 			default_value: 1.0
+// 			default_value: 1.0,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		},
 // 		{
 // 			id: 0,
@@ -179,7 +191,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Angle"),
 // 			type: "VALUE",
 // 			color: 0xffa1a1a1,
-// 			default_value: 0.0
+// 			default_value: 0.0,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		},
 // 		{
 // 			id: 0,
@@ -187,7 +203,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Opacity"),
 // 			type: "VALUE",
 // 			color: 0xffa1a1a1,
-// 			default_value: 1.0
+// 			default_value: 1.0,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		},
 // 		{
 // 			id: 0,
@@ -195,7 +215,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Hardness"),
 // 			type: "VALUE",
 // 			color: 0xffa1a1a1,
-// 			default_value: 1.0
+// 			default_value: 1.0,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		},
 // 		{
 // 			id: 0,
@@ -203,7 +227,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 			name: _tr("Stencil"),
 // 			type: "VALUE",
 // 			color: 0xffa1a1a1,
-// 			default_value: 1.0
+// 			default_value: 1.0,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			display: 0
 // 		}
 // 	],
 // 	outputs: [],
@@ -211,8 +239,14 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) {
 // 		{
 // 			name: _tr("Directional"),
 // 			type: "BOOL",
+// 			output: 0,
 // 			default_value: false,
-// 			output: 0
+//			data: null,
+//			min: 0.0,
+//			max: 1.0,
+//			precision: 100,
+//			height: 0
 // 		}
-// 	]
+// 	],
+//	width: 0
 // };

+ 17 - 4
armorpaint/Sources/nodes/input_node.ts

@@ -141,7 +141,11 @@ let input_node_def: zui_node_t = {
 			name: _tr("Lazy Radius"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -149,7 +153,11 @@ let input_node_def: zui_node_t = {
 			name: _tr("Lazy Step"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -159,8 +167,13 @@ let input_node_def: zui_node_t = {
 			name: _tr("Position"),
 			type: "VECTOR",
 			color: 0xff63c763,
-			default_value: null
+			default_value: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 29 - 6
armorpaint/Sources/nodes/tex_image_node.ts

@@ -37,7 +37,11 @@ let tex_image_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -47,7 +51,11 @@ let tex_image_node_def: zui_node_t = {
 			name: _tr("Color"),
 			type: "VALUE", // Match brush output socket type
 			color: 0xffc7c729,
-			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0)
+			default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -55,21 +63,36 @@ let tex_image_node_def: zui_node_t = {
 			name: _tr("Alpha"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 1.0
+			default_value: 1.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("file"),
 			type: "ENUM",
+			output: -1,
 			default_value: 0,
-			data: ""
+			data: "",
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		},
 		{
 			name: _tr("color_space"),
 			type: "ENUM",
+			output: -1,
 			default_value: 0,
-			data: ["linear", "srgb"]
+			data: ["linear", "srgb"],
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 21 - 21
armorpaint/Sources/tab_layers.ts

@@ -12,8 +12,8 @@ function tab_layers_draw_mini(htab: zui_handle_t) {
 	let ui: zui_t = ui_base_ui;
 	zui_set_hovered_tab_name(tr("Layers"));
 
-	let _ELEMENT_H: i32 = ui.t.ELEMENT_H;
-	ui.t.ELEMENT_H = math_floor(ui_base_sidebar_mini_w / 2 / zui_SCALE(ui));
+	let _ELEMENT_H: i32 = ui.ops.theme.ELEMENT_H;
+	ui.ops.theme.ELEMENT_H = math_floor(ui_base_sidebar_mini_w / 2 / zui_SCALE(ui));
 
 	zui_begin_sticky();
 	zui_separator(5);
@@ -28,7 +28,7 @@ function tab_layers_draw_mini(htab: zui_handle_t) {
 	tab_layers_highlight_odd_lines();
 	tab_layers_draw_slots(true);
 
-	ui.t.ELEMENT_H = _ELEMENT_H;
+	ui.ops.theme.ELEMENT_H = _ELEMENT_H;
 }
 
 function tab_layers_draw_full(htab: zui_handle_t) {
@@ -72,11 +72,11 @@ function tab_layers_draw_slots(mini: bool) {
 
 function tab_layers_highlight_odd_lines() {
 	let ui: zui_t = ui_base_ui;
-	let step: i32 = ui.t.ELEMENT_H * 2;
+	let step: i32 = ui.ops.theme.ELEMENT_H * 2;
 	let full_h: i32 = ui._window_h - ui_base_hwnds[0].scroll_offset;
 	for (let i: i32 = 0; i < math_floor(full_h / step); ++i) {
 		if (i % 2 == 0) {
-			zui_fill(0, i * step, (ui._w / zui_SCALE(ui) - 2), step, ui.t.WINDOW_BG_COL - 0x00040404);
+			zui_fill(0, i * step, (ui._w / zui_SCALE(ui) - 2), step, ui.ops.theme.WINDOW_BG_COL - 0x00040404);
 		}
 	}
 }
@@ -261,7 +261,7 @@ function tab_layers_draw_layer_slot(l: slot_layer_t, i: i32, mini: bool) {
 		return;
 	}
 
-	let step: i32 = ui.t.ELEMENT_H;
+	let step: i32 = ui.ops.theme.ELEMENT_H;
 	let checkw: f32 = (ui._window_w / 100 * 8) / zui_SCALE(ui);
 
 	// Highlight drag destination
@@ -277,14 +277,14 @@ function tab_layers_draw_layer_slot(l: slot_layer_t, i: i32, mini: bool) {
 			let nested_group: bool = slot_layer_is_group(base_drag_layer) && to_group;
 			if (!nested_group) {
 				if (slot_layer_can_move(context_raw.layer, context_raw.drag_dest)) {
-					zui_fill(checkw, step * 2, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL);
+					zui_fill(checkw, step * 2, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL);
 				}
 			}
 		}
 		else if (i == project_layers.length - 1 && mouse_y < absy + step) {
 			context_raw.drag_dest = project_layers.length - 1;
 			if (slot_layer_can_move(context_raw.layer, context_raw.drag_dest)) {
-				zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL);
+				zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL);
 			}
 		}
 	}
@@ -292,13 +292,13 @@ function tab_layers_draw_layer_slot(l: slot_layer_t, i: i32, mini: bool) {
 		if (mouse_y > absy + step && mouse_y < absy + step * 3) {
 			context_raw.drag_dest = i;
 			if (tab_layers_can_drop_new_layer(i)) {
-				zui_fill(checkw, 2 * step, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL);
+				zui_fill(checkw, 2 * step, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL);
 			}
 		}
 		else if (i == project_layers.length - 1 && mouse_y < absy + step) {
 			context_raw.drag_dest = project_layers.length;
 			if (tab_layers_can_drop_new_layer(project_layers.length)) {
-				zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL);
+				zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL);
 			}
 		}
 	}
@@ -329,7 +329,7 @@ function tab_layers_draw_layer_slot_mini(l: slot_layer_t, i: i32) {
 function tab_layers_draw_layer_slot_full(l: slot_layer_t, i: i32) {
 	let ui: zui_t = ui_base_ui;
 
-	let step: i32 = ui.t.ELEMENT_H;
+	let step: i32 = ui.ops.theme.ELEMENT_H;
 
 	let has_panel: bool = slot_layer_is_group(l) || (slot_layer_is_layer(l) && slot_layer_get_masks(l, false) != null);
 	if (has_panel) {
@@ -346,7 +346,7 @@ function tab_layers_draw_layer_slot_full(l: slot_layer_t, i: i32) {
 	ui._x += 2;
 	ui._y += 3;
 	ui._y += center;
-	let col: i32 = ui.t.ACCENT_SELECT_COL;
+	let col: i32 = ui.ops.theme.ACCENT_SELECT_COL;
 	let parent_hidden: bool = l.parent != null && (!l.parent.visible || (l.parent.parent != null && !l.parent.parent.visible));
 	if (parent_hidden) {
 		col -= 0x99000000;
@@ -553,18 +553,18 @@ function tab_layers_layer_toggle_visible(l: slot_layer_t) {
 
 function tab_layers_draw_layer_highlight(l: slot_layer_t, mini: bool) {
 	let ui: zui_t = ui_base_ui;
-	let step: i32 = ui.t.ELEMENT_H;
+	let step: i32 = ui.ops.theme.ELEMENT_H;
 
 	// Separator line
-	zui_fill(0, 0, (ui._w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.t.SEPARATOR_COL);
+	zui_fill(0, 0, (ui._w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.ops.theme.SEPARATOR_COL);
 
 	// Highlight selected
 	if (context_raw.layer == l) {
 		if (mini) {
-			zui_rect(1, -step * 2, ui._w / zui_SCALE(ui) - 1, step * 2 + (mini ? -1 : 1), ui.t.HIGHLIGHT_COL, 3);
+			zui_rect(1, -step * 2, ui._w / zui_SCALE(ui) - 1, step * 2 + (mini ? -1 : 1), ui.ops.theme.HIGHLIGHT_COL, 3);
 		}
 		else {
-			zui_rect(1, -step * 2 - 1, ui._w / zui_SCALE(ui) - 2, step * 2 + (mini ? -2 : 1), ui.t.HIGHLIGHT_COL, 2);
+			zui_rect(1, -step * 2 - 1, ui._w / zui_SCALE(ui) - 2, step * 2 + (mini ? -2 : 1), ui.ops.theme.HIGHLIGHT_COL, 2);
 		}
 	}
 }
@@ -679,11 +679,11 @@ function tab_layers_draw_layer_icon(l: slot_layer_t, i: i32, uix: f32, uiy: f32,
 		if (!is_typing) {
 			if (i < 9 && operator_shortcut(map_get(config_keymap, "select_layer"), shortcut_type_t.DOWN)) {
 				let number: string = any_to_string(i + 1) ;
-				let width: i32 = g2_font_width(ui.font, ui.font_size, number) + 10;
-				let height: i32 = g2_font_height(ui.font, ui.font_size);
-				g2_set_color(ui.t.TEXT_COL);
+				let width: i32 = g2_font_width(ui.ops.font, ui.font_size, number) + 10;
+				let height: i32 = g2_font_height(ui.ops.font, ui.font_size);
+				g2_set_color(ui.ops.theme.TEXT_COL);
 				g2_fill_rect(uix, uiy, width, height);
-				g2_set_color(ui.t.ACCENT_COL);
+				g2_set_color(ui.ops.theme.ACCENT_COL);
 				g2_draw_string(number, uix + 5, uiy);
 			}
 		}
@@ -694,7 +694,7 @@ function tab_layers_draw_layer_icon(l: slot_layer_t, i: i32, uix: f32, uiy: f32,
 		let folder_closed: rect_t = resource_tile50(icons, 2, 1);
 		let folder_open: rect_t = resource_tile50(icons, 8, 1);
 		let folder: rect_t = l.show_panel ? folder_open : folder_closed;
-		return zui_image(icons, ui.t.LABEL_COL - 0x00202020, icon_h, folder.x, folder.y, folder.w, folder.h);
+		return zui_image(icons, ui.ops.theme.LABEL_COL - 0x00202020, icon_h, folder.x, folder.y, folder.w, folder.h);
 	}
 }
 

二進制
armorsculpt/Assets/default_brush.arm


二進制
armorsculpt/Assets/default_material.arm


+ 3 - 3
base/Sources/base.ts

@@ -240,7 +240,7 @@ function base_init() {
 	zui_tr = tr;
 	base_ui_box = zui_create({ theme: base_theme, font: f, scale_factor: config_raw.window_scale, color_wheel: base_color_wheel, black_white_gradient: base_color_wheel_gradient });
 	base_ui_menu = zui_create({ theme: base_theme, font: f, scale_factor: config_raw.window_scale, color_wheel: base_color_wheel, black_white_gradient: base_color_wheel_gradient });
-	base_default_element_h = base_ui_menu.t.ELEMENT_H;
+	base_default_element_h = base_ui_menu.ops.theme.ELEMENT_H;
 
 	// Init plugins
 	if (config_raw.plugins != null) {
@@ -738,7 +738,7 @@ function base_get_drag_image(): image_t {
 		if (base_drag_file_icon != null) return base_drag_file_icon;
 		let icons: image_t = resource_get("icons.k");
 		base_drag_rect = string_index_of(base_drag_file, ".") > 0 ? resource_tile50(icons, 3, 1) : resource_tile50(icons, 2, 1);
-		base_drag_tint = ui_base_ui.t.HIGHLIGHT_COL;
+		base_drag_tint = ui_base_ui.ops.theme.HIGHLIGHT_COL;
 		return icons;
 	}
 
@@ -751,7 +751,7 @@ function base_get_drag_image(): image_t {
 		let folder_closed: rect_t = resource_tile50(icons, 2, 1);
 		let folder_open: rect_t = resource_tile50(icons, 8, 1);
 		base_drag_rect = base_drag_layer.show_panel ? folder_open : folder_closed;
-		base_drag_tint = ui_base_ui.t.LABEL_COL - 0x00202020;
+		base_drag_tint = ui_base_ui.ops.theme.LABEL_COL - 0x00202020;
 		return icons;
 	}
 	if (base_drag_layer != null && slot_layer_is_mask(base_drag_layer) && base_drag_layer.fill_layer == null) {

+ 4 - 4
base/Sources/box_preferences.ts

@@ -91,7 +91,7 @@ function box_preferences_show() {
 				ui_menu_draw(function (ui: zui_t) {
 					if (ui_menu_button(ui, tr("Confirm"))) {
 						app_notify_on_init(function () {
-							ui.t.ELEMENT_H = base_default_element_h;
+							ui.ops.theme.ELEMENT_H = base_default_element_h;
 							config_restore();
 							box_preferences_set_scale();
 							if (box_preferences_files_plugin != null) {
@@ -111,7 +111,7 @@ function box_preferences_show() {
 							let b: buffer_t = data_get_blob(path);
 							let raw: config_t = json_parse(sys_buffer_to_string(b));
 							app_notify_on_init(function (raw: config_t) {
-								ui.t.ELEMENT_H = base_default_element_h;
+								ui.ops.theme.ELEMENT_H = base_default_element_h;
 								config_import_from(raw);
 								box_preferences_set_scale();
 								make_material_parse_mesh_material();
@@ -199,7 +199,7 @@ function box_preferences_show() {
 			if (ui.is_hovered && ui.input_released) {
 				ui_menu_draw(function (ui: zui_t) {
 					ui.changed = false;
-					zui_color_wheel(h, false, null, 11 * ui.t.ELEMENT_H * zui_SCALE(ui), true);
+					zui_color_wheel(h, false, null, 11 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), true);
 					if (ui.changed) {
 						ui_menu_keep_open = true;
 					}
@@ -246,7 +246,7 @@ function box_preferences_show() {
 						h.color = theme[key];
 						ui_menu_draw(function (ui: zui_t) {
 							ui.changed = false;
-							let color: i32 = zui_color_wheel(h, false, null, 11 * ui.t.ELEMENT_H * zui_SCALE(ui), true);
+							let color: i32 = zui_color_wheel(h, false, null, 11 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), true);
 							let theme: any = base_theme;
 							theme[key] = color;
 							if (ui.changed) {

+ 1 - 1
base/Sources/box_projects.ts

@@ -118,7 +118,7 @@ function box_projects_tab(ui: zui_t) {
 
 				let uix: i32 = ui._x;
 				if (icon != null) {
-					zui_fill(0, 0, 128, 128, ui.t.SEPARATOR_COL);
+					zui_fill(0, 0, 128, 128, ui.ops.theme.SEPARATOR_COL);
 
 					let state: i32 = zui_image(icon, 0xffffffff, 128  * zui_SCALE(ui));
 					if (state == zui_state_t.RELEASED) {

+ 10 - 1
base/Sources/config.ts

@@ -267,7 +267,16 @@ function config_load_theme(theme: string, tag_redraw: bool = true) {
 	if (tag_redraw) {
 		for (let i: i32 = 0; i < base_get_uis().length; ++i) {
 			let ui: zui_t = base_get_uis()[i];
-			ui.t = base_theme;
+
+			// ui.ops.theme = base_theme;
+
+			for (let i: i32 = 0; i < zui_theme_keys.length; ++i) {
+				let key: string = zui_theme_keys[i];
+				// @ts-ignore
+				ui.ops.theme[key] = base_theme[key];
+			}
+			base_theme = ui.ops.theme;
+
 		}
 		ui_base_tag_ui_redraw();
 	}

+ 10 - 3
base/Sources/nodes/float_node.ts

@@ -67,7 +67,9 @@ let float_node_def: zui_node_t = {
 			color: 0xffa1a1a1,
 			default_value: 0.5,
 			min: 0.0,
-			max: 10.0
+			max: 10.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -77,8 +79,13 @@ let float_node_def: zui_node_t = {
 			name: _tr("Value"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.5
+			default_value: 0.5,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 29 - 7
base/Sources/nodes/math_node.ts

@@ -145,7 +145,11 @@ let math_node_def: zui_node_t = {
 			name: _tr("Value"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.5
+			default_value: 0.5,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -153,7 +157,11 @@ let math_node_def: zui_node_t = {
 			name: _tr("Value"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.5
+			default_value: 0.5,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -163,22 +171,36 @@ let math_node_def: zui_node_t = {
 			name: _tr("Value"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("operation"),
 			type: "ENUM",
-			data: ["Add", "Subtract", "Multiply", "Divide", "Power", "Logarithm", "Square Root", "Inverse Square Root", "Absolute", "Exponent", "Minimum", "Maximum", "Less Than", "Greater Than", "Sign", "Round", "Floor", "Ceil", "Truncate", "Fraction", "Modulo", "Snap", "Ping-Pong", "Sine", "Cosine", "Tangent", "Arcsine", "Arccosine", "Arctangent", "Arctan2", "Hyperbolic Sine", "Hyperbolic Cosine", "Hyperbolic Tangent", "To Radians", "To Degrees"],
+			output: 0,
 			default_value: 0,
-			output: 0
+			data: ["Add", "Subtract", "Multiply", "Divide", "Power", "Logarithm", "Square Root", "Inverse Square Root", "Absolute", "Exponent", "Minimum", "Maximum", "Less Than", "Greater Than", "Sign", "Round", "Floor", "Ceil", "Truncate", "Fraction", "Modulo", "Snap", "Ping-Pong", "Sine", "Cosine", "Tangent", "Arcsine", "Arccosine", "Arctangent", "Arctan2", "Hyperbolic Sine", "Hyperbolic Cosine", "Hyperbolic Tangent", "To Radians", "To Degrees"],
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		},
 		{
 			name: _tr("use_clamp"),
 			type: "BOOL",
+			output: 0,
 			default_value: false,
-			output: 0
+			data: null,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 17 - 4
base/Sources/nodes/random_node.ts

@@ -70,7 +70,11 @@ let random_node_def: zui_node_t = {
 			name: _tr("Min"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -78,7 +82,11 @@ let random_node_def: zui_node_t = {
 			name: _tr("Max"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 1.0
+			default_value: 1.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -88,8 +96,13 @@ let random_node_def: zui_node_t = {
 			name: _tr("Value"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.5
+			default_value: 0.5,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 22 - 5
base/Sources/nodes/separate_vector_node.ts

@@ -40,7 +40,11 @@ let separate_vector_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -50,7 +54,11 @@ let separate_vector_node_def: zui_node_t = {
 			name: _tr("X"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -58,7 +66,11 @@ let separate_vector_node_def: zui_node_t = {
 			name: _tr("Y"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -66,8 +78,13 @@ let separate_vector_node_def: zui_node_t = {
 			name: _tr("Z"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 17 - 4
base/Sources/nodes/time_node.ts

@@ -40,7 +40,11 @@ let time_node_def: zui_node_t = {
 			name: _tr("Time"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -48,7 +52,11 @@ let time_node_def: zui_node_t = {
 			name: _tr("Delta"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -56,8 +64,13 @@ let time_node_def: zui_node_t = {
 			name: _tr("Brush"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

+ 28 - 7
base/Sources/nodes/vector_math_node.ts

@@ -154,7 +154,11 @@ let vector_math_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -162,7 +166,11 @@ let vector_math_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -172,7 +180,11 @@ let vector_math_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -180,16 +192,25 @@ let vector_math_node_def: zui_node_t = {
 			name: _tr("Value"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	buttons: [
 		{
 			name: _tr("operation"),
 			type: "ENUM",
-			data: ["Add", "Subtract", "Multiply", "Divide", "Average", "Cross Product", "Project", "Reflect", "Dot Product", "Distance", "Length", "Scale", "Normalize", "Absolute", "Minimum", "Maximum", "Floor", "Ceil", "Fraction", "Modulo", "Snap", "Sine", "Cosine", "Tangent"],
+			output: 0,
 			default_value: 0,
-			output: 0
+			data: ["Add", "Subtract", "Multiply", "Divide", "Average", "Cross Product", "Project", "Reflect", "Dot Product", "Distance", "Length", "Scale", "Normalize", "Absolute", "Minimum", "Maximum", "Floor", "Ceil", "Fraction", "Modulo", "Snap", "Sine", "Cosine", "Tangent"],
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			height: 0
 		}
-	]
+	],
+	width: 0
 };

+ 22 - 5
base/Sources/nodes/vector_node.ts

@@ -70,7 +70,11 @@ let vector_node_def: zui_node_t = {
 			name: _tr("X"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -78,7 +82,11 @@ let vector_node_def: zui_node_t = {
 			name: _tr("Y"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		},
 		{
 			id: 0,
@@ -86,7 +94,11 @@ let vector_node_def: zui_node_t = {
 			name: _tr("Z"),
 			type: "VALUE",
 			color: 0xffa1a1a1,
-			default_value: 0.0
+			default_value: 0.0,
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
 	outputs: [
@@ -96,8 +108,13 @@ let vector_node_def: zui_node_t = {
 			name: _tr("Vector"),
 			type: "VECTOR",
 			color: 0xff6363c7,
-			default_value: f32_array_create_xyz(0.0, 0.0, 0.0)
+			default_value: f32_array_create_xyz(0.0, 0.0, 0.0),
+			min: 0.0,
+			max: 1.0,
+			precision: 100,
+			display: 0
 		}
 	],
-	buttons: []
+	buttons: [],
+	width: 0
 };

文件差異過大導致無法顯示
+ 399 - 87
base/Sources/nodes_material.ts


+ 0 - 1
base/Sources/parser_material.ts

@@ -128,7 +128,6 @@ function parser_material_init() {
 }
 
 function parser_material_parse(canvas: zui_node_canvas_t, _con: node_shader_context_t, _vert: node_shader_t, _frag: node_shader_t, _matcon: material_context_t): shader_out_t {
-	zui_nodes_update_canvas_format(canvas);
 	parser_material_init();
 	parser_material_canvases = [canvas];
 	parser_material_nodes = canvas.nodes;

+ 5 - 5
base/Sources/tab_brushes.ts

@@ -52,16 +52,16 @@ function tab_brushes_draw(htab: zui_handle_t) {
 				let img_full: image_t = project_brushes[i].image;
 
 				if (context_raw.brush == project_brushes[i]) {
-					// Zui.fill(1, -2, img.width + 3, img.height + 3, ui.t.HIGHLIGHT_COL); // TODO
+					// Zui.fill(1, -2, img.width + 3, img.height + 3, ui.ops.theme.HIGHLIGHT_COL); // TODO
 					let off: i32 = row % 2 == 1 ? 1 : 0;
 					let w: i32 = 50;
 					if (config_raw.window_scale > 1) {
 						w += math_floor(config_raw.window_scale * 2);
 					}
-					zui_fill(-1,         -2, w + 3,       2, ui.t.HIGHLIGHT_COL);
-					zui_fill(-1,    w - off, w + 3, 2 + off, ui.t.HIGHLIGHT_COL);
-					zui_fill(-1,         -2,     2,   w + 3, ui.t.HIGHLIGHT_COL);
-					zui_fill(w + 1,      -2,     2,   w + 4, ui.t.HIGHLIGHT_COL);
+					zui_fill(-1,         -2, w + 3,       2, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(-1,    w - off, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(-1,         -2,     2,   w + 3, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(w + 1,      -2,     2,   w + 4, ui.ops.theme.HIGHLIGHT_COL);
 				}
 
 				let uix: f32 = ui._x;

+ 1 - 1
base/Sources/tab_console.ts

@@ -51,7 +51,7 @@ function tab_console_draw(htab: zui_handle_t) {
 
 		zui_end_sticky();
 
-		let _font: g2_font_t = ui.font;
+		let _font: g2_font_t = ui.ops.font;
 		let _fontSize: i32 = ui.font_size;
 		let f: g2_font_t = data_get_font("font_mono.ttf");
 		zui_set_font(ui, f);

+ 5 - 5
base/Sources/tab_fonts.ts

@@ -60,16 +60,16 @@ function tab_fonts_draw(htab: zui_handle_t) {
 				let img: image_t = project_fonts[i].image;
 
 				if (context_raw.font == project_fonts[i]) {
-					// Zui.fill(1, -2, img.width + 3, img.height + 3, ui.t.HIGHLIGHT_COL); // TODO
+					// Zui.fill(1, -2, img.width + 3, img.height + 3, ui.ops.theme.HIGHLIGHT_COL); // TODO
 					let off: i32 = row % 2 == 1 ? 1 : 0;
 					let w: i32 = 50;
 					if (config_raw.window_scale > 1) {
 						w += math_floor(config_raw.window_scale * 2);
 					}
-					zui_fill(-1,         -2, w + 3,       2, ui.t.HIGHLIGHT_COL);
-					zui_fill(-1,    w - off, w + 3, 2 + off, ui.t.HIGHLIGHT_COL);
-					zui_fill(-1,         -2,     2,   w + 3, ui.t.HIGHLIGHT_COL);
-					zui_fill(w + 1,      -2,     2,   w + 4, ui.t.HIGHLIGHT_COL);
+					zui_fill(-1,         -2, w + 3,       2, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(-1,    w - off, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(-1,         -2,     2,   w + 3, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(w + 1,      -2,     2,   w + 4, ui.ops.theme.HIGHLIGHT_COL);
 				}
 
 				let uix: f32 = ui._x;

+ 2 - 2
base/Sources/tab_history.ts

@@ -7,7 +7,7 @@ function tab_history_draw(htab: zui_handle_t) {
 		for (let i: i32 = 0; i < history_steps.length; ++i) {
 			let active: i32 = history_steps.length - 1 - history_redos;
 			if (i == active) {
-				zui_fill(0, 0, ui._window_w, ui.t.ELEMENT_H, ui.t.HIGHLIGHT_COL);
+				zui_fill(0, 0, ui._window_w, ui.ops.theme.ELEMENT_H, ui.ops.theme.HIGHLIGHT_COL);
 			}
 			zui_text(history_steps[i].name);
 			if (ui.is_released) { // Jump to undo step
@@ -21,7 +21,7 @@ function tab_history_draw(htab: zui_handle_t) {
 					history_undo();
 				}
 			}
-			zui_fill(0, 0, (ui._window_w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.t.SEPARATOR_COL);
+			zui_fill(0, 0, (ui._window_w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.ops.theme.SEPARATOR_COL);
 		}
 	}
 }

+ 9 - 9
base/Sources/tab_materials.ts

@@ -85,7 +85,7 @@ function tab_materials_draw_slots(mini: bool) {
 			if (context_raw.material == project_materials[i]) {
 				if (mini) {
 					let w: f32 = ui._w / zui_SCALE(ui);
-					zui_rect(0, -2, w - 2, w - 4, ui.t.HIGHLIGHT_COL, 3);
+					zui_rect(0, -2, w - 2, w - 4, ui.ops.theme.HIGHLIGHT_COL, 3);
 				}
 				else {
 					let off: i32 = row % 2 == 1 ? 1 : 0;
@@ -93,10 +93,10 @@ function tab_materials_draw_slots(mini: bool) {
 					if (config_raw.window_scale > 1) {
 						w += math_floor(config_raw.window_scale * 2);
 					}
-					zui_fill(-1,         -2, w + 3,       2, ui.t.HIGHLIGHT_COL);
-					zui_fill(-1,    w - off, w + 3, 2 + off, ui.t.HIGHLIGHT_COL);
-					zui_fill(-1,         -2,     2,   w + 3, ui.t.HIGHLIGHT_COL);
-					zui_fill(w + 1,      -2,     2,   w + 4, ui.t.HIGHLIGHT_COL);
+					zui_fill(-1,         -2, w + 3,       2, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(-1,    w - off, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(-1,         -2,     2,   w + 3, ui.ops.theme.HIGHLIGHT_COL);
+					zui_fill(w + 1,      -2,     2,   w + 4, ui.ops.theme.HIGHLIGHT_COL);
 				}
 			}
 
@@ -118,11 +118,11 @@ function tab_materials_draw_slots(mini: bool) {
 			if (!is_typing) {
 				if (i < 9 && operator_shortcut(map_get(config_keymap, "select_material"), shortcut_type_t.DOWN)) {
 					let number: string = any_to_string(i + 1);
-					let width: i32 = g2_font_width(ui.font, ui.font_size, number) + 10;
-					let height: i32 = g2_font_height(ui.font, ui.font_size);
-					g2_set_color(ui.t.TEXT_COL);
+					let width: i32 = g2_font_width(ui.ops.font, ui.font_size, number) + 10;
+					let height: i32 = g2_font_height(ui.ops.font, ui.font_size);
+					g2_set_color(ui.ops.theme.TEXT_COL);
 					g2_fill_rect(uix, uiy, width, height);
-					g2_set_color(ui.t.ACCENT_COL);
+					g2_set_color(ui.ops.theme.ACCENT_COL);
 					g2_draw_string(number, uix + 5, uiy);
 				}
 			}

+ 1 - 1
base/Sources/tab_script.ts

@@ -43,7 +43,7 @@ function tab_script_draw(htab: zui_handle_t) {
 		}
 		zui_end_sticky();
 
-		let _font: g2_font_t = ui.font;
+		let _font: g2_font_t = ui.ops.font;
 		let _font_size: i32 = ui.font_size;
 		let f: g2_font_t = data_get_font("font_mono.ttf");
 		zui_set_font(ui, f);

+ 4 - 4
base/Sources/tab_swatches.ts

@@ -106,7 +106,7 @@ function tab_swatches_draw(htab: zui_handle_t) {
 
 				if (context_raw.swatch == project_raw.swatches[i]) {
 					let w: i32 = 32;
-					zui_fill(-2, -2, w, w, ui.t.HIGHLIGHT_COL);
+					zui_fill(-2, -2, w, w, ui.ops.theme.HIGHLIGHT_COL);
 				}
 
 				uix = ui._x;
@@ -114,7 +114,7 @@ function tab_swatches_draw(htab: zui_handle_t) {
 
 				// Draw the drag position indicator
 				if (base_drag_swatch != null && tab_swatches_drag_pos == i) {
-					zui_fill(-1, -2 , 2, 32, ui.t.HIGHLIGHT_COL);
+					zui_fill(-1, -2 , 2, 32, ui.ops.theme.HIGHLIGHT_COL);
 				}
 
 				let state: zui_state_t = zui_image(tab_swatches_empty_get(), project_raw.swatches[i].base, slotw);
@@ -140,7 +140,7 @@ function tab_swatches_draw(htab: zui_handle_t) {
 							let h: zui_handle_t = zui_handle(__ID__);
 							h.color = context_raw.swatch.base;
 
-							context_raw.swatch.base = zui_color_wheel(h, false, null, 11 * ui.t.ELEMENT_H * zui_SCALE(ui), true, function () {
+							context_raw.swatch.base = zui_color_wheel(h, false, null, 11 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), true, function () {
 								context_raw.color_picker_previous_tool = context_raw.tool;
 								context_select_tool(workspace_tool_t.PICKER);
 
@@ -243,7 +243,7 @@ function tab_swatches_draw(htab: zui_handle_t) {
 		if (base_drag_swatch != null && tab_swatches_drag_pos == project_raw.swatches.length) {
 			ui._x = uix; // Reset the position because otherwise it would start in the row below
 			ui._y = uiy;
-			zui_fill(28, -2, 2, 32, ui.t.HIGHLIGHT_COL);
+			zui_fill(28, -2, 2, 32, ui.ops.theme.HIGHLIGHT_COL);
 		}
 
 		// Currently there is no valid dragPosition so reset it

+ 5 - 5
base/Sources/tab_textures.ts

@@ -95,10 +95,10 @@ function tab_textures_draw(htab: zui_handle_t) {
 						ui._y = uiy;
 						let off: i32 = i % 2 == 1 ? 1 : 0;
 						let w: i32 = 50;
-						zui_fill(0,               0, w + 3,       2, ui.t.HIGHLIGHT_COL);
-						zui_fill(0,     w - off + 2, w + 3, 2 + off, ui.t.HIGHLIGHT_COL);
-						zui_fill(0,               0,     2,   w + 3, ui.t.HIGHLIGHT_COL);
-						zui_fill(w + 2,           0,     2,   w + 4, ui.t.HIGHLIGHT_COL);
+						zui_fill(0,               0, w + 3,       2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(0,     w - off + 2, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(0,               0,     2,   w + 3, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(w + 2,           0,     2,   w + 4, ui.ops.theme.HIGHLIGHT_COL);
 						ui._x = _uix;
 						ui._y = _uiy;
 					}
@@ -223,7 +223,7 @@ function tab_textures_draw(htab: zui_handle_t) {
 		else {
 			let img: image_t = resource_get("icons.k");
 			let r: rect_t = resource_tile50(img, 0, 1);
-			zui_image(img, ui.t.BUTTON_COL, r.h, r.x, r.y, r.w, r.h);
+			zui_image(img, ui.ops.theme.BUTTON_COL, r.h, r.x, r.y, r.w, r.h);
 			if (ui.is_hovered) {
 				zui_tooltip(tr("Drag and drop files here"));
 			}

+ 21 - 21
base/Sources/ui_base.ts

@@ -611,7 +611,7 @@ function ui_base_update() {
 				ui_menu_draw(function (ui: zui_t) {
 					let mode_handle: zui_handle_t = zui_handle(__ID__);
 					mode_handle.position = context_raw.viewport_mode;
-					zui_text(tr("Viewport Mode"), zui_align_t.RIGHT, ui.t.HIGHLIGHT_COL);
+					zui_text(tr("Viewport Mode"), zui_align_t.RIGHT, ui.ops.theme.HIGHLIGHT_COL);
 					let modes: string[] = [
 						tr("Lit"),
 						tr("Base Color"),
@@ -863,7 +863,7 @@ function ui_base_operator_search() {
 	ui_menu_draw(function (ui: zui_t) {
 		let search_handle: zui_handle_t = zui_handle(__ID__);
 
-		zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.t.ELEMENT_H * 8, ui.t.SEPARATOR_COL);
+		zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.ops.theme.ELEMENT_H * 8, ui.ops.theme.SEPARATOR_COL);
 		let search: string = zui_text_input(search_handle, "", zui_align_t.LEFT, true, true);
 		ui.changed = false;
 		if (_ui_base_operator_search_first) {
@@ -886,13 +886,13 @@ function ui_base_operator_search() {
 		}
 		let enter: bool = keyboard_down("enter");
 		let count: i32 = 0;
-		let BUTTON_COL: i32 = ui.t.BUTTON_COL;
+		let BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL;
 
 		let keys: string[] = map_keys_to_array(config_keymap);
 		for (let i: i32 = 0; i < keys.length; ++i) {
 			let n: string = keys[i];
 			if (string_index_of(n, search) >= 0) {
-				ui.t.BUTTON_COL = count == ui_base_operator_search_offset ? ui.t.HIGHLIGHT_COL : ui.t.SEPARATOR_COL;
+				ui.ops.theme.BUTTON_COL = count == ui_base_operator_search_offset ? ui.ops.theme.HIGHLIGHT_COL : ui.ops.theme.SEPARATOR_COL;
 				if (zui_button(n, zui_align_t.LEFT, map_get(config_keymap, n)) || (enter && count == ui_base_operator_search_offset)) {
 					if (enter) {
 						ui.changed = true;
@@ -910,7 +910,7 @@ function ui_base_operator_search() {
 			ui.changed = true;
 			search_handle.text = "";
 		}
-		ui.t.BUTTON_COL = BUTTON_COL;
+		ui.ops.theme.BUTTON_COL = BUTTON_COL;
 	}, 8, -1, -1);
 }
 
@@ -1318,9 +1318,9 @@ function ui_base_draw_sidebar() {
 	let expand_button_offset: i32 = config_raw.touch_ui ? math_floor(zui_ELEMENT_H(ui_base_ui) + zui_ELEMENT_OFFSET(ui_base_ui)) : 0;
 	ui_base_tabx = sys_width() - config_raw.layout[layout_size_t.SIDEBAR_W];
 
-	let _SCROLL_W: i32 = ui_base_ui.t.SCROLL_W;
+	let _SCROLL_W: i32 = ui_base_ui.ops.theme.SCROLL_W;
 	if (mini) {
-		ui_base_ui.t.SCROLL_W = ui_base_ui.t.SCROLL_MINI_W;
+		ui_base_ui.ops.theme.SCROLL_W = ui_base_ui.ops.theme.SCROLL_MINI_W;
 	}
 
 	if (zui_window(ui_base_hwnds[tab_area_t.SIDEBAR0], ui_base_tabx, 0, config_raw.layout[layout_size_t.SIDEBAR_W], config_raw.layout[layout_size_t.SIDEBAR_H0])) {
@@ -1335,7 +1335,7 @@ function ui_base_draw_sidebar() {
 	}
 
 	zui_end_window();
-	ui_base_ui.t.SCROLL_W = _SCROLL_W;
+	ui_base_ui.ops.theme.SCROLL_W = _SCROLL_W;
 
 	// Collapse / expand button for mini sidebar
 	if (config_raw.touch_ui) {
@@ -1343,34 +1343,34 @@ function ui_base_draw_sidebar() {
 		let height: i32 = math_floor(zui_ELEMENT_H(ui_base_ui) + zui_ELEMENT_OFFSET(ui_base_ui));
 		if (zui_window(zui_handle(__ID__), sys_width() - width, sys_height() - height, width, height + 1)) {
 			ui_base_ui._w = width;
-			let _BUTTON_H: i32 = ui_base_ui.t.BUTTON_H;
-			let _BUTTON_COL: i32 = ui_base_ui.t.BUTTON_COL;
-			ui_base_ui.t.BUTTON_H = ui_base_ui.t.ELEMENT_H;
-			ui_base_ui.t.BUTTON_COL = ui_base_ui.t.WINDOW_BG_COL;
+			let _BUTTON_H: i32 = ui_base_ui.ops.theme.BUTTON_H;
+			let _BUTTON_COL: i32 = ui_base_ui.ops.theme.BUTTON_COL;
+			ui_base_ui.ops.theme.BUTTON_H = ui_base_ui.ops.theme.ELEMENT_H;
+			ui_base_ui.ops.theme.BUTTON_COL = ui_base_ui.ops.theme.WINDOW_BG_COL;
 			if (zui_button(mini ? "<<" : ">>")) {
 				config_raw.layout[layout_size_t.SIDEBAR_W] = mini ? ui_base_default_sidebar_full_w : ui_base_default_sidebar_mini_w;
 				config_raw.layout[layout_size_t.SIDEBAR_W] = math_floor(config_raw.layout[layout_size_t.SIDEBAR_W] * zui_SCALE(ui_base_ui));
 			}
-			ui_base_ui.t.BUTTON_H = _BUTTON_H;
-			ui_base_ui.t.BUTTON_COL = _BUTTON_COL;
+			ui_base_ui.ops.theme.BUTTON_H = _BUTTON_H;
+			ui_base_ui.ops.theme.BUTTON_COL = _BUTTON_COL;
 		}
 	}
 
 	// Expand button
 	if (config_raw.layout[layout_size_t.SIDEBAR_W] == 0) {
-		let width: i32 = math_floor(g2_font_width(ui_base_ui.font, ui_base_ui.font_size, "<<") + 25 * zui_SCALE(ui_base_ui));
+		let width: i32 = math_floor(g2_font_width(ui_base_ui.ops.font, ui_base_ui.font_size, "<<") + 25 * zui_SCALE(ui_base_ui));
 		if (zui_window(ui_base_hminimized, sys_width() - width, 0, width, math_floor(zui_ELEMENT_H(ui_base_ui) + zui_ELEMENT_OFFSET(ui_base_ui) + 1))) {
 			ui_base_ui._w = width;
-			let _BUTTON_H: i32 = ui_base_ui.t.BUTTON_H;
-			let _BUTTON_COL: i32 = ui_base_ui.t.BUTTON_COL;
-			ui_base_ui.t.BUTTON_H = ui_base_ui.t.ELEMENT_H;
-			ui_base_ui.t.BUTTON_COL = ui_base_ui.t.SEPARATOR_COL;
+			let _BUTTON_H: i32 = ui_base_ui.ops.theme.BUTTON_H;
+			let _BUTTON_COL: i32 = ui_base_ui.ops.theme.BUTTON_COL;
+			ui_base_ui.ops.theme.BUTTON_H = ui_base_ui.ops.theme.ELEMENT_H;
+			ui_base_ui.ops.theme.BUTTON_COL = ui_base_ui.ops.theme.SEPARATOR_COL;
 
 			if (zui_button("<<")) {
 				config_raw.layout[layout_size_t.SIDEBAR_W] = context_raw.maximized_sidebar_width != 0 ? context_raw.maximized_sidebar_width : math_floor(ui_base_default_sidebar_w * config_raw.window_scale);
 			}
-			ui_base_ui.t.BUTTON_H = _BUTTON_H;
-			ui_base_ui.t.BUTTON_COL = _BUTTON_COL;
+			ui_base_ui.ops.theme.BUTTON_H = _BUTTON_H;
+			ui_base_ui.ops.theme.BUTTON_COL = _BUTTON_COL;
 		}
 	}
 	else if (ui_base_htabs[tab_area_t.SIDEBAR0].changed && ui_base_htabs[tab_area_t.SIDEBAR0].position == context_raw.last_htab0_pos) {

+ 1 - 1
base/Sources/ui_box.ts

@@ -187,7 +187,7 @@ function ui_box_window_border(ui: zui_t) {
 		g2_disable_scissor();
 	}
 	// Border
-	g2_set_color(ui.t.SEPARATOR_COL);
+	g2_set_color(ui.ops.theme.SEPARATOR_COL);
 	g2_fill_rect(0, 0, 1, ui._window_h);
 	g2_fill_rect(0 + ui._window_w - 1, 0, 1, ui._window_h);
 	g2_fill_rect(0, 0 + ui._window_h - 1, ui._window_w, 1);

+ 17 - 17
base/Sources/ui_files.ts

@@ -157,8 +157,8 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo
 			let _x: f32 = ui._x;
 
 			let rect: rect_t = string_index_of(f, ".") > 0 ? file : folder;
-			let col: i32 = rect == file ? ui.t.LABEL_COL : ui.t.LABEL_COL - 0x00202020;
-			if (ui_files_selected == i) col = ui.t.HIGHLIGHT_COL;
+			let col: i32 = rect == file ? ui.ops.theme.LABEL_COL : ui.ops.theme.LABEL_COL - 0x00202020;
+			if (ui_files_selected == i) col = ui.ops.theme.HIGHLIGHT_COL;
 
 			let off: f32 = ui._w / 2 - 25 * zui_SCALE(ui);
 			ui._x += off;
@@ -221,10 +221,10 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo
 				if (icon != null) {
 					let w: i32 = 50;
 					if (i == ui_files_selected) {
-						zui_fill(-2,        -2, w + 4,     2, ui.t.HIGHLIGHT_COL);
-						zui_fill(-2,     w + 2, w + 4,     2, ui.t.HIGHLIGHT_COL);
-						zui_fill(-2,         0,     2, w + 4, ui.t.HIGHLIGHT_COL);
-						zui_fill(w + 2 ,    -2,     2, w + 6, ui.t.HIGHLIGHT_COL);
+						zui_fill(-2,        -2, w + 4,     2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(-2,     w + 2, w + 4,     2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(-2,         0,     2, w + 4, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(w + 2 ,    -2,     2, w + 6, ui.ops.theme.HIGHLIGHT_COL);
 					}
 					state = zui_image(icon, 0xffffffff, w * zui_SCALE(ui));
 					if (ui.is_hovered) {
@@ -279,10 +279,10 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo
 				if (icon != null) {
 					let w: i32 = 50;
 					if (i == ui_files_selected) {
-						zui_fill(-2,        -2, w + 4,     2, ui.t.HIGHLIGHT_COL);
-						zui_fill(-2,     w + 2, w + 4,     2, ui.t.HIGHLIGHT_COL);
-						zui_fill(-2,         0,     2, w + 4, ui.t.HIGHLIGHT_COL);
-						zui_fill(w + 2 ,    -2,     2, w + 6, ui.t.HIGHLIGHT_COL);
+						zui_fill(-2,        -2, w + 4,     2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(-2,     w + 2, w + 4,     2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(-2,         0,     2, w + 4, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(w + 2 ,    -2,     2, w + 6, ui.ops.theme.HIGHLIGHT_COL);
 					}
 					state = zui_image(icon, 0xffffffff, w * zui_SCALE(ui));
 					if (ui.is_hovered) {
@@ -327,10 +327,10 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo
 				}
 				if (icon != null) {
 					if (i == ui_files_selected) {
-						zui_fill(-2,        -2, w + 4,     2, ui.t.HIGHLIGHT_COL);
-						zui_fill(-2,     w + 2, w + 4,     2, ui.t.HIGHLIGHT_COL);
-						zui_fill(-2,         0,     2, w + 4, ui.t.HIGHLIGHT_COL);
-						zui_fill(w + 2 ,    -2,     2, w + 6, ui.t.HIGHLIGHT_COL);
+						zui_fill(-2,        -2, w + 4,     2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(-2,     w + 2, w + 4,     2, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(-2,         0,     2, w + 4, ui.ops.theme.HIGHLIGHT_COL);
+						zui_fill(w + 2 ,    -2,     2, w + 6, ui.ops.theme.HIGHLIGHT_COL);
 					}
 					state = zui_image(icon, 0xffffffff, icon.height * zui_SCALE(ui));
 					generic = false;
@@ -391,7 +391,7 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo
 			ui._y += slotw * 0.75;
 			let label0: string = (ui_files_show_extensions || string_index_of(f, ".") <= 0) ? f : substring(f, 0, string_last_index_of(f, "."));
 			let label1: string = "";
-			while (label0.length > 0 && g2_font_width(ui.font, ui.font_size, label0) > ui._w - 6) { // 2 line split
+			while (label0.length > 0 && g2_font_width(ui.ops.font, ui.font_size, label0) > ui._w - 6) { // 2 line split
 				label1 = char_at(label0, label0.length - 1) + label1;
 				label0 = substring(label0, 0, label0.length - 1);
 			}
@@ -404,12 +404,12 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo
 			}
 			if (label1 != "") { // Second line
 				ui._x = _x;
-				ui._y += g2_font_height(ui.font, ui.font_size);
+				ui._y += g2_font_height(ui.ops.font, ui.font_size);
 				zui_text(label1, zui_align_t.CENTER);
 				if (ui.is_hovered) {
 					zui_tooltip(label0 + label1);
 				}
-				ui._y -= g2_font_height(ui.font, ui.font_size);
+				ui._y -= g2_font_height(ui.ops.font, ui.font_size);
 			}
 
 			ui._y -= slotw * 0.75;

+ 4 - 4
base/Sources/ui_header.ts

@@ -146,9 +146,9 @@ function ui_header_draw_tool_properties(ui: zui_t) {
 		if (ui.is_hovered && ui.input_released) {
 			_ui_header_draw_tool_properties_h = h;
 			ui_menu_draw(function (ui: zui_t) {
-				zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.t.ELEMENT_H * 9, ui.t.SEPARATOR_COL);
+				zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.ops.theme.ELEMENT_H * 9, ui.ops.theme.SEPARATOR_COL);
 				ui.changed = false;
-				zui_color_wheel(_ui_header_draw_tool_properties_h, false, null, 10 * ui.t.ELEMENT_H * zui_SCALE(ui), false);
+				zui_color_wheel(_ui_header_draw_tool_properties_h, false, null, 10 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), false);
 				if (ui.changed) {
 					ui_menu_keep_open = true;
 				}
@@ -266,9 +266,9 @@ function ui_header_draw_tool_properties(ui: zui_t) {
 			let progress: f32 = render_path_raytrace_bake_current_sample / context_raw.bake_samples;
 			if (progress > 1.0) progress = 1.0;
 			// Progress bar
-			g2_set_color(ui.t.SEPARATOR_COL);
+			g2_set_color(ui.ops.theme.SEPARATOR_COL);
 			zui_draw_rect(true, ui._x + 1, ui._y, ui._w - 2, zui_ELEMENT_H(ui));
-			g2_set_color(ui.t.HIGHLIGHT_COL);
+			g2_set_color(ui.ops.theme.HIGHLIGHT_COL);
 			zui_draw_rect(true, ui._x + 1, ui._y, (ui._w - 2) * progress, zui_ELEMENT_H(ui));
 			g2_set_color(0xffffffff);
 			zui_text(tr("Samples") + ": " + render_path_raytrace_bake_current_sample);

+ 17 - 17
base/Sources/ui_menu.ts

@@ -16,19 +16,19 @@ let _ui_menu_render_msg: string;
 function ui_menu_render() {
 	let ui: zui_t = base_ui_menu;
 	let menu_w: i32 = ui_menu_commands != null ? math_floor(base_default_element_w * zui_SCALE(base_ui_menu) * 2.3) : math_floor(zui_ELEMENT_W(ui) * 2.3);
-	let _BUTTON_COL: i32 = ui.t.BUTTON_COL;
-	ui.t.BUTTON_COL = ui.t.SEPARATOR_COL;
-	let _ELEMENT_OFFSET: i32 = ui.t.ELEMENT_OFFSET;
-	ui.t.ELEMENT_OFFSET = 0;
-	let _ELEMENT_H: i32 = ui.t.ELEMENT_H;
-	ui.t.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28;
+	let _BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL;
+	ui.ops.theme.BUTTON_COL = ui.ops.theme.SEPARATOR_COL;
+	let _ELEMENT_OFFSET: i32 = ui.ops.theme.ELEMENT_OFFSET;
+	ui.ops.theme.ELEMENT_OFFSET = 0;
+	let _ELEMENT_H: i32 = ui.ops.theme.ELEMENT_H;
+	ui.ops.theme.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28;
 
 	zui_begin_region(ui, ui_menu_x, ui_menu_y, menu_w);
 
 	if (ui_menu_commands != null) {
-		g2_set_color(ui.t.ACCENT_SELECT_COL);
+		g2_set_color(ui.ops.theme.ACCENT_SELECT_COL);
 		zui_draw_rect(true, ui._x + -1, ui._y + -1, ui._w + 2, zui_ELEMENT_H(ui) * ui_menu_elements + 2);
-		g2_set_color(ui.t.SEPARATOR_COL);
+		g2_set_color(ui.ops.theme.SEPARATOR_COL);
 		zui_draw_rect(true, ui._x + 0, ui._y + 0, ui._w, zui_ELEMENT_H(ui) * ui_menu_elements);
 		g2_set_color(0xffffffff);
 
@@ -598,9 +598,9 @@ function ui_menu_render() {
 	ui_menu_show_first = false;
 	ui_menu_keep_open = false;
 
-	ui.t.BUTTON_COL = _BUTTON_COL;
-	ui.t.ELEMENT_OFFSET = _ELEMENT_OFFSET;
-	ui.t.ELEMENT_H = _ELEMENT_H;
+	ui.ops.theme.BUTTON_COL = _BUTTON_COL;
+	ui.ops.theme.ELEMENT_OFFSET = _ELEMENT_OFFSET;
+	ui.ops.theme.ELEMENT_H = _ELEMENT_H;
 	zui_end_region();
 
 	if (ui_menu_hide_flag) {
@@ -636,7 +636,7 @@ function ui_menu_fit_to_screen() {
 			ui_menu_x = math_floor(sys_width() - menu_w);
 		}
 	}
-	let menu_h: f32 = math_floor(ui_menu_elements * 30 * zui_SCALE(base_ui_menu)); // ui.t.ELEMENT_H
+	let menu_h: f32 = math_floor(ui_menu_elements * 30 * zui_SCALE(base_ui_menu)); // ui.ops.theme.ELEMENT_H
 	if (ui_menu_y + menu_h > sys_height()) {
 		if (ui_menu_y - menu_h > 0) {
 			ui_menu_y = math_floor(ui_menu_y - menu_h);
@@ -649,9 +649,9 @@ function ui_menu_fit_to_screen() {
 }
 
 function ui_menu_fill(ui: zui_t) {
-	g2_set_color(ui.t.ACCENT_SELECT_COL);
+	g2_set_color(ui.ops.theme.ACCENT_SELECT_COL);
 	g2_fill_rect(ui._x - 1, ui._y, ui._w + 2, zui_ELEMENT_H(ui) + 1 + 1);
-	g2_set_color(ui.t.SEPARATOR_COL);
+	g2_set_color(ui.ops.theme.SEPARATOR_COL);
 	g2_fill_rect(ui._x, ui._y, ui._w, zui_ELEMENT_H(ui) + 1);
 	g2_set_color(0xffffffff);
 }
@@ -659,10 +659,10 @@ function ui_menu_fill(ui: zui_t) {
 function ui_menu_separator(ui: zui_t) {
 	ui._y++;
 	if (config_raw.touch_ui) {
-		zui_fill(0, 0, ui._w / zui_SCALE(ui), 1, ui.t.ACCENT_SELECT_COL);
+		zui_fill(0, 0, ui._w / zui_SCALE(ui), 1, ui.ops.theme.ACCENT_SELECT_COL);
 	}
 	else {
-		zui_fill(26, 0, ui._w / zui_SCALE(ui) - 26, 1, ui.t.ACCENT_SELECT_COL);
+		zui_fill(26, 0, ui._w / zui_SCALE(ui) - 26, 1, ui.ops.theme.ACCENT_SELECT_COL);
 	}
 }
 
@@ -688,7 +688,7 @@ function ui_menu_align(ui: zui_t) {
 
 function ui_menu_start(ui: zui_t) {
 	// Draw top border
-	g2_set_color(ui.t.ACCENT_SELECT_COL);
+	g2_set_color(ui.ops.theme.ACCENT_SELECT_COL);
 	if (config_raw.touch_ui) {
 		g2_fill_rect(ui._x + ui._w / 2 + ui_menu_category_w / 2, ui._y - 1, ui._w / 2 - ui_menu_category_w / 2 + 1, 1);
 		g2_fill_rect(ui._x - 1, ui._y - 1, ui._w / 2 - ui_menu_category_w / 2 + 1, 1);

+ 6 - 6
base/Sources/ui_menubar.ts

@@ -56,25 +56,25 @@ function ui_menubar_render_ui() {
 			///end
 			let size: i32 = math_floor(ui._w / zui_SCALE(ui));
 			if (ui_menu_show && ui_menu_category == menu_category_t.VIEWPORT) {
-				zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL);
+				zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL);
 			}
 			if (ui_menubar_icon_button(ui, 8, 2)) {
 				ui_menubar_show_menu(ui, menu_category_t.VIEWPORT);
 			}
 			if (ui_menu_show && ui_menu_category == menu_category_t.MODE) {
-				zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL);
+				zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL);
 			}
 			if (ui_menubar_icon_button(ui, 9, 2)) {
 				ui_menubar_show_menu(ui, menu_category_t.MODE);
 			}
 			if (ui_menu_show && ui_menu_category == menu_category_t.CAMERA) {
-				zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL);
+				zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL);
 			}
 			if (ui_menubar_icon_button(ui, 10, 2)) {
 				ui_menubar_show_menu(ui, menu_category_t.CAMERA);
 			}
 			if (ui_menu_show && ui_menu_category == menu_category_t.HELP) {
-				zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL);
+				zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL);
 			}
 			if (ui_menubar_icon_button(ui, 11, 2)) {
 				ui_menubar_show_menu(ui, menu_category_t.HELP);
@@ -124,7 +124,7 @@ function ui_menubar_render_ui() {
 			zui_tab(ui_header_worktab, tr("3D View"));
 		}
 		else {
-			zui_fill(0, 0, ui._window_w, ui._window_h + 4, ui.t.SEPARATOR_COL);
+			zui_fill(0, 0, ui._window_w, ui._window_h + 4, ui.ops.theme.SEPARATOR_COL);
 		}
 
 		///if is_lab
@@ -198,7 +198,7 @@ function ui_menubar_show_menu(ui: zui_t, category: i32) {
 }
 
 function ui_menubar_icon_button(ui: zui_t, i: i32, j: i32): bool {
-	let col: i32 = ui.t.WINDOW_BG_COL;
+	let col: i32 = ui.ops.theme.WINDOW_BG_COL;
 	if (col < 0) {
 		col += 4294967296;
 	}

+ 23 - 23
base/Sources/ui_nodes.ts

@@ -574,7 +574,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) {
 	ui_menu_draw(function (ui: zui_t) {
 		let search_handle: zui_handle_t = zui_handle(__ID__);
 
-		g2_set_color(ui.t.SEPARATOR_COL);
+		g2_set_color(ui.ops.theme.SEPARATOR_COL);
 		zui_draw_rect(true, ui._x, ui._y, ui._w, zui_ELEMENT_H(ui) * 8);
 		g2_set_color(0xffffffff);
 
@@ -600,7 +600,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) {
 		}
 		let enter: bool = keyboard_down("enter");
 		let count: i32 = 0;
-		let BUTTON_COL: i32 = ui.t.BUTTON_COL;
+		let BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL;
 
 		///if (is_paint || is_sculpt)
 		let node_list: zui_node_t[][] = ui_nodes_canvas_type == canvas_type_t.MATERIAL ? nodes_material_list : nodes_brush_list;
@@ -614,7 +614,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) {
 			for (let i: i32 = 0; i < list.length; ++i) {
 				let n: zui_node_t = list[i];
 				if (string_index_of(to_lower_case(tr(n.name)), search) >= 0) {
-					ui.t.BUTTON_COL = count == ui_nodes_node_search_offset ? ui.t.HIGHLIGHT_COL : ui.t.SEPARATOR_COL;
+					ui.ops.theme.BUTTON_COL = count == ui_nodes_node_search_offset ? ui.ops.theme.HIGHLIGHT_COL : ui.ops.theme.SEPARATOR_COL;
 					if (zui_button(tr(n.name), zui_align_t.LEFT) || (enter && count == ui_nodes_node_search_offset)) {
 						ui_nodes_push_undo();
 						let nodes: zui_nodes_t = ui_nodes_get_nodes();
@@ -650,7 +650,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) {
 			ui.changed = true;
 			search_handle.text = "";
 		}
-		ui.t.BUTTON_COL = BUTTON_COL;
+		ui.ops.theme.BUTTON_COL = BUTTON_COL;
 	}, 8, x, y);
 }
 
@@ -683,9 +683,9 @@ function ui_nodes_draw_grid() {
 	}
 	ui_nodes_grid = image_create_render_target(w, h);
 	g2_begin(ui_nodes_grid);
-	g2_clear(ui_nodes_ui.t.SEPARATOR_COL);
+	g2_clear(ui_nodes_ui.ops.theme.SEPARATOR_COL);
 
-	g2_set_color(ui_nodes_ui.t.SEPARATOR_COL - 0x00050505);
+	g2_set_color(ui_nodes_ui.ops.theme.SEPARATOR_COL - 0x00050505);
 	step = 20 * zui_SCALE(ui_nodes_ui);
 	for (let i: i32 = 0; i < math_floor(h / step) + 1; ++i) {
 		g2_draw_line(0, i * step, w, i * step);
@@ -694,7 +694,7 @@ function ui_nodes_draw_grid() {
 		g2_draw_line(i * step, 0, i * step, h);
 	}
 
-	g2_set_color(ui_nodes_ui.t.SEPARATOR_COL - 0x00090909);
+	g2_set_color(ui_nodes_ui.ops.theme.SEPARATOR_COL - 0x00090909);
 	step = 100 * zui_SCALE(ui_nodes_ui);
 	for (let i: i32 = 0; i < math_floor(h / step) + 1; ++i) {
 		g2_draw_line(0, i * step, w, i * step);
@@ -1024,7 +1024,7 @@ function ui_nodes_render() {
 		}
 
 		// Menu
-		g2_set_color(ui_nodes_ui.t.SEPARATOR_COL);
+		g2_set_color(ui_nodes_ui.ops.theme.SEPARATOR_COL);
 		g2_fill_rect(0, zui_ELEMENT_H(ui_nodes_ui), ui_nodes_ww, zui_ELEMENT_H(ui_nodes_ui) + zui_ELEMENT_OFFSET(ui_nodes_ui) * 2);
 		g2_set_color(0xffffffff);
 
@@ -1037,7 +1037,7 @@ function ui_nodes_render() {
 		// Editable canvas name
 		let h: zui_handle_t = zui_handle(__ID__);
 		h.text = c.name;
-		ui_nodes_ui._w = math_floor(math_min(g2_font_width(ui_nodes_ui.font, ui_nodes_ui.font_size, h.text) + 15 * zui_SCALE(ui_nodes_ui), 100 * zui_SCALE(ui_nodes_ui)));
+		ui_nodes_ui._w = math_floor(math_min(g2_font_width(ui_nodes_ui.ops.font, ui_nodes_ui.font_size, h.text) + 15 * zui_SCALE(ui_nodes_ui), 100 * zui_SCALE(ui_nodes_ui)));
 		let new_name: string = zui_text_input(h, "");
 		ui_nodes_ui._x += ui_nodes_ui._w + 3;
 		ui_nodes_ui._y = 2 + start_y;
@@ -1087,8 +1087,8 @@ function ui_nodes_render() {
 		ui_nodes_ext_draw_buttons(ew, start_y);
 		///end
 
-		let _BUTTON_COL: i32 = ui_nodes_ui.t.BUTTON_COL;
-		ui_nodes_ui.t.BUTTON_COL = ui_nodes_ui.t.SEPARATOR_COL;
+		let _BUTTON_COL: i32 = ui_nodes_ui.ops.theme.BUTTON_COL;
+		ui_nodes_ui.ops.theme.BUTTON_COL = ui_nodes_ui.ops.theme.SEPARATOR_COL;
 
 		///if (is_paint || is_sculpt)
 		let cats: string[] = ui_nodes_canvas_type == canvas_type_t.MATERIAL ? nodes_material_categories : nodes_brush_categories;
@@ -1136,7 +1136,7 @@ function ui_nodes_render() {
 		ui_nodes_ui._x += ui_nodes_ui._w + 3;
 		ui_nodes_ui._y = 2 + start_y;
 
-		ui_nodes_ui.t.BUTTON_COL = _BUTTON_COL;
+		ui_nodes_ui.ops.theme.BUTTON_COL = _BUTTON_COL;
 
 		// Close node group
 		if (ui_nodes_group_stack.length > 0 && zui_menu_button(tr("Close"))) {
@@ -1170,12 +1170,12 @@ function ui_nodes_render() {
 		let py: i32 = ui_nodes_popup_y;
 		let menuw: i32 = math_floor(ew * 2.3);
 		zui_begin_region(ui_nodes_ui, math_floor(ui_nodes_popup_x), math_floor(py), menuw);
-		let _BUTTON_COL: i32 = ui_nodes_ui.t.BUTTON_COL;
-		ui_nodes_ui.t.BUTTON_COL = ui_nodes_ui.t.SEPARATOR_COL;
-		let _ELEMENT_OFFSET: i32 = ui_nodes_ui.t.ELEMENT_OFFSET;
-		ui_nodes_ui.t.ELEMENT_OFFSET = 0;
-		let _ELEMENT_H: i32 = ui_nodes_ui.t.ELEMENT_H;
-		ui_nodes_ui.t.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28;
+		let _BUTTON_COL: i32 = ui_nodes_ui.ops.theme.BUTTON_COL;
+		ui_nodes_ui.ops.theme.BUTTON_COL = ui_nodes_ui.ops.theme.SEPARATOR_COL;
+		let _ELEMENT_OFFSET: i32 = ui_nodes_ui.ops.theme.ELEMENT_OFFSET;
+		ui_nodes_ui.ops.theme.ELEMENT_OFFSET = 0;
+		let _ELEMENT_H: i32 = ui_nodes_ui.ops.theme.ELEMENT_H;
+		ui_nodes_ui.ops.theme.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28;
 
 		ui_menu_start(ui_nodes_ui);
 
@@ -1202,8 +1202,8 @@ function ui_nodes_render() {
 		if (is_group_category) {
 			for (let i: i32 = 0; i < project_material_groups.length; ++i) {
 				let g: node_group_t = project_material_groups[i];
-				zui_fill(0, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui), ui_nodes_ui.t.BUTTON_H + 2, ui_nodes_ui.t.ACCENT_SELECT_COL);
-				zui_fill(1, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui) - 2, ui_nodes_ui.t.BUTTON_H + 1, ui_nodes_ui.t.SEPARATOR_COL);
+				zui_fill(0, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui), ui_nodes_ui.ops.theme.BUTTON_H + 2, ui_nodes_ui.ops.theme.ACCENT_SELECT_COL);
+				zui_fill(1, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui) - 2, ui_nodes_ui.ops.theme.BUTTON_H + 1, ui_nodes_ui.ops.theme.SEPARATOR_COL);
 				ui_nodes_ui.enabled = ui_nodes_can_place_group(g.canvas.name);
 				ui_menu_fill(ui_nodes_ui);
 				zui_row([5 / 6, 1 / 6]);
@@ -1232,9 +1232,9 @@ function ui_nodes_render() {
 		ui_nodes_hide_menu = ui_nodes_ui.combo_selected_handle_ptr == 0 && !ui_nodes_show_menu_first && (ui_nodes_ui.changed || ui_nodes_ui.input_released || ui_nodes_ui.input_released_r || ui_nodes_ui.is_escape_down);
 		ui_nodes_show_menu_first = false;
 
-		ui_nodes_ui.t.BUTTON_COL = _BUTTON_COL;
-		ui_nodes_ui.t.ELEMENT_OFFSET = _ELEMENT_OFFSET;
-		ui_nodes_ui.t.ELEMENT_H = _ELEMENT_H;
+		ui_nodes_ui.ops.theme.BUTTON_COL = _BUTTON_COL;
+		ui_nodes_ui.ops.theme.ELEMENT_OFFSET = _ELEMENT_OFFSET;
+		ui_nodes_ui.ops.theme.ELEMENT_H = _ELEMENT_H;
 		zui_end_region();
 	}
 

+ 1 - 1
base/Sources/ui_status.ts

@@ -22,7 +22,7 @@ function ui_status_render_ui() {
 		ui._y += 2;
 
 		// Border
-		g2_set_color(ui.t.SEPARATOR_COL);
+		g2_set_color(ui.ops.theme.SEPARATOR_COL);
 		g2_fill_rect(0, 0, 1, ui._window_h);
 		g2_fill_rect(ui._window_w - 1, 0, 1, ui._window_h);
 

+ 16 - 16
base/Sources/ui_toolbar.ts

@@ -83,7 +83,7 @@ function ui_toolbar_render_ui() {
 		ui.image_scroll_align = false;
 		let img: image_t = resource_get("icons.k");
 
-		let col: i32 = ui.t.WINDOW_BG_COL;
+		let col: i32 = ui.ops.theme.WINDOW_BG_COL;
 		if (col < 0) {
 			col += 4294967296;
 		}
@@ -93,20 +93,20 @@ function ui_toolbar_render_ui() {
 		// Properties icon
 		if (config_raw.layout[layout_size_t.HEADER] == 1) {
 			let rect: rect_t = resource_tile50(img, 7, 1);
-			if (zui_image(img, light ? 0xff666666 : ui.t.BUTTON_COL, -1.0, rect.x, rect.y, rect.w, rect.h) == zui_state_t.RELEASED) {
+			if (zui_image(img, light ? 0xff666666 : ui.ops.theme.BUTTON_COL, -1.0, rect.x, rect.y, rect.w, rect.h) == zui_state_t.RELEASED) {
 				config_raw.layout[layout_size_t.HEADER] = 0;
 			}
 		}
 		// Draw ">>" button if header is hidden
 		else {
-			let _ELEMENT_H: i32 = ui.t.ELEMENT_H;
-			let _BUTTON_H: i32 = ui.t.BUTTON_H;
-			let _BUTTON_COL: i32 = ui.t.BUTTON_COL;
+			let _ELEMENT_H: i32 = ui.ops.theme.ELEMENT_H;
+			let _BUTTON_H: i32 = ui.ops.theme.BUTTON_H;
+			let _BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL;
 			let _fontOffsetY: i32 = ui.font_offset_y;
-			ui.t.ELEMENT_H = math_floor(ui.t.ELEMENT_H * 1.5);
-			ui.t.BUTTON_H = ui.t.ELEMENT_H;
-			ui.t.BUTTON_COL = ui.t.WINDOW_BG_COL;
-			let font_height: i32 = g2_font_height(ui.font, ui.font_size);
+			ui.ops.theme.ELEMENT_H = math_floor(ui.ops.theme.ELEMENT_H * 1.5);
+			ui.ops.theme.BUTTON_H = ui.ops.theme.ELEMENT_H;
+			ui.ops.theme.BUTTON_COL = ui.ops.theme.WINDOW_BG_COL;
+			let font_height: i32 = g2_font_height(ui.ops.font, ui.font_size);
 			ui.font_offset_y = (zui_ELEMENT_H(ui) - font_height) / 2;
 			let _w: i32 = ui._w;
 			ui._w = ui_toolbar_w;
@@ -116,9 +116,9 @@ function ui_toolbar_render_ui() {
 			}
 
 			ui._w = _w;
-			ui.t.ELEMENT_H = _ELEMENT_H;
-			ui.t.BUTTON_H = _BUTTON_H;
-			ui.t.BUTTON_COL = _BUTTON_COL;
+			ui.ops.theme.ELEMENT_H = _ELEMENT_H;
+			ui.ops.theme.BUTTON_H = _BUTTON_H;
+			ui.ops.theme.BUTTON_COL = _BUTTON_COL;
 			ui.font_offset_y = _fontOffsetY;
 		}
 		if (ui.is_hovered) {
@@ -178,10 +178,10 @@ function ui_toolbar_render_ui() {
 
 	if (config_raw.touch_ui) {
 		// Hide scrollbar
-		let _SCROLL_W: i32 = ui.t.SCROLL_W;
-		ui.t.SCROLL_W = 0;
+		let _SCROLL_W: i32 = ui.ops.theme.SCROLL_W;
+		ui.ops.theme.SCROLL_W = 0;
 		zui_end_window();
-		ui.t.SCROLL_W = _SCROLL_W;
+		ui.ops.theme.SCROLL_W = _SCROLL_W;
 	}
 }
 
@@ -224,7 +224,7 @@ function ui_toolbar_tool_properties_menu() {
 function ui_toolbar_draw_highlight() {
 	let ui: zui_t = ui_base_ui;
 	let size: i32 = ui_toolbar_w - 4;
-	g2_set_color(ui.t.HIGHLIGHT_COL);
+	g2_set_color(ui.ops.theme.HIGHLIGHT_COL);
 	zui_draw_rect(true, ui._x + -1,  ui._y + 2, size + 2, size + 2);
 }
 

+ 2 - 2
base/Sources/ui_view2d.ts

@@ -286,7 +286,7 @@ function ui_view2d_render() {
 
 		// Menu
 		let ew: i32 = math_floor(zui_ELEMENT_W(ui_view2d_ui));
-		g2_set_color(ui_view2d_ui.t.SEPARATOR_COL);
+		g2_set_color(ui_view2d_ui.ops.theme.SEPARATOR_COL);
 		g2_fill_rect(0, zui_ELEMENT_H(ui_view2d_ui), ui_view2d_ww, zui_ELEMENT_H(ui_view2d_ui) + zui_ELEMENT_OFFSET(ui_view2d_ui) * 2);
 		g2_set_color(0xffffffff);
 
@@ -304,7 +304,7 @@ function ui_view2d_render() {
 		let text: string = h.text;
 		///end
 
-		ui_view2d_ui._w = math_floor(math_min(g2_font_width(ui_view2d_ui.font, ui_view2d_ui.font_size, text) + 15 * zui_SCALE(ui_view2d_ui), 100 * zui_SCALE(ui_view2d_ui)));
+		ui_view2d_ui._w = math_floor(math_min(g2_font_width(ui_view2d_ui.ops.font, ui_view2d_ui.font_size, text) + 15 * zui_SCALE(ui_view2d_ui), 100 * zui_SCALE(ui_view2d_ui)));
 
 		if (ui_view2d_type == view_2d_type_t.ASSET) {
 			let asset: asset_t = context_raw.texture;

部分文件因文件數量過多而無法顯示