Initial commit

This commit is contained in:
Niklas080208
2026-02-11 20:33:01 +01:00
commit 617265f004
145 changed files with 45252 additions and 0 deletions

35
src/file_browser.h Normal file
View File

@@ -0,0 +1,35 @@
/*
SWR INI Tool - Switchroot INI Configuration Editor
Copyright (C) 2026 Switchroot
*/
#pragma once
#include <borealis.hpp>
#include <string>
#include <vector>
#include <functional>
using FileSelectedCallback = std::function<void(const std::string& path)>;
class FileBrowser : public brls::AppletFrame
{
public:
FileBrowser(const std::string& startDir, FileSelectedCallback callback);
private:
brls::List* list;
FileSelectedCallback callback;
std::string currentDir;
void navigate(const std::string& dir);
void selectFile(const std::string& path);
struct DirEntry
{
std::string name;
bool isDir;
};
std::vector<DirEntry> listDirectory(const std::string& dir);
};