mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 16:38:09 +08:00
Add option for input.
This commit is contained in:

committed by
Arthur Sonzogni

parent
2b7daf061f
commit
33b3d1c7ab
@@ -156,13 +156,19 @@ int main(int argc, const char* argv[]) {
|
||||
false,
|
||||
false,
|
||||
};
|
||||
std::wstring input_add_content;
|
||||
Component input_add = Input(&input_add_content, "input files");
|
||||
|
||||
std::vector<std::wstring> input_entries;
|
||||
int input_selected = 0;
|
||||
Component input = Menu(&input_entries, &input_selected);
|
||||
|
||||
auto input_option = InputOption();
|
||||
std::wstring input_add_content;
|
||||
input_option.on_enter = [&] {
|
||||
input_entries.push_back(input_add_content);
|
||||
input_add_content = L"";
|
||||
};
|
||||
Component input_add = Input(&input_add_content, "input files", input_option);
|
||||
|
||||
std::wstring executable_content_ = L"";
|
||||
Component executable_ = Input(&executable_content_, "executable");
|
||||
|
||||
@@ -185,11 +191,6 @@ int main(int argc, const char* argv[]) {
|
||||
}),
|
||||
});
|
||||
|
||||
InputBase::From(input_add)->on_enter = [&] {
|
||||
input_entries.push_back(input_add_content);
|
||||
input_add_content = L"";
|
||||
};
|
||||
|
||||
auto render_command = [&] {
|
||||
Elements line;
|
||||
// Compiler
|
||||
|
Reference in New Issue
Block a user