some tweaks and fixes for texed
parent
0a667d968e
commit
d8c48dc5fc
BIN
art/demo.ecotex
BIN
art/demo.ecotex
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 9.2 KiB |
|
@ -241,7 +241,7 @@ void texed_swp_op(int idx, int idx2) {
|
|||
td_op tmp = ctx.ops[idx2];
|
||||
ctx.ops[idx2] = ctx.ops[idx];
|
||||
ctx.ops[idx] = tmp;
|
||||
ctx.selected_op = idx2;
|
||||
if (idx == ctx.selected_op) ctx.selected_op = idx2;
|
||||
texed_repaint_preview();
|
||||
}
|
||||
|
||||
|
|
|
@ -118,13 +118,17 @@ void texed_draw_oplist_pane(zpl_aabb2 r) {
|
|||
zpl_aabb2 swap_top = zpl_aabb2_cut_left(&swap_r, aabb2_ray(swap_r).width/2.0f);
|
||||
zpl_aabb2 swap_bottom = swap_r;
|
||||
|
||||
if (i > 0 && GuiButton(aabb2_ray(swap_top), "#121#")) {
|
||||
if (i <= 0) GuiSetState(GUI_STATE_DISABLED);
|
||||
if (GuiButton(aabb2_ray(swap_top), "#121#")) {
|
||||
texed_swp_op(i, i-1);
|
||||
}
|
||||
GuiSetState(GUI_STATE_NORMAL);
|
||||
|
||||
if (i+1 < zpl_array_count(ctx.ops) && GuiButton(aabb2_ray(swap_bottom), "#120#")) {
|
||||
if (i+1 >= zpl_array_count(ctx.ops)) GuiSetState(GUI_STATE_DISABLED);
|
||||
if (GuiButton(aabb2_ray(swap_bottom), "#120#")) {
|
||||
texed_swp_op(i, i+1);
|
||||
}
|
||||
GuiSetState(GUI_STATE_NORMAL);
|
||||
|
||||
zpl_aabb2 remove_r = zpl_aabb2_cut_right(&op_item_r, 60.0f);
|
||||
|
||||
|
|
Loading…
Reference in New Issue