PDA

View Full Version : GUI



djonatan
03-12-2003, 11:15 PM
How can I select a line in listbox ?

In edit control , delete key and cursors are not functional.
Also, there is an error when font is loaded made with fonteditor included in the package, error is message when you exit the application.
Nothing special, fonts are working, just to report strange message.

Tokter
04-12-2003, 02:07 AM
I guess you are right, that's not working properly yet.

Because you are playing around with the gui, maybe you want to test my
editor and give some bug reports for that too :)

http://www.luedin.com/zip/GLXGui.exe

Andreaz
04-12-2003, 07:47 AM
How can I select a line in listbox ?


It's not possible to do that, it was more suposed to work as an non-editable memo. But it's possible to add the function



In edit control , delete key and cursors are not functional.


That's because i forgot to assign an event:

MainForm.OnKeyDown :=Engine.KeyDown;



Also, there is an error when font is loaded made with fonteditor included in the package, error is message when you exit the application.
Nothing special, fonts are working, just to report strange message.


The fonts included in the font gui is created in the font editor, have also tested creating a new one. How do you do to create the font, load ite etc ?

djonatan
05-12-2003, 01:46 AM
Well, for the font issue...
I've created font with fonteditor, font is arial, size 22, texture 256x256 ,
saved both font and matrics and then put this line in prog :

GLXFont1.LoadFont('GUIGraphics\Fonts\Arial.tga');

now, I can see the font, that part is ok, but when I exit from the prog
the message is 'Access violation 0493204032......' .
when i comment that line there is no message, so you dont have to use that font in prog but if you load that font (i guess other fonts as well) you
will receive that error when you exit from app.
Maybe i'm doing something wrong somewhere or maybe its hardware related or something :shock:

Tokter, really nice editor, good stuff, for now only thing i've noticed is that caption for the checkboxes is not working (didnt tried radio buttons).
btw, how can i change caption for the label (or anything else with caption) from the code if i'm using gui from guieditor?

Andreaz
05-12-2003, 07:40 AM
Well, for the font issue...
I've created font with fonteditor, font is arial, size 22, texture 256x256 ,
saved both font and matrics and then put this line in prog :

GLXFont1.LoadFont('GUIGraphics\Fonts\Arial.tga');

now, I can see the font, that part is ok, but when I exit from the prog
the message is 'Access violation 0493204032......' .
when i comment that line there is no message, so you dont have to use that font in prog but if you load that font (i guess other fonts as well) you
will receive that error when you exit from app.
Maybe i'm doing something wrong somewhere or maybe its hardware related or something :shock:

I guess none of the other font demos includes doesn't work eather ? In that case it's really sounds like a driver problem, you should try to update you'r graphic drives:

For Ati Cards: www.ati.com
For Nvidia Cards: www.nvidia.com



Tokter, really nice editor, good stuff, for now only thing i've noticed is that caption for the checkboxes is not working (didnt tried radio buttons).
btw, how can i change caption for the label (or anything else with caption) from the code if i'm using gui from guieditor?
Did you assign the font to the components ?

djonatan
06-12-2003, 01:18 AM
Sorry, my mistake, i've started everything from scratch and it works fine, trouble was that first time font was saved with texture size 512x512, and if you try with that texture size you will receive that error message 100% .

Now, for the geting value from the edit field, can you please give me an example line how can i store that value in some temp variable if i'm loading gui instead of creating it in code.

tnx

Andreaz
06-12-2003, 10:47 AM
The only thing you'll need to know is the Label's name, if the name is 'Label1' then

var Temp: String;

Temp:= (Engine.Items.Find('Label1') as TGLXLabel).Caption;

you can also retrieve the pointer to the label:

var Label1: TGLXLabel;

Label1:=Engine.Items.Find('Label1') as TGLXLabel;
Temp:=Label1.Caption;

And the font issue. It'snt a bug in the font engine that the 512x512 font doesn't work, the sprite demo uses it and it works just fine for me (ATI Radeon 9700). Could be a driver issue or the graphic card that not supports that big textures.