-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched gui to use borealis instead of pu
Gui now has settings instead of hardcoded in Arguments Gui can also change video mode of a given game (1.5 software video mode)
- Loading branch information
Showing
22 changed files
with
607 additions
and
1,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include <borealis.hpp> | ||
|
||
class AboutTab : public brls::List | ||
{ | ||
public: | ||
AboutTab(); | ||
View * getDefaultFocus() override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <borealis.hpp> | ||
#include <solarus/switch/Title.hpp> | ||
|
||
using GameSettings = std::map<std::string, std::string>; | ||
|
||
class TabOptionsFrame : public brls::TabFrame | ||
{ | ||
public: | ||
TabOptionsFrame(std::shared_ptr<GameSettings> const &, std::string & path, std::vector<Title> const & titles); | ||
|
||
private: | ||
std::vector<Title> titles_; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <solarus/core/QuestProperties.h> | ||
|
||
struct Title | ||
{ | ||
Solarus::QuestProperties properties; | ||
std::string path; | ||
std::string icon; | ||
}; | ||
|
||
std::vector<Title> getTitles(std::string const & path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
#pragma once | ||
|
||
// Include Plutonium's main header | ||
#include <pu/Plutonium> | ||
|
||
// Define your main layout as a class inheriting from pu::Layout | ||
class Solarus_GUI : public pu::ui::Layout | ||
{ | ||
public: | ||
|
||
Solarus_GUI(); | ||
|
||
// Have ::Ref alias and ::New() static constructor | ||
void onInput(u64 Down, u64 Up, u64 Held, pu::ui::Touch Pos); | ||
// | ||
PU_SMART_CTOR(Solarus_GUI) | ||
|
||
private: | ||
|
||
// An easy way to keep objects is to have them as private members | ||
// Using ::Ref (of a Plutonium built-in object or any class having PU_SMART_CTOR) is an alias to a shared_ptr of the instance. | ||
std::vector<std::string> paths_; | ||
pu::ui::elm::Menu::Ref menu; | ||
|
||
public: | ||
std::string get_path() const; | ||
static std::string selected_path_; | ||
}; | ||
|
||
// Define your application (can't instantiate base class, so need to make a derived one) | ||
class MainApplication : public pu::ui::Application | ||
{ | ||
public: | ||
using Application::Application; | ||
PU_SMART_CTOR(MainApplication) | ||
|
||
// We need to define this, and use it to initialize everything | ||
void OnLoad() override; | ||
|
||
private: | ||
|
||
// Layout instance | ||
Solarus_GUI::Ref layout; | ||
}; |
Oops, something went wrong.