- Add visual file picker for GUI with toggle support. - Introduce `GUIConfig` class for loading GUI settings from configuration file. - Refactor window initialization to support dynamic sizing based on configuration. - Add macOS-specific handling for fullscreen behavior. - Improve header inclusion order and minor code cleanup.
28 lines
584 B
C++
28 lines
584 B
C++
/*
|
|
* GUIConfig - loads simple GUI configuration from $HOME/.config/kte/kge.ini
|
|
*/
|
|
#ifndef KTE_GUI_CONFIG_H
|
|
#define KTE_GUI_CONFIG_H
|
|
|
|
#include <string>
|
|
|
|
#ifndef KTE_FONT_SIZE
|
|
#define KTE_FONT_SIZE 16.0f
|
|
#endif
|
|
|
|
class GUIConfig {
|
|
public:
|
|
bool fullscreen = false;
|
|
int columns = 80;
|
|
int rows = 42;
|
|
float font_size = (float) KTE_FONT_SIZE;
|
|
|
|
// Load from default path: $HOME/.config/kte/kge.ini
|
|
static GUIConfig Load();
|
|
|
|
// Load from explicit path. Returns true if file existed and was parsed.
|
|
bool LoadFromFile(const std::string &path);
|
|
};
|
|
|
|
#endif // KTE_GUI_CONFIG_H
|