[Kde-games-devel] First wishes for KGamePopupItem

Kleag kleag at free.fr
Mon Jun 25 22:05:07 CEST 2007


Hello,
On Sunday 24 June 2007 23:44:30 Dmitry Suzdalev wrote:
> On Monday 25 June 2007 00:38, Kleag wrote:
> > Dmitry,
> >
> > I just tried KGamePopupItem and here are my first wishes :-)
>
> Great! Let's see :)
>
> > - it does not use the same colors, so this should probably be
> > configurable (through styles ? I had not tried them up to now) ;
>
> I thought about this. Perhaps I shoud just add methods for setting up
> background and text colors... and font.
Anybody used the Qt styles ? If not, I'll experiment with that.
>
> > - it has square angles, where I'd like rounded ones. I implemented them
> > by making my MessageBubble to be a QGraphicsPathItem with a
> > QGraphicsTextItem children for the message itself. Have a look at
>
> Yes, this could be delivered as an option (some enum).
Yes.

>
> > svn+ssh://kleag@svn.kde.org/home/kde/trunk/playground/games/ksirk/ksirk/M
> >es sageBubble .[h|cpp] if you want;
>
> Thanks I'll take a look. But I think svn+ssh needs a pair of keys, no? :)
> Do you have anonymous access set up?
Yes, sorry, I often paste quicker than I think... 
svn://anonsvn.kde.org/home/kde/trunk/playground/games/ksirk/ksirk/MessageBubble.h
svn://anonsvn.kde.org/home/kde/trunk/playground/games/ksirk/ksirk/MessageBubble.cpp

>
> > - I use rich text (setHtml with the message on the children item), so
> > with your version, my message are a little bit ugly with their <br/> :-)
> > ;
>
> Well, I really don't know about this one. I must say that I designed this
> class to _specifically_ show _simple_ one-line _text_ messages to user.
> I don't know whether I should drop this and implement full featured
> multiline rich text support...
For me, it's beginner help, a sort of as-you-play tutorial, so I sometimes
 have to display a little bit more than one line.
But, I already read that you are now convinced :-)

> Other options we might have: implement similar but more complex (internally
> of course) QGraphicsItem with multiline rich text support.
>
> This would follow QGV way then: they have QGraphicsSimpleTextItem and
> QGraphicsTextItem.
Yes, it could be an option. Do like you prefer, I have no definitive opinion
 here.

> > - one should probably be able to change or hide the icon;
>
> Hmm. How about providing "roles"? I mean something like {Q,K}MessageBox
> has: KGamePopupItem::Information, KGamePopupItem::Error, etc.
> OTOH apps might need something different than we provide.
> I think we should just study real usecases to see what route to take.
>
> Kleag, what icon would you want to set?
Well, here it was more a feeling: I feel the (i) icon not very funny for a
 game. So, I thinked that one could want to customize it to be aligned with
 their game skin. In my case, it could be a cannon sprite, for example. 
But I could use two different icons: one for the tutorial data and one for
 real game info.

>
> > - finally, I had the plan to add to my version a control to allow the
> > user to say he don't want to see this message anymore. I'd like to be
> > able to do so with yours too.
>
> Well, it can be disabled by providing a link to follow (when richtext will
> be supported)
Yes, I did not think to this one.

>
> > I could do some of these changes myself, if you agree ?
>
> Let's come to agreement with all the points above before taking any action
> ;)
Sure !
>
> > Sorry, I forgot one point. My graphics scene is larger than the window,
> > so I display my message not at the top left of the scene but at the top
> > left of the window, using a mapToscene... To use KGamePopuItemp, I should
> > also solve this problem.
>
> Ah. Yes, we should implement this.
>
> Thanks for your input!
It's a pleasure...

Bye. 

Kleag


More information about the kde-games-devel mailing list