diff --git a/README.md b/README.md index 38acdfb..2b57167 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,16 @@ https://github.com/vrnimje/quick-ftxui/assets/103848930/715c821b-b259-4e2b-ab25- + + +
Radiobox + + [Example](./examples/radiobox.qf#L5-8) + + ![](./assets/image-13.png) + +
+ * #### Supports FTXUI's basic DOM elements (more coming with future releases)
Text @@ -117,7 +127,7 @@ https://github.com/vrnimje/quick-ftxui/assets/103848930/715c821b-b259-4e2b-ab25-
Paragraph - Similar to text, but adapts to size of terminal windoe + Similar to text, but adapts to size of terminal window [Example](./examples/paragraph.qf) diff --git a/assets/image-13.png b/assets/image-13.png new file mode 100644 index 0000000..afc4d37 Binary files /dev/null and b/assets/image-13.png differ diff --git a/examples/radiobox.qf b/examples/radiobox.qf new file mode 100644 index 0000000..e09523b --- /dev/null +++ b/examples/radiobox.qf @@ -0,0 +1,22 @@ +Vertical { + // Vertical radiobox + int x + int y + Red Radiobox { + ["Mechanical", "Chemistry", "Physics", "Electrical", ], + x + } + Heavy separator + Horizontal { + // In block + Text("Select your branch") + YellowLight Radiobox { + ["Mechanical", "Chemistry", "Physics", "Electrical", ], + y + } + } + Blue Button { + "Exit", + "Exit" + } +} \ No newline at end of file diff --git a/include/quick-ftxui.hpp b/include/quick-ftxui.hpp index 29a6d27..b59eb60 100644 --- a/include/quick-ftxui.hpp +++ b/include/quick-ftxui.hpp @@ -47,6 +47,7 @@ struct slider; struct menu; struct toggle; struct dropdown; +struct radiobox; struct int_variable_decl; struct str_variable_decl; @@ -133,8 +134,9 @@ typedef boost::variant< nil, boost::recursive_wrapper