Skip to content

Conversation

@JustFrederik
Copy link
Contributor

@JustFrederik JustFrederik commented Jun 5, 2024

If you use egui_extras you need to add the gif feature flag to it. Then adding a .gif to egui is as easy as

ui.image(egui::include_image!("ferris.gif"));

@YgorSouza
Copy link
Contributor

Could add Closes #4489 to the description so we don't forget to close the issue afterward.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking very promising! A a great test gif too :)

@JustFrederik
Copy link
Contributor Author

@emilk every requested change is implemented. I didn't test the file_loader, but it should behave the exactly like the ehttp loader which works.

@JustFrederik JustFrederik requested a review from emilk June 6, 2024 16:32
@JustFrederik JustFrederik requested a review from emilk June 7, 2024 11:48
@JustFrederik
Copy link
Contributor Author

@emilk ??

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Veery close now - just a few cleanups and we should be good to go

@emilk
Copy link
Owner

emilk commented Jun 18, 2024

btw, as I mention in the PR template, opening a PR from your master branch is problematic. For one, it makes it much harder for me to test it.

@JustFrederik JustFrederik requested a review from emilk June 19, 2024 06:52
@JustFrederik
Copy link
Contributor Author

@emilk Im sorry. I will keep that in mind for the next pull request

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good!

I just need to test it before merging

EDIT: tested it, and it seems to work exactly as advertized!

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work - this is really cool!

fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show(ctx, |ui| {
egui::ScrollArea::both().show(ui, |ui| {
ui.image(egui::include_image!("ferris.gif"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's super cool that this Just Works™️

@JustFrederik
Copy link
Contributor Author

should be ready to merge now

@emilk emilk merged commit 52a8e11 into emilk:master Jun 19, 2024
@emilk
Copy link
Owner

emilk commented Jun 19, 2024

Thanks for going through all the review rounds on this!

@emilk emilk changed the title Gif support GIF support Jun 27, 2024
@emilk emilk added the feature New feature or request label Jun 27, 2024
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
* Previous PR: emilk#3951 
* Closes emilk#4489

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui_extras egui feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gif Support

3 participants