You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to get egui to scale a texture to fill the available space in a window taking into account other items that are in the window.
Below, I generate a texture in code and sandwich it between a heading and a label. I'd like for the texture to scale to fill the available window if I resize the window, while keeping the label and heading visible. I know I can specify the exact width and height of the texture, so one way is to manually account for all widgets in the window and do the math. Is there a better way to do this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to figure out how to get egui to scale a texture to fill the available space in a window taking into account other items that are in the window.
Below, I generate a texture in code and sandwich it between a heading and a label. I'd like for the texture to scale to fill the available window if I resize the window, while keeping the label and heading visible. I know I can specify the exact width and height of the texture, so one way is to manually account for all widgets in the window and do the math. Is there a better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions