Search Unity

"Reverse" Aspect Ratio Fitter?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Kvadratt, Apr 22, 2022.

  1. Kvadratt

    Kvadratt

    Joined:
    Mar 7, 2021
    Posts:
    8
    Hello. I want to create a horizontal bar with two buttons, where one button has fixed aspect ratio 1:1 and the other one fits all other space, like shown in images below.
    1.png => 2.png
    My only idea was to somehow use Aspect Ratio Fitter in reverse so when green button stretches in height, it shrinks in width, but I didn't find such functions. How can this be done?