BurgundyDev / ReddyEngine

Game for the 2022 GitHub Game Off!
MIT License
2 stars 1 forks source link

Add a variant of CORE_ERROR that shows a dialog #22

Closed Daivuk closed 2 years ago

Daivuk commented 2 years ago

For example, when loading a scene in the editor, I want to log an error if file is not found, but also should be nice to show the user a dialog:


    if (!Engine::Utils::loadJson(json, filename))
    {
        CORE_ERROR("Failed to load file: %s", filename.c_str());
        tinyfd_messageBox("Error", ("Failed to load file: " + filename).c_str(), "ok", "error", 0);
        return;
    }```