Paradise
Paradise copied to clipboard
[TGUI] ImageButton component
What Does This PR Do
New TGUI component - ImageButton! Documentation is included, any suggestions will be appreciated
It was created to solve several problems:
- To improve the performance of buttons with images
- Improve the convenience of creating buttons with images
- Standardise buttons with images
Replaces custom styled buttons in Prize Counter to ImageButton. There aren't many differences in appearance, but it looks more polished in the little things.
How it looks like
Before | After |
---|---|
In addition, the render time when opening the window was reduced from 8-10 frames to 5-6 frames. Not much, but its something.
Render time
Before | After |
---|---|
Also added 1 more color - gold.
Why It's Good For The Game
Beautiful buttons that are easy to embed images into. The component itself is not very heavy, unlike variants where the image is embedded in a regular Button component. In the end, I tried to make the component as convenient as possible for developers
Images of changes
You can see and test it into KitchenSink
Testing
Yes, on the BayStation12 downstream SS220 with identical TGUI on 3 UI's And here on PrizeCounter
Anyway there are a couple of problems worth solving:
- You can't overlay an icon on a image
- ImageButton.Item is quite expensive and increases render time by 1.5-2 times.
- ImageButton.Item has no vertical option
- ImageButton.Item has no horizontal option to position the icon horizontally
They are not very critical and there is no way to fix them at this time (Classic TODO 10 years later)
Changelog
:cl: tweak: A little polished PrizeCounter UI /:cl: