mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-05-23 21:57:40 +08:00
Add Settings::ui_notification_position.
This commit is contained in:
parent
ba49e5618c
commit
816479259b
@ -219,6 +219,8 @@ inline std::string ascii_to_lowercase(std::string data) {
|
||||
|
||||
#define DEFAULT_LANGUAGE "english"
|
||||
|
||||
#define DEFAULT_UI_NOTIFICATION_POSITION "top right"
|
||||
|
||||
#define LOBBY_CONNECT_APPID ((uint32)-2)
|
||||
|
||||
#define FRIEND_AVATAR_MAX_IMAGE_LENGTH (5 * 1024 * 1024)
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ struct Settings_Background_Task {
|
||||
class Settings {
|
||||
CSteamID steam_id;
|
||||
CGameID game_id;
|
||||
std::string name, language;
|
||||
std::string name, language, ui_notification_position;
|
||||
CSteamID lobby_id;
|
||||
uint32 preferred_network_image_type;
|
||||
bool background_thread_exit;
|
||||
@ -209,6 +209,10 @@ public:
|
||||
void set_show_achievement_desc_on_unlock(bool set) { this->showAchievementDescOnUnlock = set; }
|
||||
bool get_show_achievement_hidden_unearned() { return showAchievementHiddenUnearned; }
|
||||
void set_show_achievement_hidden_unearned(bool set) { this->showAchievementHiddenUnearned = set; }
|
||||
|
||||
//UI
|
||||
std::string get_ui_notification_position();
|
||||
void set_ui_notification_position(char * pos);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user