Artifacts appear when typing text into EditBox

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

Anchored
Just popping in
Just popping in
Posts: 1
Joined: Thu Oct 04, 2012 00:05

Artifacts appear when typing text into EditBox

Postby Anchored » Thu Oct 04, 2012 00:50

Hello there! I seem to be having a bit of a strange issue.

Right now I have set up a simple chat box UI (made of 3 TaharezLook windows) that allows users to send messages to one another. However I find that when I start typing text, semi-random visual artifacts appear in the edit box. I say semi-random as I can reproduce the same artifact if I type out the exact same characters, however the type of artifacts seems quite varied.

I have found that I can get the artifacts in the ListBox go away if I turn off the background rendering, leaving only the text rendering. They come back the same when I unhide the background of course. I have not tried this 'method' for the EditBox.

There are no errors listed in my CEGUI.log. I have already tried messing with various fonts, text colors, and enabling/disabling the AutoRenderingSurface property.

This is the layout that I am using for my chat UI.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
        <Window Type="TaharezLook/FrameWindow" Name="Console/Frame" >
            <Property Name="Text" Value="Console" />
            <Property Name="TitlebarFont" Value="calibri-10" />
            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
            <Property Name="TitlebarEnabled" Value="True" />
            <Property Name="UnifiedAreaRect" Value="{{0.208832,0},{0.650387,0},{0.80736,0},{0.998062,0}}" />
            <Window Type="TaharezLook/Listbox" Name="Console/Frame/ConsoleText" >
                <Property Name="Text" Value=""/>
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.019238,0},{0.030633,0},{0.973721,0},{0.769186,0}}" />
                <Property Name="InheritsAlpha" Value="False" />
                <Property Name="BackgroundEnabled" Value="True" />
            </Window>
            <Window Type="TaharezLook/Editbox" Name="Console/Frame/Input" >
                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
                <Property Name="UnifiedAreaRect" Value="{{0.019238,0},{0.772141,0},{0.973721,0},{0.980658,0}}" />
                <Property Name="MaxTextLength" Value="140" />
            </Window>
        </Window>
</GUILayout>


The essential section of my CEGUI.Log

Code: Select all

03/10/2012 17:14:34 (Std)    ********************************************************************************
03/10/2012 17:14:34 (Std)    ********************************************************************************
03/10/2012 17:14:34 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
03/10/2012 17:14:34 (Std)    ********************************************************************************
03/10/2012 17:14:34 (Std)    ---- Version 0.7.5 (Build: Sep 25 2012 Static Debug Microsoft Windows MSVC++ 10.0 32 bit) ----
03/10/2012 17:14:34 (Std)    ---- Renderer module is: RXRenderer ----
03/10/2012 17:14:34 (Std)    ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
03/10/2012 17:14:34 (Std)    ---- Image Codec module is: TGAImageCodec - Official TGA image codec ----
03/10/2012 17:14:34 (Std)    ---- Scripting module is: None ----
03/10/2012 17:14:34 (Std)    ********************************************************************************
03/10/2012 17:14:34 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
03/10/2012 17:14:34 (Std)    ********************************************************************************


Here is where I initialize my console

Code: Select all

bool ConsoleWindow::Initialize()
{
   mHideTimer = 0;

   CEGUI::WindowManager *pWindowManager = CEGUI::WindowManager::getSingletonPtr();
    mConsoleWindow = pWindowManager->loadWindowLayout("Console.layout");
    if (!mConsoleWindow)
    {
        CEGUI::Logger::getSingleton().logEvent("Error: Unable to load the ConsoleWindow from .layout");
      return false;
    }
   
   mConsoleWindow->setProperty("Alpha", "0.5");
   mConsoleWindow->setPosition( CEGUI::UVector2(CEGUI::UDim(0.0f, 0), CEGUI::UDim(0.5f, 0)) );
   mConsoleWindow->setSize(CEGUI::UVector2(CEGUI::UDim(0.3f, 0.0f), CEGUI::UDim(0.285f, 0.0f)) );
   mConsoleWindow->setProperty("SizingEnabled", "false");

   CEGUI::Listbox *output_window = static_cast<CEGUI::Listbox*>(mConsoleWindow->getChild(sTextboxName));
   if( output_window )
   {
      output_window->setMousePassThroughEnabled(true);
      output_window->getChild("Console/Frame/ConsoleText__auto_hscrollbar__")->setVisible(false);
   }

    CEGUI::System::getSingleton().getGUISheet()->addChildWindow(mConsoleWindow);
    RegisterHandlers();
   ConsoleVariable::Load();
   return true;
}


Ignore the red boxes below, I did that on purpose and they are not artifacts.
Here is an example of what I see after typing some text into the bottom EditBox and then hitting backspace a few times. Notice the 'afterimages' of the Caret.
Image

This is an example of a reproducible ( on my machine ) artifact. The first 'a' did not show an artifact in the EditBox, while this second time of typing 'a' did.
Image

Some artifacts showing up in the ListBox as well
Image

I feel like this must be an implementation glitch on my end. I was hoping that perhaps someone had seen something like this before and could give me some advice.
Thanks!

Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests