Add Settings::ui_notification_position.

This commit is contained in:
redpolline 2024-12-21 05:29:33 -05:00
parent ba49e5618c
commit 816479259b
3 changed files with 30 additions and 1 deletions

View file

@ -45,6 +45,8 @@ Settings::Settings(CSteamID steam_id, CGameID game_id, std::string name, std::st
this->name = this->name + " ";
}
this->ui_notification_position = "";
auto lang = sanitize(language);
std::transform(lang.begin(), lang.end(), lang.begin(), ::tolower);
lang.erase(std::remove(lang.begin(), lang.end(), ' '), lang.end());
@ -476,3 +478,24 @@ void Settings::set_preferred_network_image_type(int new_type)
};
return;
}
std::string Settings::get_ui_notification_position()
{
return this->ui_notification_position;
}
void Settings::set_ui_notification_position(char * pos)
{
PRINT_DEBUG("%s 0x%p.\n",
"Settings::set_ui_notification_position",
pos);
if (pos != NULL) {
size_t len = strlen(pos);
if (len > 0) {
this->ui_notification_position = "";
for (size_t x = 0; x < len && pos[x] != '\0'; x++) {
this->ui_notification_position += pos[x];
}
}
}
}