Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "overlay_friends_list_dialog.h"
#include "Emu/NP/rpcn_config.h"
#include "Emu/vfs_config.h"
#include "Emu/system_config.h"

namespace rsx
{
Expand Down Expand Up @@ -78,11 +79,11 @@ namespace rsx

padding->set_size(1, 1);
header_text->set_size(800, 40);
header_text->set_font("Arial", 16);
header_text->set_font(g_cfg.video.ui.font.to_string(), 16);
header_text->set_wrap_text(true);

subtext->set_size(800, 0);
subtext->set_font("Arial", 14);
subtext->set_font(g_cfg.video.ui.font.to_string(), 14);
subtext->set_wrap_text(true);
static_cast<label*>(subtext.get())->auto_resize(true);

Expand Down Expand Up @@ -125,7 +126,7 @@ namespace rsx
m_message_box->visible = false;

m_description = std::make_unique<label>();
m_description->set_font("Arial", 20);
m_description->set_font(g_cfg.video.ui.font.to_string(), 20);
m_description->set_pos(20, 37);
m_description->set_text("Select user"); // Fallback. I don't think this will ever be used, so I won't localize it.
m_description->auto_resize();
Expand All @@ -138,12 +139,12 @@ namespace rsx
m_extra_btn.set_image_resource(resource_config::standard_image_resource::triangle);
m_extra_btn.set_pos(330, m_list->y + m_list->h + 20);
m_extra_btn.set_text("");
m_extra_btn.set_font("Arial", 16);
m_extra_btn.set_font(g_cfg.video.ui.font.to_string(), 16);

m_page_btn.set_image_resource(resource_config::standard_image_resource::square);
m_page_btn.set_pos(m_list->x + m_list->w - (30 + 120), m_list->y + m_list->h + 20);
m_page_btn.set_text(get_localized_string(localized_string_id::HOME_MENU_FRIENDS_NEXT_LIST));
m_page_btn.set_font("Arial", 16);
m_page_btn.set_font(g_cfg.video.ui.font.to_string(), 16);
}

void friends_list_dialog::update(u64 timestamp_us)
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ namespace rsx
m_dim_background.set_size(virtual_width, virtual_height);
m_dim_background.back_color.a = 0.85f;

m_description.set_font("Arial", 20);
m_description.set_font(g_cfg.video.ui.font.to_string(), 20);
m_description.set_pos(20, 37);
m_description.set_text(m_main_menu.title);
m_description.auto_resize();
m_description.back_color.a = 0.f;

m_time_display.set_font("Arial", 14);
m_time_display.set_font(g_cfg.video.ui.font.to_string(), 14);
m_time_display.set_text(get_time_string());
m_time_display.auto_resize();
m_time_display.set_pos(virtual_width - (20 + m_time_display.w), (m_description.y + m_description.h) - m_time_display.h);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace rsx

padding->set_size(1, 1);
title->set_size(width, menu_entry_height);
title->set_font("Arial", 14);
title->set_font(g_cfg.video.ui.font.to_string(), 14);
title->set_wrap_text(true);
title->align_text(alignment);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "Emu/RSX/Overlays/overlay_slider.h"

#include "Emu/System.h"
#include "Emu/system_config.h"
#include "Utilities/Config.h"

#include "overlay_home_icons.h"
Expand Down Expand Up @@ -64,7 +65,7 @@ namespace rsx

