mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-27 05:04:01 +08:00
allow specifying durations for each notification type
This commit is contained in:
parent
6653f91e88
commit
fcb40ac86d
@ -133,13 +133,17 @@ struct Overlay_Appearance {
|
|||||||
float notification_margin_y = 5.0f; // vertical margin
|
float notification_margin_y = 5.0f; // vertical margin
|
||||||
|
|
||||||
uint32 notification_animation = 350; // sliding animation duration (millisec)
|
uint32 notification_animation = 350; // sliding animation duration (millisec)
|
||||||
|
uint32 notification_duration_progress = 3500; // achievement progress indication duration (millisec)
|
||||||
|
uint32 notification_duration_achievement = 5000; // achievement unlocked duration (millisec)
|
||||||
|
uint32 notification_duration_invitation = 8000; // friend invitation duration (millisec)
|
||||||
|
uint32 notification_duration_chat = 4000; // sliding animation duration duration (millisec)
|
||||||
|
|
||||||
std::string ach_unlock_datetime_format = "%Y/%m/%d - %H:%M:%S";
|
std::string ach_unlock_datetime_format = "%Y/%m/%d - %H:%M:%S";
|
||||||
|
|
||||||
float background_r = 0.12f;
|
float background_r = 0.12f;
|
||||||
float background_g = 0.11f;
|
float background_g = 0.11f;
|
||||||
float background_b = 0.11f;
|
float background_b = 0.11f;
|
||||||
float background_a = 1.0f;
|
float background_a = 0.55f;
|
||||||
|
|
||||||
float element_r = 0.30f;
|
float element_r = 0.30f;
|
||||||
float element_g = 0.32f;
|
float element_g = 0.32f;
|
||||||
|
@ -281,6 +281,22 @@ static void load_overlay_appearance(class Settings *settings_client, class Setti
|
|||||||
uint32 nnotification_animation = (uint32)(std::stof(value, NULL) * 1000.0f); // convert sec to milli
|
uint32 nnotification_animation = (uint32)(std::stof(value, NULL) * 1000.0f); // convert sec to milli
|
||||||
settings_client->overlay_appearance.notification_animation = nnotification_animation;
|
settings_client->overlay_appearance.notification_animation = nnotification_animation;
|
||||||
settings_server->overlay_appearance.notification_animation = nnotification_animation;
|
settings_server->overlay_appearance.notification_animation = nnotification_animation;
|
||||||
|
} else if (name.compare("Notification_Duration_Progress") == 0) {
|
||||||
|
uint32 time = (uint32)(std::stof(value, NULL) * 1000.0f); // convert sec to milli
|
||||||
|
settings_client->overlay_appearance.notification_duration_progress = time;
|
||||||
|
settings_server->overlay_appearance.notification_duration_progress = time;
|
||||||
|
} else if (name.compare("Notification_Duration_Achievement") == 0) {
|
||||||
|
uint32 time = (uint32)(std::stof(value, NULL) * 1000.0f); // convert sec to milli
|
||||||
|
settings_client->overlay_appearance.notification_duration_achievement = time;
|
||||||
|
settings_server->overlay_appearance.notification_duration_achievement = time;
|
||||||
|
} else if (name.compare("Notification_Duration_Invitation") == 0) {
|
||||||
|
uint32 time = (uint32)(std::stof(value, NULL) * 1000.0f); // convert sec to milli
|
||||||
|
settings_client->overlay_appearance.notification_duration_invitation = time;
|
||||||
|
settings_server->overlay_appearance.notification_duration_invitation = time;
|
||||||
|
} else if (name.compare("Notification_Duration_Chat") == 0) {
|
||||||
|
uint32 time = (uint32)(std::stof(value, NULL) * 1000.0f); // convert sec to milli
|
||||||
|
settings_client->overlay_appearance.notification_duration_chat = time;
|
||||||
|
settings_server->overlay_appearance.notification_duration_chat = time;
|
||||||
} else if (name.compare("Achievement_Unlock_Datetime_Format") == 0) {
|
} else if (name.compare("Achievement_Unlock_Datetime_Format") == 0) {
|
||||||
settings_client->overlay_appearance.ach_unlock_datetime_format = value;
|
settings_client->overlay_appearance.ach_unlock_datetime_format = value;
|
||||||
settings_server->overlay_appearance.ach_unlock_datetime_format = value;
|
settings_server->overlay_appearance.ach_unlock_datetime_format = value;
|
||||||
|
@ -60,18 +60,28 @@ Notification_Rounding=10.0
|
|||||||
Notification_Margin_x=5.0
|
Notification_Margin_x=5.0
|
||||||
Notification_Margin_y=5.0
|
Notification_Margin_y=5.0
|
||||||
|
|
||||||
# notification animation in seconds. Set to 0 to disable
|
# duration/timing for various notification types (in seconds)
|
||||||
|
# duration of notification animation in seconds. Set to 0 to disable
|
||||||
Notification_Animation=0.35
|
Notification_Animation=0.35
|
||||||
|
# duration of achievement progress indication
|
||||||
|
Notification_Duration_Progress=3.5
|
||||||
|
# duration of achievement unlocked
|
||||||
|
Notification_Duration_Achievement=5.0
|
||||||
|
# duration of friend invitation
|
||||||
|
Notification_Duration_Invitation=8.0
|
||||||
|
# duration of chat message
|
||||||
|
Notification_Duration_Chat=4.0
|
||||||
|
|
||||||
# format for the achievement unlock date/time, limited to 79 characters
|
# format for the achievement unlock date/time, limited to 79 characters
|
||||||
# if the output formatted string exceeded this limit, the builtin format will be used
|
# if the output formatted string exceeded this limit, the builtin format will be used
|
||||||
# look for the format here: https://en.cppreference.com/w/cpp/chrono/c/strftime
|
# look for the format here: https://en.cppreference.com/w/cpp/chrono/c/strftime
|
||||||
Achievement_Unlock_Datetime_Format=%Y/%m/%d - %H:%M:%S
|
Achievement_Unlock_Datetime_Format=%Y/%m/%d - %H:%M:%S
|
||||||
|
|
||||||
|
# main background when you press shift+tab
|
||||||
Background_R=0.12
|
Background_R=0.12
|
||||||
Background_G=0.11
|
Background_G=0.11
|
||||||
Background_B=0.11
|
Background_B=0.11
|
||||||
Background_A=1.0
|
Background_A=0.55
|
||||||
|
|
||||||
Element_R=0.30
|
Element_R=0.30
|
||||||
Element_G=0.32
|
Element_G=0.32
|
||||||
|
Loading…
Reference in New Issue
Block a user