SpiderPig Posted March 4, 2023 Share Posted March 4, 2023 I'm just going to throw this out there - I wonder if we should be able to change a widgets material? For example if I assign the below image to a large panel the image would stretch. However the corners of the image (red dots) should maintain their aspect ratio as defined by the green grid. The other 5 regions of the image can be stretched to fill in the regions between the corners. I've been experimenting with custom widgets and can separate the regions into their individual pixmap's and assign them to their own block to get the desired effect, some effects may need lots of blocks though. But a custom shader that does this would be better I think. Thoughts? I can think of a few others cases where this might be useful. Glow effects, animated textures, etc. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted March 4, 2023 Share Posted March 4, 2023 I like the idea, but i doubt this will be done, as it would be ingame only. The native gui interface relies on the native drawing methods provided by the os. This is why can't use the texture block when you add an interface to a window. An alternative would be some kind of tiled pixmap block for this purpose, with that you can define the margins needed and the block itself creates this kind of behaviour. but it would be hard to animate (at least performance wise) as we can't use 3d textures. I have an idea which i will try tomorrow 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted March 4, 2023 Share Posted March 4, 2023 The only thing it can't do right now is a tiled center, assuming the middle image isn't just a solid color as in the picture above. Some tiling widget block options would handle that if they were added. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted March 4, 2023 Author Share Posted March 4, 2023 10 hours ago, klepto2 said: I like the idea, but i doubt this will be done, as it would be ingame only. The native gui interface relies on the native drawing methods provided by the os. This is why can't use the texture block when you add an interface to a window. Ah of course. I didn't think about that. I was toying with the idea of making my own widget system using sprites so that I could do this because all of my widgets are going to have textures anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.