bright-gpu-74537
04/25/2023, 3:11 PMbutton.findComponent("icon").getImageDisplay()
, or button.findComponent(Image).getImageDisplay()
, but note that with either of these methods you code will either break on native builds (not that i think you care about that)bright-gpu-74537
04/25/2023, 3:11 PMhelpful-boots-41914
04/25/2023, 3:12 PMbright-gpu-74537
04/25/2023, 3:15 PMtile://
extension in the .icon string, or, having a class that returns haxeui images, and use them:
haxe
function getImage():Image {
...
theImage.getImageDisplay().subImage(...)
return imageDisplay();
}
...
myButton.icon = getImage();
bright-gpu-74537
04/25/2023, 3:15 PMhelpful-boots-41914
04/25/2023, 3:17 PMvar theImage = new haxe.ui.Image(); theImage.resource = Images.aTexture; . . .
?bright-gpu-74537
04/25/2023, 3:18 PMbright-gpu-74537
04/25/2023, 3:18 PMhelpful-boots-41914
04/25/2023, 3:19 PMComponents
to icon so I think that worksbright-gpu-74537
04/25/2023, 3:19 PMbright-gpu-74537
04/25/2023, 3:20 PMhaxe
var image = new haxe.ui.components.Image();
image.resource = "haxeui-core/styles/default/haxeui.png";
test.icon = image;
bright-gpu-74537
04/25/2023, 3:21 PMhelpful-boots-41914
04/25/2023, 3:23 PMbright-gpu-74537
04/25/2023, 3:24 PMbright-gpu-74537
04/25/2023, 3:25 PMhelpful-boots-41914
04/25/2023, 3:30 PMearly-butcher-76809
04/25/2023, 4:36 PMbright-gpu-74537
04/25/2023, 4:48 PMearly-butcher-76809
04/25/2023, 4:49 PMbright-gpu-74537
04/25/2023, 4:50 PMearly-butcher-76809
04/25/2023, 4:50 PMbright-gpu-74537
04/25/2023, 4:50 PMearly-butcher-76809
04/25/2023, 4:51 PMbright-gpu-74537
04/25/2023, 4:52 PM<box left="10%">
)... i do like the idea (i think), but i think if its going to be done, it make sense to do it proper... whats the use case here btw (just so i can understand fully)early-butcher-76809
04/25/2023, 4:53 PMearly-butcher-76809
04/25/2023, 4:54 PMearly-butcher-76809
04/25/2023, 4:54 PMearly-butcher-76809
04/25/2023, 4:55 PMearly-butcher-76809
04/25/2023, 4:56 PMbright-gpu-74537
04/25/2023, 4:58 PM