paint: ui fixes
This commit is contained in:
@@ -605,9 +605,6 @@ void tab_meshes_draw_mesh_slot(mesh_object_t *o, i32 i) {
|
||||
f32 uix = g_ui->_x;
|
||||
f32 uiy = g_ui->_y;
|
||||
|
||||
// Separator
|
||||
ui_fill(0, 0, (g_ui->_w / (float)UI_SCALE() - 2), 1 * UI_SCALE(), g_theme->SEPARATOR_COL);
|
||||
|
||||
// Eye icon
|
||||
f32_array_t *row = f32_array_create_from_raw(
|
||||
(f32[]){
|
||||
@@ -701,6 +698,9 @@ void tab_meshes_draw_mesh_slot(mesh_object_t *o, i32 i) {
|
||||
g_ui->_y = uiy + step * 2 * UI_SCALE();
|
||||
g_ui->_w = uiw;
|
||||
|
||||
// Separator line
|
||||
ui_fill(0, 0, (g_ui->_w / (float)UI_SCALE() - 2), 1 * UI_SCALE(), g_theme->SEPARATOR_COL);
|
||||
|
||||
// Highlight selected
|
||||
if (g_context->paint_object == o) {
|
||||
ui_rect(1, -step * 2 - 1, g_ui->_w / (float)UI_SCALE() - 2, step * 2 + 1, g_theme->HIGHLIGHT_COL, 2);
|
||||
|
||||
@@ -95,6 +95,16 @@ void ui_view2d_draw_edit() {
|
||||
}
|
||||
g_ui->enabled = true;
|
||||
}
|
||||
|
||||
char *view_type = ui_view2d_type == VIEW_2D_TYPE_ASSET ? tr("Asset")
|
||||
: ui_view2d_type == VIEW_2D_TYPE_NODE ? tr("Node")
|
||||
: ui_view2d_type == VIEW_2D_TYPE_FONT ? tr("Font")
|
||||
: ui_view2d_type == VIEW_2D_TYPE_UVMAP ? tr("UVMap")
|
||||
: tr("Layer");
|
||||
|
||||
g_ui->enabled = false;
|
||||
ui_text(view_type, UI_ALIGN_LEFT, 0x00000000);
|
||||
g_ui->enabled = true;
|
||||
}
|
||||
|
||||
void ui_view2d_draw_image(gpu_texture_t *image, f32 dx, f32 dy, f32 dw, f32 dh, i32 channel) {
|
||||
@@ -587,14 +597,8 @@ void ui_view2d_update(void *_) {
|
||||
g_ui->_y = 2 + start_y;
|
||||
}
|
||||
|
||||
char *view_type = ui_view2d_type == VIEW_2D_TYPE_ASSET ? tr("Asset")
|
||||
: ui_view2d_type == VIEW_2D_TYPE_NODE ? tr("Node")
|
||||
: ui_view2d_type == VIEW_2D_TYPE_FONT ? tr("Font")
|
||||
: ui_view2d_type == VIEW_2D_TYPE_UVMAP ? tr("UVMap")
|
||||
: tr("Layer");
|
||||
|
||||
g_ui->_w = math_floor(ew * 0.7 + 3);
|
||||
if (ui_icon_button(view_type, ICON_EDIT, UI_ALIGN_CENTER)) {
|
||||
if (ui_icon_button("Edit", ICON_EDIT, UI_ALIGN_CENTER)) {
|
||||
gc_unroot(ui_view2d_tex);
|
||||
ui_view2d_tex = tex;
|
||||
gc_root(ui_view2d_tex);
|
||||
|
||||
Reference in New Issue
Block a user