padding->set_size(1, 1);
title->set_size(available_width, menu_entry_height);
title->set_font("Arial", 16);
title->set_font(g_cfg.video.ui.font.to_string(), 16);
title->set_wrap_text(true);
title->align_text(text_align::left);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ namespace rsx
{
auto label_widget = std::make_unique<label>(title.data());
label_widget->set_size(m_sidebar->w, 60);
label_widget->set_font("Arial", 16);
label_widget->set_font(g_cfg.video.ui.font.to_string(), 16);
label_widget->back_color.a = 0.f;
label_widget->set_margin(8, 0);
label_widget->set_padding(16, 4, 16, 4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace rsx
set_pos(x, y);

m_label.align_text(text_align::center);
m_label.set_font("Arial", 16);
m_label.set_font(g_cfg.video.ui.font.to_string(), 16);
m_label.back_color.a = 0.0f;

if (g_cfg.sys.enter_button_assignment == enter_button_assign::circle)
Expand All @@ -37,8 +37,8 @@ namespace rsx
m_accept_btn.set_text(localized_string_id::RSX_OVERLAYS_LIST_SELECT);
m_cancel_btn.set_text(localized_string_id::RSX_OVERLAYS_LIST_CANCEL);

m_accept_btn.set_font("Arial", 16);
m_cancel_btn.set_font("Arial", 16);
m_accept_btn.set_font(g_cfg.video.ui.font.to_string(), 16);
m_cancel_btn.set_font(g_cfg.video.ui.font.to_string(), 16);
}

compiled_resource& home_menu_message_box::get_compiled()
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ namespace rsx
m_save_btn.set_text(localized_string_id::HOME_MENU_SETTINGS_SAVE_BUTTON);
m_discard_btn.set_text(localized_string_id::HOME_MENU_SETTINGS_DISCARD_BUTTON);

m_reset_btn.set_font("Arial", 16);
m_save_btn.set_font("Arial", 16);
m_discard_btn.set_font("Arial", 16);
m_reset_btn.set_font(g_cfg.video.ui.font.to_string(), 16);
m_save_btn.set_font(g_cfg.video.ui.font.to_string(), 16);
m_discard_btn.set_font(g_cfg.video.ui.font.to_string(), 16);

set_pos(x, y);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace rsx
// Custom tab header. Matches the main menu style
std::unique_ptr<overlay_element> label_widget = std::make_unique<label>(page->title);
label_widget->set_size(300, 60);
label_widget->set_font("Arial", 16);
label_widget->set_font(g_cfg.video.ui.font.to_string(), 16);
label_widget->back_color.a = 0.f;
label_widget->set_padding(16, 4, 16, 4);

Expand Down
13 changes: 7 additions & 6 deletions rpcs3/Emu/RSX/Overlays/Network/overlay_recvmessage_dialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "../overlay_manager.h"
#include "overlay_recvmessage_dialog.h"
#include "Emu/system_config.h"
#include "Emu/System.h"
#include "Emu/NP/rpcn_client.h"

Expand All @@ -25,25 +26,25 @@ namespace rsx
std::unique_ptr<overlay_element> subj_prefix_label = std::make_unique<label>(get_localized_string(localized_string_id::CELL_NP_RECVMESSAGE_DIALOG_SUBJECT));

name_prefix_label->set_size(0, 40);
name_prefix_label->set_font("Arial", 16);
name_prefix_label->set_font(g_cfg.video.ui.font.to_string(), 16);
name_prefix_label->set_wrap_text(false);
static_cast<label*>(name_prefix_label.get())->auto_resize(true);

subj_prefix_label->set_size(0, 40);
subj_prefix_label->set_font("Arial", 16);
subj_prefix_label->set_font(g_cfg.video.ui.font.to_string(), 16);
subj_prefix_label->set_wrap_text(false);
static_cast<label*>(subj_prefix_label.get())->auto_resize(true);

name_label->set_size(200, 40);
name_label->set_font("Arial", 16);
name_label->set_font(g_cfg.video.ui.font.to_string(), 16);
name_label->set_wrap_text(false);

subj_label->set_size(600, 40);
subj_label->set_font("Arial", 16);
subj_label->set_font(g_cfg.video.ui.font.to_string(), 16);
subj_label->set_wrap_text(false);

body_label->set_size(800, 0);
body_label->set_font("Arial", 16);
body_label->set_font(g_cfg.video.ui.font.to_string(), 16);
body_label->set_wrap_text(true);
static_cast<label*>(body_label.get())->auto_resize(true);

Expand Down Expand Up @@ -85,7 +86,7 @@ namespace rsx
m_list->set_pos(20, 85);

m_description = std::make_unique<label>();
m_description->set_font("Arial", 20);
m_description->set_font(g_cfg.video.ui.font.to_string(), 20);
m_description->set_pos(20, 37);
m_description->set_text(get_localized_string(localized_string_id::CELL_NP_RECVMESSAGE_DIALOG_TITLE));
m_description->auto_resize();
Expand Down
5 changes: 3 additions & 2 deletions rpcs3/Emu/RSX/Overlays/Network/overlay_sendmessage_dialog.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "../overlay_manager.h"
#include "overlay_sendmessage_dialog.h"
#include "Emu/system_config.h"
#include "Emu/System.h"
#include "Emu/NP/rpcn_client.h"
#include "Emu/Cell/Modules/cellMsgDialog.h"
Expand All @@ -26,7 +27,7 @@ namespace rsx

padding->set_size(1, 1);
text_label->set_size(800, 40);
text_label->set_font("Arial", 16);
text_label->set_font(g_cfg.video.ui.font.to_string(), 16);
text_label->set_wrap_text(true);

// Make back color transparent for text
Expand All @@ -48,7 +49,7 @@ namespace rsx
m_dim_background->back_color.a = 0.5f;

m_description = std::make_unique<label>();
m_description->set_font("Arial", 20);
m_description->set_font(g_cfg.video.ui.font.to_string(), 20);
m_description->set_pos(20, 37);
m_description->set_text(get_localized_string(localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_TITLE));
m_description->auto_resize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "../overlay_manager.h"
#include "overlay_trophy_list_dialog.h"
#include "Emu/Cell/Modules/sceNpTrophy.h"
#include "Emu/system_config.h"
#include "Emu/System.h"
#include "Emu/VFS.h"

Expand Down Expand Up @@ -58,11 +59,11 @@ namespace rsx

padding->set_size(1, 1);
header_text->set_size(800, 40);
header_text->set_font("Arial", 16);
header_text->set_font(g_cfg.video.ui.font.to_string(), 16);
header_text->set_wrap_text(true);

subtext->set_size(800, 0);
subtext->set_font("Arial", 14);
subtext->set_font(g_cfg.video.ui.font.to_string(), 14);
subtext->set_wrap_text(true);
static_cast<label*>(subtext.get())->auto_resize(true);

Expand Down Expand Up @@ -97,7 +98,7 @@ namespace rsx
m_dim_background->back_color.a = 0.9f;

m_description = std::make_unique<label>();
m_description->set_font("Arial", 20);
m_description->set_font(g_cfg.video.ui.font.to_string(), 20);
m_description->set_pos(20, 37);
m_description->set_text("Select trophy"); // Fallback. I don't think this will ever be used, so I won't localize it.
m_description->auto_resize();
Expand All @@ -108,7 +109,7 @@ namespace rsx
m_show_hidden_trophies_button->set_image_resource(resource_config::standard_image_resource::square);
m_show_hidden_trophies_button->set_size(120, 30);
m_show_hidden_trophies_button->set_pos(180, trophy_list_y + trophy_list_h + 20);
m_show_hidden_trophies_button->set_font("Arial", 16);
m_show_hidden_trophies_button->set_font(g_cfg.video.ui.font.to_string(), 16);

fade_animation.duration_sec = 0.15f;

Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ namespace rsx
set_text(container.str);
}

