allegro5: take image region into account for NK_COMMAND_IMAGE
This commit is contained in:
parent
4ffef5eb11
commit
19dc0131f3
@ -324,7 +324,10 @@ nk_allegro5_render()
|
|||||||
} break;
|
} break;
|
||||||
case NK_COMMAND_IMAGE: {
|
case NK_COMMAND_IMAGE: {
|
||||||
const struct nk_command_image *i = (const struct nk_command_image *)cmd;
|
const struct nk_command_image *i = (const struct nk_command_image *)cmd;
|
||||||
al_draw_bitmap_region(i->img.handle.ptr, 0, 0, i->w, i->h, i->x, i->y, 0);
|
al_draw_scaled_bitmap(i->img.handle.ptr,
|
||||||
|
i->img.region[0], i->img.region[1],
|
||||||
|
i->img.region[2], i->img.region[3],
|
||||||
|
i->x, i->y, i->w, i->h, 0);
|
||||||
} break;
|
} break;
|
||||||
case NK_COMMAND_RECT_MULTI_COLOR:
|
case NK_COMMAND_RECT_MULTI_COLOR:
|
||||||
default: break;
|
default: break;
|
||||||
|
Loading…
Reference in New Issue
Block a user