struct EE::UI::UIApplication::Settings

Overview

#include <uiapplication.hpp>

struct Settings {
    // fields

    std::optional<std::string> basePath;
    std::optional<Float> pixelDensity;
    bool loadBaseResources { true };
    Font* baseFont { nullptr };
    Font* monospaceFont { nullptr };
    std::optional<std::string> baseStyleSheetPath;
    Font* emojiFont { nullptr };
    Font* fallbackFont { nullptr };

    // construction

    Settings();

    Settings(
        std::optional<std::string> basePath,
        std::optional<Float> pixelDensity = {},
        bool loadBaseResources = true,
        Font* baseFont = nullptr,
        std::optional<std::string> baseStyleSheetPath = {},
        Font* emojiFont = nullptr,
        Font* fallbackFont = nullptr
    );
};

Detailed Documentation

Fields

std::optional<std::string> basePath

By default it will use the current process path as the base path. This will set the default working directory.

std::optional<Float> pixelDensity

Not setting anything will automatically try to detect the main screen pixel density.

bool loadBaseResources { true }

Must be set to true in order to initialize the basic UI resources (font and UI theme). Otherwise it will initialize with an empty UI scene node

Font* baseFont { nullptr }

The default base font for the UI. If not provided it will load NotoSans-Regular ( will look at “assets/fonts/NotoSans-Regular.ttf” )

Font* monospaceFont { nullptr }

The default base monospace font for the UI. If not provided it will load DejaVuSansMono ( will look at “assets/fonts/DejaVuSansMono.ttf” )

std::optional<std::string> baseStyleSheetPath

The style sheet path is the path of the base UI theme stylesheet ( will look at “assets/ui/breeze.css” by default )

Font* emojiFont { nullptr }

The default emoji font for the UI. If not provided it will load Noto Color Emoji ( it will look at “assets/fonts/NotoColorEmoji.ttf” ) otherwise it will try NotoEmoji-Regular ( it will look at “assets/fonts/NotoEmoji-Regular.ttf” )

Font* fallbackFont { nullptr }

The default fallback font for the UI. If not provided it will load Droid Sans Fallback Full ( it will look at “assets/fonts/DroidSansFallbackFull.ttf” )