- ctrl-click in the property browser is for toggling bools, not dragging
- add vertical arg to sliders (apparently nobody ever use a vertical one :-) - simplification
This commit is contained in:
parent
552c3149ae
commit
390c1f4d1f
1 changed files with 8 additions and 7 deletions
|
@ -212,6 +212,8 @@ int fgPopup::checkHit(int button, int updown, int x, int y)
|
||||||
int global_resize = fgGetKeyModifiers() & KEYMOD_CTRL;
|
int global_resize = fgGetKeyModifiers() & KEYMOD_CTRL;
|
||||||
|
|
||||||
int hit = getHitObjects(this, x, y);
|
int hit = getHitObjects(this, x, y);
|
||||||
|
if (hit & PUCLASS_LIST) // ctrl-click in property browser (toggle bool)
|
||||||
|
return result;
|
||||||
if (!global_resize && hit & (PUCLASS_BUTTON|PUCLASS_ONESHOT|PUCLASS_INPUT|PUCLASS_LARGEINPUT))
|
if (!global_resize && hit & (PUCLASS_BUTTON|PUCLASS_ONESHOT|PUCLASS_INPUT|PUCLASS_LARGEINPUT))
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@ -752,7 +754,7 @@ FGDialog::makeObject (SGPropertyNode *props, int parentWidth, int parentHeight)
|
||||||
|
|
||||||
} else if (type == "slider") {
|
} else if (type == "slider") {
|
||||||
bool vertical = props->getBoolValue("vertical", false);
|
bool vertical = props->getBoolValue("vertical", false);
|
||||||
puSlider *obj = new puSlider(x, y, (vertical ? height : width));
|
puSlider *obj = new puSlider(x, y, (vertical ? height : width), vertical);
|
||||||
obj->setMinValue(props->getFloatValue("min", 0.0));
|
obj->setMinValue(props->getFloatValue("min", 0.0));
|
||||||
obj->setMaxValue(props->getFloatValue("max", 1.0));
|
obj->setMaxValue(props->getFloatValue("max", 1.0));
|
||||||
setupObject(obj, props);
|
setupObject(obj, props);
|
||||||
|
@ -776,12 +778,11 @@ FGDialog::makeObject (SGPropertyNode *props, int parentWidth, int parentHeight)
|
||||||
puaLargeInput * obj = new puaLargeInput(x, y,
|
puaLargeInput * obj = new puaLargeInput(x, y,
|
||||||
x + width, x + height, 2, slider_width, wrap);
|
x + width, x + height, 2, slider_width, wrap);
|
||||||
|
|
||||||
if (props->hasValue("editable")) {
|
if (props->getBoolValue("editable"))
|
||||||
if (props->getBoolValue("editable")==false)
|
obj->enableInput();
|
||||||
obj->disableInput();
|
else
|
||||||
else
|
obj->disableInput();
|
||||||
obj->enableInput();
|
|
||||||
}
|
|
||||||
if (presetSize)
|
if (presetSize)
|
||||||
obj->setSize(width, height);
|
obj->setSize(width, height);
|
||||||
setupObject(obj, props);
|
setupObject(obj, props);
|
||||||
|
|
Loading…
Add table
Reference in a new issue