mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 03:45:08 +00:00
LibGUI: Add GInputBox for getting a string from a modal dialog.
Use this to implement some of the toolbar actions in IRCClient. :^)
This commit is contained in:
parent
b87c099535
commit
a6538feed1
11 changed files with 158 additions and 17 deletions
|
@ -70,6 +70,12 @@ void GButton::mousedown_event(GMouseEvent& event)
|
|||
GWidget::mousedown_event(event);
|
||||
}
|
||||
|
||||
void GButton::click()
|
||||
{
|
||||
if (on_click)
|
||||
on_click(*this);
|
||||
}
|
||||
|
||||
void GButton::mouseup_event(GMouseEvent& event)
|
||||
{
|
||||
#ifdef GBUTTON_DEBUG
|
||||
|
@ -81,10 +87,8 @@ void GButton::mouseup_event(GMouseEvent& event)
|
|||
m_tracking_cursor = false;
|
||||
set_global_cursor_tracking(false);
|
||||
update();
|
||||
if (was_being_pressed) {
|
||||
if (on_click)
|
||||
on_click(*this);
|
||||
}
|
||||
if (was_being_pressed)
|
||||
click();
|
||||
}
|
||||
GWidget::mouseup_event(event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue