Skip to content

Mixing a left panel with a glium render, panel width problems #722

Answered by emilk
prscoelho asked this question in Q&A
Discussion options

You must be logged in to vote

The best way to figure out what part of the screen that egui isn't covering is to call ctx.available_rect(). If you want to render things only in this area you should set the viewport accordingly with whatever graphics API you are using.

The width you can set of a panel is the inner/content width, to which is added the frame.

Not that egui uses logical "points" for all sizes and coordinates, so to get physical pixels you need to multiply with pixels_per_point.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@prscoelho
Comment options

Answer selected by prscoelho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants