mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Add ComboBox::onChange() member function
This commit is contained in:
parent
6c3523fbed
commit
c5a0acf7c6
@ -400,7 +400,7 @@ bool ComboBoxListBox::onProcessMessage(Message* msg)
|
||||
{
|
||||
int index = m_comboBox->getSelectedItem();
|
||||
if (isValidItem(index))
|
||||
m_comboBox->Change();
|
||||
m_comboBox->onChange();
|
||||
|
||||
m_comboBox->closeListBox();
|
||||
}
|
||||
@ -510,4 +510,9 @@ JRect ComboBox::getListBoxPos()
|
||||
return rc;
|
||||
}
|
||||
|
||||
void ComboBox::onChange()
|
||||
{
|
||||
Change();
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
|
@ -21,8 +21,12 @@ namespace ui {
|
||||
class ListBox;
|
||||
class Window;
|
||||
|
||||
class ComboBoxListBox;
|
||||
|
||||
class ComboBox : public Widget
|
||||
{
|
||||
friend class ComboBoxListBox;
|
||||
|
||||
public:
|
||||
ComboBox();
|
||||
~ComboBox();
|
||||
@ -66,6 +70,7 @@ namespace ui {
|
||||
protected:
|
||||
bool onProcessMessage(Message* msg) OVERRIDE;
|
||||
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;
|
||||
virtual void onChange();
|
||||
|
||||
private:
|
||||
void onButtonClick(Event& ev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user