mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -05:00
feat: Added font picker to the settings (#1570)
This commit is contained in:
@@ -141,7 +141,7 @@ namespace hex {
|
||||
|
||||
[[nodiscard]] bool isChecked() const { return m_value; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
bool m_value;
|
||||
};
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace hex {
|
||||
|
||||
[[nodiscard]] i32 getValue() const { return m_value; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
int m_value;
|
||||
i32 m_min, m_max;
|
||||
};
|
||||
@@ -170,7 +170,7 @@ namespace hex {
|
||||
|
||||
[[nodiscard]] float getValue() const { return m_value; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
float m_value;
|
||||
float m_min, m_max;
|
||||
};
|
||||
@@ -186,7 +186,7 @@ namespace hex {
|
||||
|
||||
[[nodiscard]] ImColor getColor() const;
|
||||
|
||||
private:
|
||||
protected:
|
||||
std::array<float, 4> m_value{};
|
||||
};
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace hex {
|
||||
[[nodiscard]]
|
||||
const nlohmann::json& getValue() const;
|
||||
|
||||
private:
|
||||
protected:
|
||||
std::vector<std::string> m_items;
|
||||
std::vector<nlohmann::json> m_settingsValues;
|
||||
nlohmann::json m_defaultItem;
|
||||
@@ -222,7 +222,7 @@ namespace hex {
|
||||
[[nodiscard]]
|
||||
const std::string& getValue() const { return m_value; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
std::string m_value;
|
||||
};
|
||||
|
||||
@@ -233,12 +233,12 @@ namespace hex {
|
||||
void load(const nlohmann::json &data) override;
|
||||
nlohmann::json store() override;
|
||||
|
||||
[[nodiscard]] std::fs::path getPath() const {
|
||||
return m_value;
|
||||
[[nodiscard]] const std::fs::path& getPath() const {
|
||||
return m_path;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_value;
|
||||
protected:
|
||||
std::fs::path m_path;
|
||||
};
|
||||
|
||||
class Label : public Widget {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -76,6 +77,9 @@ namespace hex {
|
||||
int executeCommand(const std::string &command);
|
||||
void openWebpage(std::string url);
|
||||
|
||||
extern "C" void registerFont(const char *fontName, const char *fontPath);
|
||||
const std::map<std::fs::path, std::string>& getFonts();
|
||||
|
||||
[[nodiscard]] std::string encodeByteString(const std::vector<u8> &bytes);
|
||||
[[nodiscard]] std::vector<u8> decodeByteString(const std::string &string);
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
void setupMacosWindowStyle(GLFWwindow *window, bool borderlessWindowMode);
|
||||
|
||||
void enumerateFontsMacos();
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user