Some questions about QuickGUI...

fassihi

23-06-2007 03:44:56

Hello,

First of all this UI Library seems to be very cool. I had some questions:

Does QuickGUI support Drag and drop?

I need to create a UI for character inventory with drag and drop. What would be the best way to do this using quickGUI?

I assume it supports adding 3D meshes to UI since it is based on Overlays, is this right?

How about being able to define the windows and components on a file and loading that file?

kungfoomasta

23-06-2007 04:52:22

Does QuickGUI support Drag and drop?

In its current state, QuickGUI supports dragging of Widgets, (used for dragging windows and TrackBar Slider) but there are no Drag and Drop Widgets created. If you can provide me with any pictures/requirements/information about a drag/drop widget that you would like, I would be willing to implement it. (I'm thinking of Dialbo II, but that seems like a grid with tetris-like pieces. Would take some thinking)

I assume it supports adding 3D meshes to UI since it is based on Overlays, is this right?

I haven't experimented with this. Right now I'm trying to work on the fundamental widgets. :wink: What would be a good example of a 3d mesh for UI use? Maybe a Cube with a button on each side or something?

How about being able to define the windows and components on a file and loading that file?

gogoplayer has mostly completed this, however real life has stepped in and taken most of his time. When the editor gets to a useable state Serialization of UI Sheets will be completed. :)

To sum it up, I haven't yet gotten around to implementing advanced Widgets/features to meet more advanced UI requirements. I do plan to imlpement this all, but I am one person, and it will take time. Each version of QuickGUI I release has a lot of enhancements to the internal structures, so I'm hoping by the time I get to v1.x.x I can put most effort into making more advanced widgets. Well, even if this isn't the case, the library will benefit. :wink:

fassihi

24-06-2007 07:06:07

Thanks for the reply KungFooMasta,

For the drag and drop features, yes something like Diablo 2 and other RPGs where you can drag items from the inventory which is Tetris like and put them on the character. Or buy something from a shop window by dragging the item over to the inventory.

For the 3D mesh in UI, examples would be showing the character in the UI and being able to rotate this character. Or a character's face in the HUDs.

Thanks for your efforts. I hope to be able to add some help as I get to know the library more.

jingjie

01-07-2007 10:54:20

Master kungfoomasta :
About QuickGUI's widgets, I have some sugestions.

Would QuickGUI's widgets be supported for have a postion , rotation and scaling aniamtion properties by customer defined ?

Because I see the Navi forum to find the Dojo fisheye widget Cool demo that is powerful by javascript.

I think if have those properties , the animation effects of widgets is easy to implement it by customer. :lol:

To see:
http://dojotoolkit.org/demos/fisheye-demo

kungfoomasta

02-07-2007 07:35:28

It's called a Dojo fisheye widget? :lol:

To me, it looks liek a strip of images (icons), and when the mouse goes over the widget (or close to it) the image becomes larger. This shouldn't be hard to implement, but might need some tweaking to make it look as good. :)

I need to make a list of requested widgets, the list is growing pretty fast. :wink:

jingjie

03-07-2007 05:54:37


To me, it looks liek a strip of images (icons), and when the mouse goes over the widget (or close to it) the image becomes larger. This shouldn't be hard to implement, but might need some tweaking to make it look as good. :)

Thanks, That's good idea. :lol:
By the way.
About implementation of AnimationImage Components that was it playing a list of Images (QuickGUI::Image ) or supported for GIF format?
Master kungfoomasta, Do you have any good idea about the specification of AnimationImage? :oops:

kungfoomasta

03-07-2007 06:42:46

I haven't looked into animated images much, but looking at my current ProgressBar widget, I can see it would look much better with an animated image. (although I would need 100 images, one for each percent..)

Since QuickGUI uses Ogre materials, all you need to do to animate images via code is to make sure the material supports "anim_texture", and then set the frame via Ogre::TextureUnitState::setCurrentFrame. I haven't tried this myself, but that's the direction I would take. :wink:

