mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 08:37:35 +00:00
LibGUI: Add an "exclusive" property to GAbstractButtons.
This makes checkable buttons exclusive with other checkable buttons in the same parent widget. Basically like radio buttons. This should probably be used to implement GRadioButton once it's a bit more mature.
This commit is contained in:
parent
cadc65a82d
commit
d7756fc09f
4 changed files with 31 additions and 0 deletions
|
@ -60,6 +60,8 @@ void GButton::click()
|
|||
{
|
||||
if (!is_enabled())
|
||||
return;
|
||||
if (is_checkable())
|
||||
set_checked(!is_checked());
|
||||
if (on_click)
|
||||
on_click(*this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue