mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-06-07 09:45:55 +02:00
Patches to steam_overlay.cpp
This commit is contained in:
parent
25b7066136
commit
c1b203ad1f
1 changed files with 12 additions and 2 deletions
|
@ -878,7 +878,17 @@ void Steam_Overlay::set_next_notification_pos(std::pair<float, float> scrn_size,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case notification_type::invite: pos = settings->overlay_appearance.invite_pos; break;
|
// case notification_type::invite: pos = settings->overlay_appearance.invite_pos; break;
|
||||||
|
case notification_type::invite: {
|
||||||
|
pos = settings->overlay_appearance.invite_pos;
|
||||||
|
const float msg_height = ImGui::CalcTextSize(
|
||||||
|
noti.message.c_str(),
|
||||||
|
noti.message.c_str() + noti.message.size(),
|
||||||
|
false,
|
||||||
|
noti_width - padding_all_sides - global_style.ItemSpacing.x
|
||||||
|
).y;
|
||||||
|
noti_height = msg_height + settings->overlay_appearance.font_size + global_style.WindowPadding.y;
|
||||||
|
}
|
||||||
case notification_type::message: pos = settings->overlay_appearance.chat_msg_pos; break;
|
case notification_type::message: pos = settings->overlay_appearance.chat_msg_pos; break;
|
||||||
default: PRINT_DEBUG("ERROR: unhandled notification type %i", (int)noti.type); break;
|
default: PRINT_DEBUG("ERROR: unhandled notification type %i", (int)noti.type); break;
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1197,7 @@ void Steam_Overlay::add_invite_notification(std::pair<const Friend, friend_windo
|
||||||
char tmp[TRANSLATION_BUFFER_SIZE]{};
|
char tmp[TRANSLATION_BUFFER_SIZE]{};
|
||||||
auto &first_friend = wnd_state.first;
|
auto &first_friend = wnd_state.first;
|
||||||
auto &name = first_friend.name();
|
auto &name = first_friend.name();
|
||||||
snprintf(tmp, sizeof(tmp), translationInvitedYouToJoinTheGame[current_language], name.c_str(), (uint64)first_friend.id());
|
snprintf(tmp, sizeof(tmp), translationInvitedYouToJoinTheGame[current_language], name.c_str(), (uint64)first_friend.appid());
|
||||||
|
|
||||||
submit_notification(notification_type::invite, tmp, &wnd_state);
|
submit_notification(notification_type::invite, tmp, &wnd_state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue