heaps of changes to NewGUI: mouseDown/Up events now count the clicks (so you can detect double/triple clicks); ListWidget sends a message if an item was double clicked or changed; you can abort editing in the ListWidget by pressing ESC; SaveLoadDialog will save when you double click and item, and when you finish editing an item by pressing return, will save
svn-id: r4656
This commit is contained in:
parent
403afb0514
commit
39670a73c0
10 changed files with 112 additions and 72 deletions
|
@ -140,7 +140,7 @@ ButtonWidget::~ButtonWidget()
|
|||
}
|
||||
}
|
||||
|
||||
void ButtonWidget::handleMouseUp(int x, int y, int button)
|
||||
void ButtonWidget::handleMouseUp(int x, int y, int button, int clickCount)
|
||||
{
|
||||
if (_flags & WIDGET_ENABLED && x >= 0 && x < _w && y >= 0 && y < _h)
|
||||
sendCommand(_cmd, 0);
|
||||
|
@ -168,7 +168,7 @@ CheckboxWidget::CheckboxWidget(Dialog *boss, int x, int y, int w, int h, const c
|
|||
_type = kCheckboxWidget;
|
||||
}
|
||||
|
||||
void CheckboxWidget::handleMouseDown(int x, int y, int button)
|
||||
void CheckboxWidget::handleMouseDown(int x, int y, int button, int clickCount)
|
||||
{
|
||||
if (_flags & WIDGET_ENABLED) {
|
||||
_state = !_state;
|
||||
|
@ -221,7 +221,7 @@ void SliderWidget::handleMouseMoved(int x, int y, int button) {
|
|||
}
|
||||
}
|
||||
|
||||
void SliderWidget::handleMouseDown(int x, int y, int button) {
|
||||
void SliderWidget::handleMouseDown(int x, int y, int button, int clickCount) {
|
||||
|
||||
if (_flags & WIDGET_ENABLED) {
|
||||
int barx;
|
||||
|
@ -234,7 +234,7 @@ void SliderWidget::handleMouseDown(int x, int y, int button) {
|
|||
}
|
||||
}
|
||||
|
||||
void SliderWidget::handleMouseUp(int x, int y, int button) {
|
||||
void SliderWidget::handleMouseUp(int x, int y, int button, int clickCount) {
|
||||
|
||||
if ((_flags & WIDGET_ENABLED) && _isDragging) {
|
||||
sendCommand(_cmd, _value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue