cute_framework icon indicating copy to clipboard operation
cute_framework copied to clipboard

9 slice supporting easy sprites

Open ogam opened this issue 3 months ago • 1 comments

Currently 9 slice sprites only supports sprites created from .ase files. These have not been tested to see how it should properly be done with easy sprites created with cf_make_easy_sprite* variations. Maybe an add or update the center patch for a sprite's animation frame and default to cf_draw_sprite() if not available?

https://github.com/RandyGaul/cute_framework/blob/cdbd3637d4d1e9664a753dd92eb9f874837a601d/src/cute_draw.cpp#L651C2-L660C3

	if (sprite->animation) {
		frame_index = sprite->frame_index + sprite->animation->frame_offset;
		image_id = sprite->animation->frames[sprite->frame_index].id;
	}
	else if (sprite->easy_sprite_id >= CF_PREMADE_ID_RANGE_LO && sprite->easy_sprite_id <= CF_PREMADE_ID_RANGE_HI) {
		CF_ASSERT(!"Not implemented yet.");
	}
	else {
		CF_ASSERT(!"Not implemented yet.");
	}

ogam avatar Oct 10 '25 21:10 ogam

One minor fix related to this so far: https://github.com/RandyGaul/cute_framework/commit/a6a627b7618f6034f015947d1c8e8421757592fb

RandyGaul avatar Oct 13 '25 01:10 RandyGaul