jingjie

04-07-2007 06:53:07


Since QuickGUI uses Ogre materials, all you need to do to animate images via code is to make sure the material supports "anim_texture", and then set the frame via Ogre::TextureUnitState::setCurrentFrame. I haven't tried this myself, but that's the direction I would take. :wink:


About setting the frame via Ogre::TextureUnitState::setCurrentFrame or scaling the size of Image, I think Ogre::ControllerManger is good chiosed
method.
this exampe is scaling the size of Image via the implementation Ogre::ControllerValue<T>. :lol:

To see :

class ImageScaleController : public ControllerValue<Real>
{
protected:
Real mMinSize;
Real mSizeRange;
Real mIntensity;
QuickGUI::Image* mImage;
Ogre::ControllerValue<Real>* mCreator;
public:
ImageScaleController( QuickGUI::Image* image , Real minSize , Real maxSize)
{
mMinSize = minSize ;
mSizeRange = maxSize - minSize ;
mImage = image ;
mCreator = 0;

}
virtual Real getValue() const
{
return mIntensity;
}
virtual void setValue( Real value) const
{
mIntensity = value;
Real newSize = mMinSize + ( mIntensity * mSizeRange );
Ogre::Vector4 dim = mImage->getDimensions(QuickGUI:: QGUI_GMM_RELATIVE ,QuickGUI:: QGUI_GMM_PIXEL);
mImage->getDimensions(Ogre::Vector4( dim.x ,dim.y , newSize , newSize ) ,QuickGUI:: QGUI_GMM_RELATIVE ,QuickGUI:: QGUI_GMM_PIXEL);

}
}

We create controller during mouse entering ,after this is will get update on its own.

ControllerManager& mControllerManager = ControllerManager.getSinglton();
ControllerValueRealPtr value = ControllerValueRealPtr(new ImageScaleController(mImage, 60, 100));
ControllerFunctionRealPtr func = ControllerFunctionRealPtr(
new WaveformControllerFunction(Ogre::WFT_SINE, 0.75, 0.5));
mControllerManager.createController(mControllerManager
.getFrameTimeSource(), value , func);

I also think to set the frame via Ogre::TextureUnitState::setCurrentFrame via via the implementation Ogre::ControllerValue<T>. :lol:
Master kungfoomasta, The idea hopes to be ussful.

kungfoomasta

04-07-2007 08:58:44

Definately interesting! :shock:

How is it that the controller gets updated automatically?

How is that different than making calls directly to setSize? Is this what you made for the FishEye Widget? I think it needs a better name.. lol.

1. Make a Widget that inherits from Label, called myWidget.
2. Make a skin for it, an almost transparent background, so it will receive mouse movement events.
3. Make enumerated type to distinguish between vertical and horizontal dock, like the TrackBar Widget. Type is determined by dimensions.
4. Add a an OverlayPanelElement for the actual dock image, if you want one.
5. Add ability to add Buttons (the icons)
6. Add ability to set max Button height and min button height.
7. Override the onMouseMoved event. Record mouse position and determine nearby buttons...

Haven't thought it all out. I think I should get moving on the editor.
Thanks for sharing that! I just think that the controller functionality can be done via the widgets..

jingjie

04-07-2007 16:44:26


How is it that the controller gets updated automatically?

To see ControllerManager::updateAllControllers() that is called by SceneManager::_renderScene via per-frame then excutes all Controller::update() that tells this controller to map it's input controller value to it's output controller value, via the controller function.


void Controller::update(void)
{
if(mEnabled)
mDest->setValue(mFunc->calculate(mSource->getValue()));
}



How is that different than making calls directly to setSize? Is this what you made for the FishEye Widget? I think it needs a better name.. lol.

I wanna set the smooth size of image to be variety by controller function(WaveformControllerFunction or custom ControllerFunction).
I thought that it can extend into the variety of alpha fade-in or fade-out for widgets. 8) :oops: