Why can not change the text color in the tooltip ?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Just popping in
Just popping in
Posts: 1
Joined: Wed Jul 19, 2017 00:37

Why can not change the text color in the tooltip ?

Postby 0xaa55 » Wed Jul 19, 2017 00:59

I added some code in cegui-0.8.7\samples\DragDropDemo\Sample_DragDropDemo.cpp : bool DragDropDemo::initialise(CEGUI::GUIContext* guiContext)

Code: Select all

bool DragDropDemo::initialise(CEGUI::GUIContext* guiContext)
    using namespace CEGUI;

    d_guiContext = guiContext;
    d_usedFiles = CEGUI::String(__FILE__);

    // load windows look

    // load font and setup default if not loaded via scheme
    Font& defaultFont = FontManager::getSingleton().createFromFile("DejaVuSans-12.font");
    // Set default font for the gui context

    // set up defaults


    // load the drive icons imageset

    // load the initial layout

    //Here is the code I added
   Window* DragContainer2 = d_guiContext->getRootWindow()->getChild("MainWindow/Slot6/DragContainer2");
   std::stringstream ssTooltip;
      << "[colour='FF0000FF']" << "axe" << std::endl
      << "------------------------" << std::endl
      << "[top-padding='0'][bottom-padding='0'][colour='FF00FFFF']" << "This is a very sharp ax." << std::endl
      << "------------------------" << std::endl
      << "Tech Level: " << "123" << std::endl
      << "------------------------" << std::endl;


    // setup events

    // success!
    return true;

All the text does not change the color.
What should I do?

User avatar
Posts: 1757
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Why can not change the text color in the tooltip ?

Postby Ident » Thu Aug 17, 2017 19:56

Just change the style of the tooltip to whatever you want. The tooltip has a look n' feel. You can edit it to be whatever you want there. Try to look at other look n' feels to get ideas of how to change colours etc.
CrazyEddie: "I don't like GUIs"

Return to “Help”

Who is online

Users browsing this forum: No registered users and 1 guest