mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-26 04:18:36 -06:00
overlays: use config setting for native ui font
This commit is contained in:
parent
2ba7756c0e
commit
28472819c8
@ -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
|
||||
{
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
@ -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)
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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"
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
@ -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()
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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"
|
||||
@ -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
|
||||
@ -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();
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
@ -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};
|
||||
|
||||
@ -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"
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
@ -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);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "overlay_message.h"
|
||||
#include "Emu/Cell/timers.hpp"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -473,7 +473,7 @@ namespace rsx
|
||||
{
|
||||
if (const font* fnt = elem.get_font())
|
||||
{
|
||||
elem.set_font(fnt->get_name().data(), get_scaled(fnt->get_size_pt()));
|
||||
elem.set_font(fnt->get_name(), get_scaled(fnt->get_size_pt()));
|
||||
}
|
||||
};
|
||||
|
||||
@ -1250,7 +1250,7 @@ namespace rsx
|
||||
{
|
||||
if (const font* fnt = elem.get_font())
|
||||
{
|
||||
elem.set_font(fnt->get_name().data(), get_scaled(fnt->get_size_pt()));
|
||||
elem.set_font(fnt->get_name(), get_scaled(fnt->get_size_pt()));
|
||||
}
|
||||
};
|
||||
scale_font(label);
|
||||
|
||||
@ -443,7 +443,7 @@ namespace rsx
|
||||
const float elapsed_frame = static_cast<float>(m_frametime_timer.GetElapsedTimeInMilliSec());
|
||||
m_frametime_timer.Start();
|
||||
m_frametime_graph.record_datapoint(elapsed_frame, do_update);
|
||||
m_frametime_graph.set_title(fmt::format("Frametime: %4.1f", elapsed_frame).c_str());
|
||||
m_frametime_graph.set_title(fmt::format("Frametime: %4.1f", elapsed_frame));
|
||||
}
|
||||
|
||||
if (m_force_repaint)
|
||||
@ -518,7 +518,7 @@ namespace rsx
|
||||
if (m_is_initialised && m_framerate_graph_enabled)
|
||||
{
|
||||
m_fps_graph.record_datapoint(m_fps, true);
|
||||
m_fps_graph.set_title(fmt::format("Framerate: %04.1f", m_fps).c_str());
|
||||
m_fps_graph.set_title(fmt::format("Framerate: %04.1f", m_fps));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -657,19 +657,19 @@ namespace rsx
|
||||
overlay_element::set_size(_w, _h);
|
||||
}
|
||||
|
||||
void graph::set_title(const char* title)
|
||||
void graph::set_title(std::string&& title)
|
||||
{
|
||||
m_title = title;
|
||||
m_title = std::move(title);
|
||||
}
|
||||
|
||||
void graph::set_font(const char* font_name, u16 font_size)
|
||||
void graph::set_font(std::string_view font_name, u16 font_size)
|
||||
{
|
||||
m_label.set_font(font_name, font_size);
|
||||
}
|
||||
|
||||
void graph::set_font_size(u16 font_size)
|
||||
{
|
||||
const auto font_name = m_label.get_font()->get_name().data();
|
||||
const auto font_name = m_label.get_font()->get_name();
|
||||
m_label.set_font(font_name, font_size);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "overlay_save_dialog.h"
|
||||
#include "overlay_video.h"
|
||||
#include "Utilities/date_time.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
@ -29,11 +30,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);
|
||||
|
||||
@ -51,7 +52,7 @@ namespace rsx
|
||||
// Detail info actually exists
|
||||
std::unique_ptr<overlay_element> detail = std::make_unique<label>(text3);
|
||||
detail->set_size(800, 0);
|
||||
detail->set_font("Arial", 12);
|
||||
detail->set_font(g_cfg.video.ui.font.to_string(), 12);
|
||||
detail->set_wrap_text(true);
|
||||
detail->back_color.a = 0.f;
|
||||
static_cast<label*>(detail.get())->auto_resize(true);
|
||||
@ -90,11 +91,11 @@ namespace rsx
|
||||
|
||||
m_list->set_pos(20, 85);
|
||||
|
||||
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(localized_string_id::RSX_OVERLAYS_SAVE_DIALOG_TITLE);
|
||||
|
||||
m_time_thingy->set_font("Arial", 14);
|
||||
m_time_thingy->set_font(g_cfg.video.ui.font.to_string(), 14);
|
||||
m_time_thingy->set_pos(1000, 30);
|
||||
m_time_thingy->set_text(date_time::current_time());
|
||||
|
||||
@ -287,7 +288,7 @@ namespace rsx
|
||||
if (m_list->m_items.empty())
|
||||
{
|
||||
m_no_saves_text = std::make_unique<label>(get_localized_string(localized_string_id::CELL_SAVEDATA_NO_DATA));
|
||||
m_no_saves_text->set_font("Arial", 20);
|
||||
m_no_saves_text->set_font(g_cfg.video.ui.font.to_string(), 20);
|
||||
m_no_saves_text->align_text(overlay_element::text_align::center);
|
||||
m_no_saves_text->set_pos(m_list->x, m_list->y + m_list->h / 2);
|
||||
m_no_saves_text->set_size(m_list->w, 30);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "overlay_select.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
namespace rsx::overlays
|
||||
{
|
||||
@ -26,7 +27,7 @@ namespace rsx::overlays
|
||||
auto label = dynamic_cast<overlays::label*>(labels.back().get());
|
||||
label->set_padding(8, 0, 0, 0);
|
||||
label->set_text(option);
|
||||
label->set_font("Arial", 14);
|
||||
label->set_font(g_cfg.video.ui.font.to_string(), 14);
|
||||
label->set_padding(4);
|
||||
label->back_color.a = 0.f;
|
||||
label->auto_resize();
|
||||
@ -50,7 +51,7 @@ namespace rsx::overlays
|
||||
label->set_padding(8, 0, 0, 0);
|
||||
label->set_unicode_text(option);
|
||||
label->set_padding(4);
|
||||
label->set_font("Arial", 14);
|
||||
label->set_font(g_cfg.video.ui.font.to_string(), 14);
|
||||
label->back_color.a = 0.f;
|
||||
label->auto_resize();
|
||||
}
|
||||
@ -153,7 +154,7 @@ namespace rsx::overlays
|
||||
arrow->back_color = color4f(0.8f, 0.8f, 0.8f, 1.f);
|
||||
|
||||
auto textfield = std::make_unique<label>();
|
||||
textfield->set_font("Arial", 14);
|
||||
textfield->set_font(g_cfg.video.ui.font.to_string(), 14);
|
||||
textfield->align_text(text_align::left);
|
||||
textfield->back_color.a = 0.f;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "overlay_slider.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
namespace rsx::overlays
|
||||
{
|
||||
@ -7,7 +8,6 @@ namespace rsx::overlays
|
||||
constexpr u16 slider_cover_thickness = 6;
|
||||
constexpr u16 slider_indicator_radius = 8;
|
||||
constexpr u16 slider_indicator_dia = slider_indicator_radius * 2;
|
||||
constexpr const char* slider_label_font_family = "Arial";
|
||||
constexpr int slider_label_font_size = 10;
|
||||
|
||||
void slider::init()
|
||||
@ -50,7 +50,7 @@ namespace rsx::overlays
|
||||
foreground->set_pos(0, (slider_indicator_dia / 2) - foreground->radius);
|
||||
|
||||
value_label->set_padding(2);
|
||||
value_label->set_font(slider_label_font_family, slider_label_font_size);
|
||||
value_label->set_font(g_cfg.video.ui.font.to_string(), slider_label_font_size);
|
||||
value_label->set_text(m_formatter(m_current_value));
|
||||
value_label->auto_resize();
|
||||
value_label->back_color.a = 0.f;
|
||||
@ -58,14 +58,14 @@ namespace rsx::overlays
|
||||
|
||||
min_label->fore_color = color4f(0.75f, 0.75f, 0.75f, 1.f);
|
||||
min_label->back_color.a = 0.f;
|
||||
min_label->set_font(slider_label_font_family, slider_label_font_size);
|
||||
min_label->set_font(g_cfg.video.ui.font.to_string(), slider_label_font_size);
|
||||
min_label->set_text(m_formatter(m_min_value));
|
||||
min_label->set_pos(0, (value_label->h / 2) + slider_indicator_radius + 8); // Margin = Text Height + Indicator Rad (gets to half point) - Text Height / 2 (Offset back to box origin)
|
||||
min_label->auto_resize();
|
||||
|
||||
max_label->fore_color = color4f(0.75f, 0.75f, 0.75f, 1.f);
|
||||
max_label->back_color.a = 0.f;
|
||||
max_label->set_font(slider_label_font_family, slider_label_font_size);
|
||||
max_label->set_font(g_cfg.video.ui.font.to_string(), slider_label_font_size);
|
||||
max_label->set_text(m_formatter(m_max_value));
|
||||
max_label->set_pos(0, (value_label->h / 2) + slider_indicator_radius + 8); // Margin
|
||||
max_label->auto_resize();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "overlay_tabs.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
namespace rsx::overlays
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace rsx::overlays
|
||||
{
|
||||
std::unique_ptr<overlay_element> label_widget = std::make_unique<label>(title);
|
||||
label_widget->set_size(m_headers_width, 60);
|
||||
label_widget->set_font("Arial", 18);
|
||||
label_widget->set_font(g_cfg.video.ui.font.to_string(), 18);
|
||||
label_widget->back_color.a = 0.f;
|
||||
label_widget->set_padding(16, 4, 16, 4);
|
||||
add_tab(label_widget, panel);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "overlay_trophy_notification.h"
|
||||
#include "Emu/Cell/ErrorCodes.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
namespace rsx
|
||||
{
|
||||
@ -46,7 +47,7 @@ namespace rsx
|
||||
|
||||
text_view.set_pos(139, 69);
|
||||
text_view.set_padding(0, 0, 0, 0);
|
||||
text_view.set_font("Arial", 14);
|
||||
text_view.set_font(g_cfg.video.ui.font.to_string(), 14);
|
||||
text_view.align_text(overlay_element::text_align::center);
|
||||
text_view.back_color.a = 0.f;
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include "overlay_user_list_dialog.h"
|
||||
#include "Emu/vfs_config.h"
|
||||
#include "Emu/system_utils.hpp"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
namespace rsx
|
||||
@ -34,11 +35,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);
|
||||
|
||||
@ -74,7 +75,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("Select user"); // Fallback. I don't think this will ever be used, so I won't localize it.
|
||||
m_description->auto_resize();
|
||||
|
||||
@ -221,6 +221,13 @@ struct cfg_root : cfg::node
|
||||
|
||||
} perf_overlay{ this };
|
||||
|
||||
struct native_ui : cfg::node
|
||||
{
|
||||
native_ui(cfg::node* _this) : cfg::node(_this, "Native UI") {}
|
||||
|
||||
cfg::string font{ this, "Font", "Arial", false };
|
||||
} ui{ this };
|
||||
|
||||
struct node_shader_preloading_dialog : cfg::node
|
||||
{
|
||||
node_shader_preloading_dialog(cfg::node* _this) : cfg::node(_this, "Shader Loading Dialog") {}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user