| 37 | } |
| 38 | |
| 39 | void loadButtonDefs() { |
| 40 | Abyss::Common::Log::info("Loading button definitions..."); |
| 41 | auto &buttonDefsMap = OD2::Common::ButtonDefManager::getInstance(); |
| 42 | auto &paletteManager = OD2::Common::PaletteManager::getInstance(); |
| 43 | auto &soundManager = OD2::Common::SoundManager::getInstance(); |
| 44 | buttonDefsMap.addButtonDef({ |
| 45 | .name = "Wide", |
| 46 | .resourceName = std::string(OD2::Common::ResourcePaths::UI::WideButtonBlank), |
| 47 | .palette = paletteManager.getPalette("Units"), |
| 48 | .font = "btntext", |
| 49 | .clickSound = soundManager.getSound("cursor_button_click"), |
| 50 | .clickableRect = {.x = 6, .y = 1, .w = 259, .h = 32}, |
| 51 | .segments = {.x = 2, .y = 1}, |
| 52 | .frames = {.base = 0, .pressed = 1, .disabled = -1}, |
| 53 | }); |
| 54 | buttonDefsMap.addButtonDef({ |
| 55 | .name = "Medium", |
| 56 | .resourceName = std::string(OD2::Common::ResourcePaths::UI::MediumButtonBlank), |
| 57 | .palette = paletteManager.getPalette("Units"), |
| 58 | .font = "btntext", |
| 59 | .clickSound = soundManager.getSound("cursor_button_click"), |
| 60 | .clickableRect = {.x = 6, .y = 1, .w = 118, .h = 32}, |
| 61 | .segments = {.x = 1, .y = 1}, |
| 62 | .frames = {.base = 0, .pressed = 1, .disabled = -1}, |
| 63 | }); |
| 64 | } |
| 65 | |
| 66 | void loadFonts() { |
| 67 | const auto addFont = [](const std::string_view fontPath, const std::string &paletteName) -> void { |
no test coverage detected