void overlay_element::set_font(const char* font_name, u16 font_size)
void overlay_element::set_font(std::string_view font_name, u16 font_size)
{
font_ref = fontmgr::get(font_name, font_size);
m_is_compiled = false;
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/RSX/Overlays/overlay_controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ namespace rsx
virtual void set_unicode_text(const std::u32string& text);
void set_text(localized_string_id id);
void set_text(const localized_string& container);
virtual void set_font(const char* font_name, u16 font_size);
virtual void set_font(std::string_view font_name, u16 font_size);
virtual void align_text(text_align align);
virtual void set_wrap_text(bool state);
virtual font* get_font() const;
Expand Down Expand Up @@ -388,8 +388,8 @@ namespace rsx
graph();
void set_pos(s16 _x, s16 _y) override;
void set_size(u16 _w, u16 _h) override;
void set_title(const char* title);
void set_font(const char* font_name, u16 font_size) override;
void set_title(std::string&& title);
void set_font(std::string_view font_name, u16 font_size) override;
void set_font_size(u16 font_size);
void set_count(u32 datapoint_count);
void set_color(color4f color);
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/RSX/Overlays/overlay_list_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace rsx
m_deny_btn->set_image_resource(resource_config::standard_image_resource::triangle);
m_deny_btn->set_pos(180, height + 20);
m_deny_btn->set_text(localized_string_id::RSX_OVERLAYS_LIST_DENY);
m_deny_btn->set_font("Arial", 16);
m_deny_btn->set_font(g_cfg.video.ui.font.to_string(), 16);

m_cancel_btn->set_pos(330, height + 20);
}
Expand All @@ -64,8 +64,8 @@ namespace rsx
m_accept_btn->set_text(localized_string_id::RSX_OVERLAYS_LIST_SELECT);
m_cancel_btn->set_text(localized_string_id::RSX_OVERLAYS_LIST_CANCEL);

