|
10 | 10 |
|
11 | 11 | struct CustomDialogData { |
12 | 12 | std::string customTexture = ""; |
13 | | - double iconScale = 1.0f; |
| 13 | + float iconScale = 1.0f; |
14 | 14 | matjson::Value customSound = nullptr; |
15 | 15 | matjson::Value blipSound = nullptr; |
16 | 16 | matjson::Value changeBG = nullptr; |
17 | 17 | bool autoSkip = false; |
18 | | - byte pauseMusic = 0; // 0 = ignore, 1 = unpause, 2 = pause |
| 18 | + Toggler pauseMusic = Toggler::Default; |
19 | 19 | }; |
20 | 20 | std::map<int, CustomDialogData> storedCustomData; |
21 | 21 |
|
@@ -66,7 +66,7 @@ class $modify(CustomDialogLayer, DialogLayer) { |
66 | 66 | if (data.customSound != nullptr) playCustomSound(data.customSound); |
67 | 67 |
|
68 | 68 | // Pause music |
69 | | - if (data.pauseMusic > 0) FMODAudioEngine::sharedEngine()->m_backgroundMusicChannel->setPaused(data.pauseMusic == 2); |
| 69 | + if (data.pauseMusic != Toggler::Default) FMODAudioEngine::sharedEngine()->m_backgroundMusicChannel->setPaused(data.pauseMusic == Toggler::On); |
70 | 70 |
|
71 | 71 | // Auto skip |
72 | 72 | if (data.autoSkip) m_fields->autoSkip = true; |
@@ -187,9 +187,9 @@ void CustomTextbox::showTextbox(std::string id) { |
187 | 187 | if (m.contains("setBackground")) data.changeBG = m["setBackground"]; |
188 | 188 | if (m.contains("autoSkip")) data.autoSkip = getBool(m, "autoSkip"); |
189 | 189 | if (m.contains("pauseMusic")) { |
190 | | - byte pauseByte = getBool(m, "pauseMusic") ? 2 : 1; |
191 | | - data.pauseMusic = pauseByte; |
192 | | - if (pauseByte == 2) pausesMusic = true; |
| 190 | + Toggler pauseVal = getBool(m, "pauseMusic") ? Toggler::On : Toggler::Off; |
| 191 | + data.pauseMusic = pauseVal; |
| 192 | + if (pauseVal == Toggler::On) pausesMusic = true; |
193 | 193 | } |
194 | 194 | customData[dialogLines->count()] = data; |
195 | 195 |
|
|
0 commit comments