mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 18:48:11 +08:00 
			
		
		
		
	Add option to have button without border. (#101)
This commit is contained in:
		| @@ -21,7 +21,7 @@ class ButtonBase : public ComponentBase { | ||||
|   static ButtonBase* From(Component); | ||||
|  | ||||
|   // Constructor. | ||||
|   ButtonBase(ConstStringRef label, std::function<void()> on_click); | ||||
|   ButtonBase(ConstStringRef label, std::function<void()> on_click, bool border); | ||||
|   ~ButtonBase() override = default; | ||||
|  | ||||
|   // Component implementation. | ||||
| @@ -31,6 +31,7 @@ class ButtonBase : public ComponentBase { | ||||
|  private: | ||||
|   ConstStringRef label_; | ||||
|   std::function<void()> on_click_; | ||||
|   bool border_; | ||||
|   Box box_; | ||||
| }; | ||||
|  | ||||
|   | ||||
| @@ -22,7 +22,9 @@ std::shared_ptr<T> Make(Args&&... args) { | ||||
|   return std::make_shared<T>(args...); | ||||
| } | ||||
|  | ||||
| Component Button(ConstStringRef label, std::function<void()> on_click); | ||||
| Component Button(ConstStringRef label, | ||||
|                  std::function<void()> on_click, | ||||
|                  bool border = true); | ||||
| Component Checkbox(ConstStringRef label, bool* checked); | ||||
| Component Input(StringRef content, ConstStringRef placeholder); | ||||
| Component Menu(const std::vector<std::wstring>* entries, int* selected_); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Arthur Sonzogni
					Arthur Sonzogni