|
|
@ -130,6 +130,7 @@ namespace NLGUI
|
|
|
|
_GroupList = NULL;
|
|
|
|
_GroupList = NULL;
|
|
|
|
_GroupMenu = NULL;
|
|
|
|
_GroupMenu = NULL;
|
|
|
|
_MouseOver = -1;
|
|
|
|
_MouseOver = -1;
|
|
|
|
|
|
|
|
_Selected = -1;
|
|
|
|
_MaxVisibleLine = -1;
|
|
|
|
_MaxVisibleLine = -1;
|
|
|
|
_ScrollBar = NULL;
|
|
|
|
_ScrollBar = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -882,8 +883,8 @@ namespace NLGUI
|
|
|
|
_SelectionView->setH (8);
|
|
|
|
_SelectionView->setH (8);
|
|
|
|
_SelectionView->setY (4);
|
|
|
|
_SelectionView->setY (4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sint highlight = _MouseOver != -1 ? _MouseOver : _Selected;
|
|
|
|
if (_MouseOver != -1 && _Lines[_MouseOver].ViewText != NULL)
|
|
|
|
if (highlight != -1 && _Lines[highlight].ViewText != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CRGBA col= _GroupMenu->_HighLightOver;
|
|
|
|
CRGBA col= _GroupMenu->_HighLightOver;
|
|
|
|
|
|
|
|
|
|
|
@ -891,7 +892,7 @@ namespace NLGUI
|
|
|
|
_SelectionView->setModulateGlobalColor(getModulateGlobalColor());
|
|
|
|
_SelectionView->setModulateGlobalColor(getModulateGlobalColor());
|
|
|
|
|
|
|
|
|
|
|
|
// get refElm and refElmYReal
|
|
|
|
// get refElm and refElmYReal
|
|
|
|
GET_REF_ELM(_MouseOver)
|
|
|
|
GET_REF_ELM(highlight)
|
|
|
|
|
|
|
|
|
|
|
|
_SelectionView->setH (refElmHReal);
|
|
|
|
_SelectionView->setH (refElmHReal);
|
|
|
|
_SelectionView->setY (refElmYReal - this->getYReal());
|
|
|
|
_SelectionView->setY (refElmYReal - this->getYReal());
|
|
|
@ -916,7 +917,7 @@ namespace NLGUI
|
|
|
|
// CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
// CViewRenderer &rVR = *CViewRenderer::getInstance();
|
|
|
|
|
|
|
|
|
|
|
|
// Highlight (background under the selection)
|
|
|
|
// Highlight (background under the selection)
|
|
|
|
if (_MouseOver != -1)
|
|
|
|
if (_MouseOver != -1 || _Selected != -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// display hightlight
|
|
|
|
// display hightlight
|
|
|
|
if(_GroupMenu->_HighLightOver.A > 0)
|
|
|
|
if(_GroupMenu->_HighLightOver.A > 0)
|
|
|
@ -994,6 +995,9 @@ namespace NLGUI
|
|
|
|
(eventDesc.getY() <= (_YReal+ _HReal))))
|
|
|
|
(eventDesc.getY() <= (_YReal+ _HReal))))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_ScrollBar && _ScrollBar->isIn(eventDesc.getX(), eventDesc.getY()))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
uint32 i = 0;
|
|
|
|
uint32 i = 0;
|
|
|
|
for (i = 0; i < _Lines.size(); ++i)
|
|
|
|
for (i = 0; i < _Lines.size(); ++i)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1409,6 +1413,13 @@ namespace NLGUI
|
|
|
|
|
|
|
|
|
|
|
|
//invalidate selection
|
|
|
|
//invalidate selection
|
|
|
|
_MouseOver = -1;
|
|
|
|
_MouseOver = -1;
|
|
|
|
|
|
|
|
if (_Selected != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_Selected == index)
|
|
|
|
|
|
|
|
_Selected = -1;
|
|
|
|
|
|
|
|
else if (_Selected > index)
|
|
|
|
|
|
|
|
_Selected--;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(_SubMenus[index])
|
|
|
|
if(_SubMenus[index])
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1442,6 +1453,7 @@ namespace NLGUI
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
void CGroupSubMenu::reset()
|
|
|
|
void CGroupSubMenu::reset()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
_Selected = -1;
|
|
|
|
uint lineCount = (uint)_Lines.size();
|
|
|
|
uint lineCount = (uint)_Lines.size();
|
|
|
|
for(sint k = lineCount - 1; k >= 0; --k)
|
|
|
|
for(sint k = lineCount - 1; k >= 0; --k)
|
|
|
|
{
|
|
|
|
{
|
|
|
|