/*************************************************************************
    Handler for mouse movement
*************************************************************************/
void Listbox::onMouseMove(MouseEventArgs& e)
{
    if (d_itemTooltips)
    {
        static ListboxItem* lastItem = 0;

        ListboxItem* item = getItemAtPoint(e.position);
        if (item != lastItem)
        {
            if (item)
            {
                setTooltipText(item->getTooltipText());
            }
            else
            {
                setTooltipText("");
            }
            lastItem = item;
        }

        // must check the result from getTooltip(), as the tooltip object could
        // be 0 at any time for various reasons.
        Tooltip* tooltip = getTooltip();

        if (tooltip)
        {
            if (tooltip->getTargetWindow() != this)
                tooltip->setTargetWindow(this);
            else
                tooltip->positionSelf();
        }
    }

    Window::onMouseMove(e);
}
Beispiel #2
0
 PathgridMode::PathgridMode(WorldspaceWidget* worldspaceWidget, QWidget* parent)
     : EditMode(worldspaceWidget, QIcon(":placeholder"), Mask_Pathgrid | Mask_Terrain | Mask_Reference,
         getTooltip(), parent)
     , mDragMode(DragMode_None)
     , mFromNode(0)
     , mSelectionMode(0)
 {
 }
Beispiel #3
0
void InventoryItem::decreaseCurrentStack()
{
  if( currentStackSize > 0 )
  {
    currentStackSize--;
    getTooltip()->reloadTooltip();
  }
}
Beispiel #4
0
void InventoryItem::increaseCurrentStack()
{
  if( currentStackSize < getItem()->getMaxStackSize() )
  {
    currentStackSize++;
    getTooltip()->reloadTooltip();
  }
}
Beispiel #5
0
void CPetGlyph::updateTooltip() {
	CPetText *petText = getPetSection()->getText();
	if (petText) {
		petText->setColor(getPetSection()->getColor(0));
		getTooltip(petText);

		if (_owner)
			getPetSection()->stopTextTimer();
	}
}
Beispiel #6
0
	void setStatus(const String& ttStr, bool startWarning)
	{
		EventLogger::getInstance()->logMessage(m_nickname + " : " + ttStr);
		setTooltip(getTooltip() + "\n" + Time::getCurrentTime().toString (false, true) + " : " + ttStr);
		if (startWarning)
		{
			m_countdown = 40;
			startTimer(200);
		}
	}
Beispiel #7
0
//--------------------------------------------------------------
void Parameter::writeToXml(ofxXmlSettings &xml, bool bFullSchema) {
    ofLogVerbose("ofxMSAControlFreak") << "msa::controlfreak::Parameter::writeToXml: " << getPath();

    _xmlTagId = xml.addTag(_xmlTag);
    xml.addAttribute(_xmlTag, "type", getTypeName(), _xmlTagId);
    xml.addAttribute(_xmlTag, "name", getName(), _xmlTagId);
    if(_paramValue) _paramValue->writeToXml(xml, bFullSchema);

    if(bFullSchema) {
        xml.addAttribute(_xmlTag, "path", getPath(), _xmlTagId);
        xml.addAttribute(_xmlTag, "tooltip", getTooltip(), _xmlTagId);
        //            xml.addAttribute(_xmlTag, "parent", _pparent ? _pparent->getName(): "none", _xmlTagId);
    }
}
Beispiel #8
0
/*************************************************************************
    Handler for mouse movement
*************************************************************************/
void Tree::onMouseMove(MouseEventArgs& e)
{
    if (d_itemTooltips)
    {
        static TreeItem* lastItem = 0;
        
        Vector2f posi(CoordConverter::screenToWindow(*this, e.position));
        //      Point posi = relativeToAbsolute(CoordConverter::screenToWindow(*this, e.position));
        TreeItem* item = getItemAtPoint(posi);
        if (item != lastItem)
        {
            if (item != 0)
            {
                setTooltipText(item->getTooltipText());
            }
            else
            {
                setTooltipText("");
            }
            lastItem = item;
        }
        
        // must check the result from getTooltip(), as the tooltip object could
        // be 0 at any time for various reasons.
        Tooltip* tooltip = getTooltip();
        
        if (tooltip)
        {
            if (tooltip->getTargetWindow() != this)
                tooltip->setTargetWindow(this);
            else
                tooltip->positionSelf();
        }
    }
    
    Window::onMouseMove(e);
}