Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with new CreateShowDialog? #64

Open
mrdude2478 opened this issue Oct 21, 2024 · 2 comments
Open

Help with new CreateShowDialog? #64

mrdude2478 opened this issue Oct 21, 2024 · 2 comments

Comments

@mrdude2478
Copy link

mrdude2478 commented Oct 21, 2024

In previous builds you have this at the end of CreateShowdialog: std::string &icon_path = ""

I can just put in the path for an Icon and it works fine.

Now you changed in new plutonium builds - sdl2::TextureHandle::Ref icon = {}

This obviously break my code now as I need to changed it bacause it's no longer a sting path, I had a look in your example, but you didn't show how to now load that graphic file. Can you post an example please.

Previous code would look like this:

std::string fail = "romfs:/images/icons/fail.png";

inst::ui::mainApp->CreateShowDialog("inst.info_page.failed"_lang + inst::util::shortenString(ourTitleList[titleItr].filename().string(), 42, true) + "!", "inst.info_page.failed_desc"_lang + "\n\n" + (std::string)e.what(), { "common.ok"_lang }, true, fail);

How can I now load that icon as a texture so it works with the new code?

@XorTroll
Copy link
Owner

https://github.com/XorTroll/uLaunch/blob/unew/projects/uMenu/source/ul/menu/ui/ui_MainMenuLayout.cpp#L912 check this as an example
Also yeah, an example of this would be helpful

@mrdude2478
Copy link
Author

mrdude2478 commented Oct 23, 2024

Thanks for replying. I saw that and still couldn't figure out how to load a graphic though. I've gone back to an older build now because I know how to use that.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants