Jump to content

Scalable GUI


photo

Recommended Posts

I spend a lot of time programming Android applications and found automatic GUI scaling very useful - there are lots of different screen resolutions and DPIs, so you'll never have to use fixed-size widgets. I was very surprised that in Unigine there is no way to automatically re-scale GUI. Even more, most widgets fail to correctly respond to setWidth/setHeight methods - sometimes those are just ignore and sometimes (i.e. for icons) only widget frame is changed while inner picture remains fixed.

 

Is there a way of scaling GUI and/or widgets depending on screen resolution without inventing the wheel with custom controls based on WidgetSprite?

Link to comment

The Unigine approach to GUI is as follows: no matter what the the screen resolution is, the interface remains the same. That is why widgets are designed to always fit the texture in. It cannot be made smaller than it, only bigger in size. Again, increasing the widget size (let's say, WidgetIcon) does not affect its texture.

 

If you want GUI that looks good no matter how resized, use WidgetFlash. Another variant is to use WidgetSprite, you are absolutely right here. These widgets are used for interface in OilRush, you can check it, if interested.

Link to comment
  • 2 years later...
  • 4 months later...
×
×
  • Create New...