ES-DE/es-app/src/guis/GuiScreensaverOptions.h
Dan Leach a2f59ee2fc Add Game Info Font Settings to OMX Player
Adds the ability for users to change the following features in OMX Player's subtitles (game info for screen saver).

- font size
- font file path
- italic font file path
- subtitle position

These changes can be made in the GUI menus via the Video Screen Saver menu, or directly in the es_settings.cfg file.

Safe OMX Player defaults are hard-coded into the EmulationStation application.

Here's an example of the new keys loaded/saved into in the es_settings.cfg file:

- `<int name="SubtitleSize" value="38" />`
- `<string name="SubtitleFont" value="/usr/local/share/fonts/slkscr.ttf" />`
- `<string name="SubtitleItalicFont" value="/usr/local/share/fonts/slkscrb.ttf" />`
- `<string name="SubtitleAlignment" value="center" />`
2019-06-19 18:51:32 +01:00

30 lines
1.1 KiB
C++

#pragma once
#ifndef ES_APP_GUIS_GUI_SCREENSAVER_OPTIONS_H
#define ES_APP_GUIS_GUI_SCREENSAVER_OPTIONS_H
#include "components/MenuComponent.h"
// This is just a really simple template for a GUI that calls some save functions when closed.
class GuiScreensaverOptions : public GuiComponent
{
public:
GuiScreensaverOptions(Window* window, const char* title);
virtual ~GuiScreensaverOptions(); // just calls save();
virtual void save();
inline void addRow(const ComponentListRow& row) { mMenu.addRow(row); };
inline void addWithLabel(const std::string& label, const std::shared_ptr<GuiComponent>& comp) { mMenu.addWithLabel(label, comp); };
inline void addSaveFunc(const std::function<void()>& func) { mSaveFuncs.push_back(func); };
void addEditableTextComponent(ComponentListRow row, const std::string label, std::shared_ptr<GuiComponent> ed, std::string value);
bool input(InputConfig* config, Input input) override;
std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override;
protected:
MenuComponent mMenu;
std::vector< std::function<void()> > mSaveFuncs;
};
#endif // ES_APP_GUIS_GUI_SCREENSAVER_OPTIONS_H