|
|
@ -53,6 +53,7 @@ namespace NLGUI
|
|
|
|
_MouseDown = false;
|
|
|
|
_MouseDown = false;
|
|
|
|
_CallingAH = false;
|
|
|
|
_CallingAH = false;
|
|
|
|
_Cancelable = false;
|
|
|
|
_Cancelable = false;
|
|
|
|
|
|
|
|
_Keyboard = false;
|
|
|
|
_Target = NULL;
|
|
|
|
_Target = NULL;
|
|
|
|
_Inverted = false;
|
|
|
|
_Inverted = false;
|
|
|
|
_IsDBLink = false;
|
|
|
|
_IsDBLink = false;
|
|
|
@ -221,6 +222,11 @@ namespace NLGUI
|
|
|
|
return toString( _Cancelable );
|
|
|
|
return toString( _Cancelable );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
if( name == "keyboard" )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return toString( _Keyboard );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
if( name == "frozen" )
|
|
|
|
if( name == "frozen" )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return toString( _Frozen );
|
|
|
|
return toString( _Frozen );
|
|
|
@ -401,6 +407,14 @@ namespace NLGUI
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
if( name == "keyboard" )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool b;
|
|
|
|
|
|
|
|
if( fromString( value, b ) )
|
|
|
|
|
|
|
|
_Keyboard = b;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
if( name == "frozen" )
|
|
|
|
if( name == "frozen" )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool b;
|
|
|
|
bool b;
|
|
|
@ -470,6 +484,7 @@ namespace NLGUI
|
|
|
|
xmlSetProp( node, BAD_CAST "target_stepy", BAD_CAST toString( _TargetStepY ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "target_stepy", BAD_CAST toString( _TargetStepY ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "step_value", BAD_CAST toString( _StepValue ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "step_value", BAD_CAST toString( _StepValue ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "cancelable", BAD_CAST toString( _Cancelable ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "cancelable", BAD_CAST toString( _Cancelable ).c_str() );
|
|
|
|
|
|
|
|
xmlSetProp( node, BAD_CAST "keyboard", BAD_CAST toString( _Keyboard ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "frozen", BAD_CAST toString( _Frozen ).c_str() );
|
|
|
|
xmlSetProp( node, BAD_CAST "frozen", BAD_CAST toString( _Frozen ).c_str() );
|
|
|
|
|
|
|
|
|
|
|
|
return node;
|
|
|
|
return node;
|
|
|
@ -585,6 +600,9 @@ namespace NLGUI
|
|
|
|
prop = (char*) xmlGetProp( node, (xmlChar*)"cancelable" );
|
|
|
|
prop = (char*) xmlGetProp( node, (xmlChar*)"cancelable" );
|
|
|
|
if (prop) _Cancelable = convertBool(prop);
|
|
|
|
if (prop) _Cancelable = convertBool(prop);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prop = (char*) xmlGetProp( node, (xmlChar*)"keyboard" );
|
|
|
|
|
|
|
|
if (prop) _Keyboard = convertBool(prop);
|
|
|
|
|
|
|
|
|
|
|
|
prop= (char*) xmlGetProp (node, (xmlChar*)"frozen");
|
|
|
|
prop= (char*) xmlGetProp (node, (xmlChar*)"frozen");
|
|
|
|
_Frozen = false;
|
|
|
|
_Frozen = false;
|
|
|
|
if (prop)
|
|
|
|
if (prop)
|
|
|
@ -850,6 +868,7 @@ namespace NLGUI
|
|
|
|
if (CCtrlBase::handleEvent(event)) return true;
|
|
|
|
if (CCtrlBase::handleEvent(event)) return true;
|
|
|
|
if (!_Active || _Frozen)
|
|
|
|
if (!_Active || _Frozen)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
if (event.getType() == NLGUI::CEventDescriptor::mouse)
|
|
|
|
if (event.getType() == NLGUI::CEventDescriptor::mouse)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event;
|
|
|
|
const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event;
|
|
|
@ -908,6 +927,28 @@ namespace NLGUI
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (event.getType() == NLGUI::CEventDescriptor::key)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const NLGUI::CEventDescriptorKey &eventDesc = (const NLGUI::CEventDescriptorKey &)event;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (eventDesc.getKeyEventType() == NLGUI::CEventDescriptorKey::keydown)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_Keyboard)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
sint32 i = 0;
|
|
|
|
|
|
|
|
// direction
|
|
|
|
|
|
|
|
if (eventDesc.getKey() == KeyNEXT) i++;
|
|
|
|
|
|
|
|
if (eventDesc.getKey() == KeyPRIOR) i--;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_Vertical)
|
|
|
|
|
|
|
|
moveTrackY(-(i * _TargetStepY));
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
moveTrackX(-(i * _TargetStepX));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1209,6 +1250,7 @@ namespace NLGUI
|
|
|
|
if(wReal <= maxWReal)
|
|
|
|
if(wReal <= maxWReal)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// compute the new ofsX.
|
|
|
|
// compute the new ofsX.
|
|
|
|
sint32 ofsX= _Target->getOfsX();
|
|
|
|
sint32 ofsX= _Target->getOfsX();
|
|
|
|
ofsX+= dx;
|
|
|
|
ofsX+= dx;
|
|
|
|