Crazy Eddie's Waffle Thread

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Crazy Eddie's Waffle Thread

Postby CrazyEddie » Mon May 24, 2004 19:01

The slider and thumb widgets are done (these were done on Saturday) and are in CVS. At the moment the slider has a configurable 'max' value, what I am considering doing is changing this so it always returns a float between 0 and 1, then you can use this value to scale whatever you need appropriately - any opinions on this?

I have completed the Progress bar widget (this is not in CVS yet), the standard Taharez look progress bar is done and working okay, though I still have a couple of bugs in the alternate Taharez progress bar to fix.

Various bugs in the Window base class have been ironed out also.

I did not work on the system today and will almost certainly not work on it tomorrow, though I'll be in full swing from Wednesday onwards. This coming weekend is a 4 dayer for me, so by a week on Wednesday I hope to have the scrollbars, edit box, listbox and combobox completed :D

User avatar
iamthecompiler
Just popping in
Just popping in
Posts: 2
Joined: Wed Jan 12, 2005 12:06

Crazy Eddie's Waffle Thread

Postby iamthecompiler » Mon May 24, 2004 19:54

I think configurable max is the way to go, becuase it is then super easy to convert from a float 0 to 1 while going from a float 0 to 1 to an int between 0 and max is a bit harder. Thats how Im handling my widgets.

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Crazy Eddie's Waffle Thread

Postby alipolatolu » Tue May 25, 2004 09:34

yep, great technique. With this, we can do calculations only a multiplation :D and this is great :D

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Crazy Eddie's Waffle Thread

Postby CrazyEddie » Tue May 25, 2004 13:23

Okay, that's one person for each method :lol:

What about if the value was changed from a ulong to a float. This would default to 1.0f (so the range is 0 - 1 as previously mentioned) and as alipolatolu states usage is as simple as

Code: Select all

result = myMax * slider->getValue();


but for those who want the other approach, with a configurable maximum, you can set the max to be whatever you want:

Code: Select all

 slider->setMax(100);


and use that instead.

So, to conclude, you effectively get the best of both worlds, the only real difference being the return value will be a float and not an unsigned long.

Any further comments on this?

User avatar
iamthecompiler
Just popping in
Just popping in
Posts: 2
Joined: Wed Jan 12, 2005 12:06

Crazy Eddie's Waffle Thread

Postby iamthecompiler » Tue May 25, 2004 19:23

I have changed my mind, 0.0f to 1.0f is the way to go.

(I figured since this is the waffle thread that I could waffle) :)

User avatar
leedgitar
Not too shy to talk
Not too shy to talk
Posts: 29
Joined: Wed Jan 12, 2005 12:06

Crazy Eddie's Waffle Thread

Postby leedgitar » Tue May 25, 2004 22:08

I agree as well, 0.0f to 1.0f is a nice universal range to stick with. Users have the option to do what they please with the value, i.e. using it to scale sound volume, transparency, whatever to a value that makes sense in their context.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Crazy Eddie's Waffle Thread

Postby CrazyEddie » Wed May 26, 2004 04:56

Cool. :) I'll make the change later today. I'll use the same approach with the progress bar too.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Crazy Eddie's Waffle Thread

Postby CrazyEddie » Fri May 28, 2004 11:41

I have added solution and project files to the Mk-2 module for Visual C++ version 7.0 (that's .Net 2002). The system compiles and runs without any problems when using this compiler (so long as you have all the dependencies).

I have done some preliminary investigation too see if Mk-2 will compile under Visual C++ version 6. There are some required changes to be made for compatibility with this compiler, though nothing too terrible (not on the magnitude of what was required with the Mk1 system). I'll get this sorted out shortly, along with any changes required for compilation under linux.

This weekend I'll be working on some of the remaining widgets :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Crazy Eddie's Waffle Thread

Postby CrazyEddie » Tue Jun 01, 2004 17:17

Well, let's see...

The slider class is now all finished. I have also completed the progress bar, along with the two derived versions for the Taharez widgets.

I have done the majority of the edit box (the Taharez redering widget is complete). The base class is only lacking clipboard and undo support. As some of you will already know, I have removed many of the options from the edit box (like "numbers mode", "allow decimal point", etc), and replaced this with a validation system that uses regular expressions - this enables the edit box to be configured in ways beyond what could be offered via a set of hard-coded options.

I have started modifying the imagery a little so it looks right when texture filtering is enabled - this generally makes the display look much better.

Today I have made quite a few bug fixes to the system, none of these were what I would consider major problems, but were certainly things that needed addressing. There are still some issues that I am aware of and I'll hopefully get some more of these sorted tomorrow.

The scroll bar base class has been implemented today with the exception of mouse wheel support. There is no rendering class written for the widget yet, I'll do the Taharez large vertical scroller and the mini-vertical and mini-horizontal derived classes tomorrow.

On Thursday I'll make a start of the Static widget.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Crazy Eddie's Waffle Thread

Postby CrazyEddie » Fri Jun 11, 2004 17:58

Well, I haven't posted any waffle lately :)

I have done the Taharez scroll bar classes these all work nicely. The static widget is now done and has been transformed into two separate classes in Mk-2; StaticText, and StaticImage. These both offer a customisable frame and backdrop, along with the text or Image - which can be formatted in various ways (I'll also be adding line-break support to the StaticText sometime soon).

I have been working on the Listbox, though progress has been very slow, not because it's particularly difficult, just that I'm having "one of those weeks" ;) One point of interest is that the new Listbox will not be limited to text, but can basically have anything you want as a list item via a ListboxItem class. This does make the widget a tiny bit more complicated to use, but I think the benefits of this approach will vastly outweigh the small increase in complexity. I'll initially provide ListboxItem classes for text and images, though anyone can extend this collection to do pretty much anything. I have thought about having a ListboxItem that allowed you to add a window as a list box item, I'm not sure how useful this would be - any comments?

I anticipate getting all the widgets completed over the next two weeks. Once this is done, I'll add the properties for each window class, which will then enable me to implement the loading of GUI layouts from XML files. This will be closely followed by the beginings of the scripting system.

Chris / Leedgitar is also going great guns with his C# / Axiom version of the system. He expects to release an early demo this coming weekend - which should be very good :D


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 16 guests