KevinJardine
22 days agoStart Partner
Change image in Noesis?
I've finally been making progress with NoesisGUI - I can load text from the dataContext object in TypeScript and handle button clicks.
But has anyone been able to load an image in response to a button click? The image Source tag does not seem to accept a string value.
You have to make an Image Source binding in Noesis and set it to an Image Source in typescript. Something like this:
private dataContext = { Image: ImageSource.fromTextureAsset(new TextureAsset(BigInt("AssetID"))), }; start() { this.entity.as(NoesisGizmo).dataContext = this.dataContext; this.dataContext.Image = ImageSource.fromTextureAsset(new TextureAsset(BigInt("AssetID"))); }