mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-28 06:57:02 -04:00
handle custom text id attributes
This commit is contained in:
@@ -86,8 +86,16 @@ bool HandleCustomText(JMessage::TControl* control, u16 msgId) {
|
||||
u8 language = getLanguageForOverride();
|
||||
if (textOverrides.at(language).contains(key)) {
|
||||
control->pMessageText_begin_ = GetFormatedTextOverride(key, textOverrides[language][key]);
|
||||
defaultEntry.message_id = msgId;
|
||||
control->pEntry_ = &defaultEntry;
|
||||
|
||||
// Get the attributes for this text-box if they were specified
|
||||
auto& attributeOverrides = randomizer_GetContext().mAttributeOverrides;
|
||||
if (attributeOverrides.contains(key)) {
|
||||
control->pEntry_ = reinterpret_cast<void*>(&attributeOverrides[key]);
|
||||
// Otherwise, use the default entry
|
||||
} else {
|
||||
defaultEntry.message_id = msgId;
|
||||
control->pEntry_ = &defaultEntry;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user