mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-01 22:32:42 +02:00
Update to v106r52 release.
byuu says: I stand corrected, I managed to create and even larger diff than ever. This one weighs in at 309KiB `>__>` I'll have to create a changelog later, I'm too tired right now to go through all of that.
This commit is contained in:
@@ -30,7 +30,7 @@ private:
|
||||
|
||||
BrowserDialog::State& state;
|
||||
BrowserDialog::Response response;
|
||||
vector<string_vector> filters;
|
||||
vector<vector<string>> filters;
|
||||
};
|
||||
|
||||
//accept button clicked, or enter pressed on file name line edit
|
||||
@@ -248,7 +248,7 @@ auto BrowserDialog::openFile() -> string {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::openFiles() -> string_vector {
|
||||
auto BrowserDialog::openFiles() -> vector<string> {
|
||||
state.action = "openFiles";
|
||||
if(!state.title) state.title = "Open Files";
|
||||
if(auto result = _run()) return result;
|
||||
@@ -280,7 +280,7 @@ auto BrowserDialog::saveFile() -> string {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::selected() -> string_vector {
|
||||
auto BrowserDialog::selected() -> vector<string> {
|
||||
return response.selected;
|
||||
}
|
||||
|
||||
@@ -291,12 +291,12 @@ auto BrowserDialog::selectFolder() -> string {
|
||||
return {};
|
||||
}
|
||||
|
||||
auto BrowserDialog::setFilters(const string_vector& filters) -> type& {
|
||||
auto BrowserDialog::setFilters(const vector<string>& filters) -> type& {
|
||||
state.filters = filters;
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto BrowserDialog::setOptions(const string_vector& options) -> type& {
|
||||
auto BrowserDialog::setOptions(const vector<string>& options) -> type& {
|
||||
state.options = options;
|
||||
return *this;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ auto BrowserDialog::setTitle(const string& title) -> type& {
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto BrowserDialog::_run() -> string_vector {
|
||||
auto BrowserDialog::_run() -> vector<string> {
|
||||
if(!state.path) state.path = Path::user();
|
||||
response = BrowserDialogWindow(state).run();
|
||||
return response.selected;
|
||||
|
@@ -6,16 +6,16 @@ struct BrowserDialog {
|
||||
using type = BrowserDialog;
|
||||
|
||||
BrowserDialog();
|
||||
auto openFile() -> string; //one existing file
|
||||
auto openFiles() -> string_vector; //any existing files
|
||||
auto openFolder() -> string; //one existing folder
|
||||
auto openObject() -> string; //one existing file or folder
|
||||
auto openFile() -> string; //one existing file
|
||||
auto openFiles() -> vector<string>; //any existing files
|
||||
auto openFolder() -> string; //one existing folder
|
||||
auto openObject() -> string; //one existing file or folder
|
||||
auto option() -> string;
|
||||
auto saveFile() -> string; //one file
|
||||
auto selected() -> string_vector;
|
||||
auto selectFolder() -> string; //one existing folder
|
||||
auto setFilters(const string_vector& filters = {}) -> type&;
|
||||
auto setOptions(const string_vector& options = {}) -> type&;
|
||||
auto saveFile() -> string; //one file
|
||||
auto selected() -> vector<string>;
|
||||
auto selectFolder() -> string; //one existing folder
|
||||
auto setFilters(const vector<string>& filters = {}) -> type&;
|
||||
auto setOptions(const vector<string>& options = {}) -> type&;
|
||||
auto setParent(const sWindow& parent) -> type&;
|
||||
auto setPath(const string& path = "") -> type&;
|
||||
auto setTitle(const string& title = "") -> type&;
|
||||
@@ -23,8 +23,8 @@ struct BrowserDialog {
|
||||
private:
|
||||
struct State {
|
||||
string action;
|
||||
string_vector filters = {"*"};
|
||||
string_vector options;
|
||||
vector<string> filters = {"*"};
|
||||
vector<string> options;
|
||||
sWindow parent;
|
||||
string path;
|
||||
string title;
|
||||
@@ -32,10 +32,10 @@ private:
|
||||
|
||||
struct Response {
|
||||
string option;
|
||||
string_vector selected;
|
||||
vector<string> selected;
|
||||
} response;
|
||||
|
||||
auto _run() -> string_vector;
|
||||
auto _run() -> vector<string>;
|
||||
|
||||
friend class BrowserDialogWindow;
|
||||
};
|
||||
|
@@ -4,19 +4,19 @@ MessageDialog::MessageDialog(const string& text) {
|
||||
state.text = text;
|
||||
}
|
||||
|
||||
auto MessageDialog::error(const string_vector& buttons) -> string {
|
||||
auto MessageDialog::error(const vector<string>& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Error;
|
||||
return _run();
|
||||
}
|
||||
|
||||
auto MessageDialog::information(const string_vector& buttons) -> string {
|
||||
auto MessageDialog::information(const vector<string>& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Information;
|
||||
return _run();
|
||||
}
|
||||
|
||||
auto MessageDialog::question(const string_vector& buttons) -> string {
|
||||
auto MessageDialog::question(const vector<string>& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Question;
|
||||
return _run();
|
||||
@@ -37,7 +37,7 @@ auto MessageDialog::setTitle(const string& title) -> type& {
|
||||
return *this;
|
||||
}
|
||||
|
||||
auto MessageDialog::warning(const string_vector& buttons) -> string {
|
||||
auto MessageDialog::warning(const vector<string>& buttons) -> string {
|
||||
state.buttons = buttons;
|
||||
state.icon = Icon::Prompt::Warning;
|
||||
return _run();
|
||||
|
@@ -4,17 +4,17 @@ struct MessageDialog {
|
||||
using type = MessageDialog;
|
||||
|
||||
MessageDialog(const string& text = "");
|
||||
auto error(const string_vector& buttons = {"Ok"}) -> string;
|
||||
auto information(const string_vector& buttons = {"Ok"}) -> string;
|
||||
auto question(const string_vector& buttons = {"Yes", "No"}) -> string;
|
||||
auto error(const vector<string>& buttons = {"Ok"}) -> string;
|
||||
auto information(const vector<string>& buttons = {"Ok"}) -> string;
|
||||
auto question(const vector<string>& buttons = {"Yes", "No"}) -> string;
|
||||
auto setParent(sWindow parent = {}) -> type&;
|
||||
auto setText(const string& text = "") -> type&;
|
||||
auto setTitle(const string& title = "") -> type&;
|
||||
auto warning(const string_vector& buttons = {"Ok"}) -> string;
|
||||
auto warning(const vector<string>& buttons = {"Ok"}) -> string;
|
||||
|
||||
private:
|
||||
struct State {
|
||||
string_vector buttons;
|
||||
vector<string> buttons;
|
||||
vector<uint8_t> icon;
|
||||
sWindow parent;
|
||||
string response;
|
||||
|
Reference in New Issue
Block a user