n00kii / egui-modal

a simple modal library for egui
MIT License
65 stars 10 forks source link

setting a default modal height #6

Closed n00kii closed 1 year ago

n00kii commented 1 year ago

continuing discussion from #5 and using solution from https://github.com/n00kii/egui-modal/issues/5#issuecomment-1430568221

basic implementation looks like this:

image

not too desirable, ideally the contents of the frame would be centered and the title and buttons would be at top and bottom, respectively

n00kii commented 1 year ago

also we would want to make sure the height is set even if the user is not using the helper functions

apoorv569 commented 1 year ago

also we would want to make sure the height is set even if the user is not using the helper functions

Sorry its been a month. Can you remind me what problem are we facing ATM?

I kind of created my own dialog module taking parts from your code. Here is my dialog mod, https://0x0.st/H-P2.txt

Its not as complete and error prone as yours but it works for my use-case. Maybe this helps in someway.

Also check the issue I mentioned before where I asked on egui repo.

n00kii commented 1 year ago

fixed in https://github.com/n00kii/egui-modal/commit/516ff0734e267612bda7bae70c6479d427d13af8 by using spacers within the .frame method, thanks for the help

apoorv569 commented 1 year ago

fixed in 516ff07 by using spacers within the .frame method, thanks for the help

Nice. I'll try it out and let you know.