m_accept_btn->set_font("Arial", 16);
m_cancel_btn->set_font("Arial", 16);
m_accept_btn->set_font(g_cfg.video.ui.font.to_string(), 16);
m_cancel_btn->set_font(g_cfg.video.ui.font.to_string(), 16);

auto_resize = false;
back_color = {0.15f, 0.15f, 0.15f, 0.8f};
Expand Down
9 changes: 5 additions & 4 deletions rpcs3/Emu/RSX/Overlays/overlay_media_list_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "overlay_manager.h"
#include "overlay_media_list_dialog.h"

#include "Emu/system_config.h"
#include "Emu/Cell/Modules/cellMusic.h"
#include "Emu/VFS.h"
#include "Utilities/StrUtil.h"
Expand Down Expand Up @@ -115,11 +116,11 @@ namespace rsx

padding->set_size(1, 1);
header_text->set_size(800, 40);
header_text->set_font("Arial", 16);
header_text->set_font(g_cfg.video.ui.font.to_string(), 16);
header_text->set_wrap_text(true);

subtext->set_size(800, 0);
subtext->set_font("Arial", 14);
subtext->set_font(g_cfg.video.ui.font.to_string(), 14);
subtext->set_wrap_text(true);
static_cast<label*>(subtext.get())->auto_resize(true);

Expand Down Expand Up @@ -152,7 +153,7 @@ namespace rsx
m_dim_background->back_color.a = 0.5f;

m_description = std::make_unique<label>();
m_description->set_font("Arial", 20);
m_description->set_font(g_cfg.video.ui.font.to_string(), 20);
m_description->set_pos(20, 37);
m_description->set_text("Select media"); // Fallback. I don't think this will ever be used, so I won't localize it.
m_description->auto_resize();
Expand Down Expand Up @@ -315,7 +316,7 @@ namespace rsx
if (m_list->m_items.empty())
{
m_no_media_text = std::make_unique<label>(get_localized_string(localized_string_id::RSX_OVERLAYS_MEDIA_DIALOG_EMPTY));
m_no_media_text->set_font("Arial", 20);
m_no_media_text->set_font(g_cfg.video.ui.font.to_string(), 20);
m_no_media_text->align_text(overlay_element::text_align::center);
m_no_media_text->set_pos(m_list->x, m_list->y + m_list->h / 2);
m_no_media_text->set_size(m_list->w, 30);
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/RSX/Overlays/overlay_message.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "overlay_message.h"
#include "Emu/Cell/timers.hpp"
#include "Emu/system_config.h"

namespace rsx
{
Expand Down Expand Up @@ -31,7 +32,7 @@ namespace rsx
m_visible_duration = expiration;
m_refs = std::move(refs);

m_text.set_font("Arial", 12);
m_text.set_font(g_cfg.video.ui.font.to_string(), 12);
m_text.set_text(msg_id);
m_text.set_padding(4, 8, 4, 8);
m_text.auto_resize();
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/RSX/Overlays/overlay_message_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace rsx

text_display.set_size(1100, 40);
text_display.set_pos(90, 364);
text_display.set_font("Arial", 16);
text_display.set_font(g_cfg.video.ui.font.to_string(), 16);
text_display.align_text(overlay_element::text_align::center);
text_display.set_wrap_text(true);
text_display.back_color.a = 0.f;
Expand All @@ -40,12 +40,12 @@ namespace rsx
btn_ok.set_text(localized_string_id::RSX_OVERLAYS_MSG_DIALOG_YES);
btn_ok.set_size(140, 30);
btn_ok.set_pos(545, 420);
btn_ok.set_font("Arial", 16);
btn_ok.set_font(g_cfg.video.ui.font.to_string(), 16);

btn_cancel.set_text(localized_string_id::RSX_OVERLAYS_MSG_DIALOG_NO);
btn_cancel.set_size(140, 30);
btn_cancel.set_pos(685, 420);
btn_cancel.set_font("Arial", 16);
btn_cancel.set_font(g_cfg.video.ui.font.to_string(), 16);

if (g_cfg.sys.enter_button_assignment == enter_button_assign::circle)
{
Expand Down
Loading
Loading