Add XCUI native image UV support
This commit is contained in:
@@ -39,6 +39,8 @@ struct UIDrawCommand {
|
||||
UIDrawCommandType type = UIDrawCommandType::FilledRect;
|
||||
UIRect rect = {};
|
||||
UIPoint position = {};
|
||||
UIPoint uvMin = {};
|
||||
UIPoint uvMax = UIPoint(1.0f, 1.0f);
|
||||
UIColor color = {};
|
||||
float thickness = 1.0f;
|
||||
float rounding = 0.0f;
|
||||
@@ -122,12 +124,16 @@ public:
|
||||
UIDrawCommand& AddImage(
|
||||
const UIRect& rect,
|
||||
const UITextureHandle& texture,
|
||||
const UIColor& tintColor = {}) {
|
||||
const UIColor& tintColor = {},
|
||||
const UIPoint& uvMin = {},
|
||||
const UIPoint& uvMax = UIPoint(1.0f, 1.0f)) {
|
||||
UIDrawCommand command = {};
|
||||
command.type = UIDrawCommandType::Image;
|
||||
command.rect = rect;
|
||||
command.texture = texture;
|
||||
command.color = tintColor;
|
||||
command.uvMin = uvMin;
|
||||
command.uvMax = uvMax;
|
||||
return AddCommand(std::move(command));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user