some problem about window and label

interfoz

14-03-2008 07:37:24

my englis is poor :)

------

i'm using quickgui in my project,but i take some problem about window and label.

1,how to create a windows of fix border style? or i hope there is a resize event.

2, why label is too slow ,when set a lot of multi-line text.

kungfoomasta

14-03-2008 18:23:57

1. Windows have borders by default, and can be created from a Sheet:

mGUIManager->getDefaultSheet()->createWindow();

If you want to disable borders, you can call

myWindow->setUseBorders(false);

2. I need more information. What is your layout? What are you trying to do, and how many labels are you creating? Can you show any code?

interfoz

17-03-2008 02:48:57

thanks for your post
create lavel

m_displayinfolabel = m_displayiosheet->m_modwindow->createLabel();
m_displayinfolabel->setDimensions(QuickGUI::Rect(0,0,400,382));
m_displayinfolabel->setVerticalAlignment(QuictGUI::Label::VA_BOTTOM);
m_displayinfolabel->setHorizontalAlignment(QuickGUI::Label::HA_LEFT);


set text

WCHAR temp[] = L"ffffffffffffffffffff\nffffffffffffffffffff\nffffffffffffff\nfffffffffff\nfffffffffffffff\nfffffffffffffff\nfffffffffffff\nfffffffffffff\nfffffffffffffffff\nfffffffffffffffff\nfffffffffffffff\nfffffffffffffff\nffffffffffff\nffffffffffff\nfffffffffff\n";
m_displayinfolabel->setText(Ogre::UTFString(temp));


when set too long multi-line text, fps <=10

kungfoomasta

17-03-2008 16:41:54

Interesting. The way the functionality was designed, the rendering should have stopped when the text grew outside the dimensions of the label. Looks like the code needs to be reviewed...

You might try using the LabelArea widget, it might suit your needs better.

interfoz

18-03-2008 03:27:23

labelArea can't bottom vertical alignment ,and how to set a multi-line text,

\n is useless...

thecaptain

18-03-2008 20:13:22

I added line ending '/n' support into LabelArea for the last patch I submitted. I'm not sure if it got added in yet.

kungfoomasta

18-03-2008 22:38:02

I think I've applied and committed all patches that came my way. I'd have to check to be sure, but if you want to go ahead and commit the changes that would work.

interfoz, you're using

m_displayiosheet->m_modwindow->createLabelArea();

?

interfoz

19-03-2008 02:09:19

yes,i am using m_modwindow->createLabelArea();

i am using 0.9.7 release