[Kde-games-devel] A new highscore manager - KScoreManager

Matt Williams matt at milliams.com
Tue Apr 29 15:32:10 CEST 2008


On Tuesday 29 April 2008 13:22:23 Mauricio Piacentini wrote:
> Matt Williams wrote:
> >> I don't
> >> think anyone has done so yet, but I know there was talk at one time of
> >> implementing a highscore listing directly on the game canvas. In such
> >> a case, it'd be convenient to leverage the KScoreManager code wherever
> >> possible. Some potentially useful functions could be:
> >
> > Ah, yes. Thankyou for reminding me. Mauricio had said he was going to
> > have a look into this but I guess he hasn't started work on it yet. How
> > about, in addition to the show() function (which presently displays a
> > QDialog with the scores displayed) there's a function which would return
> > a QGraphicsWidget which would be a widget displaying the scores much like
> > the QDialog? This would then be embedded in an QGraphicsView
>
> Notice that not all games implement QGV, so this function would really
> need to be optional (and coexist with one that presents a QDialog). I am
> sure this was your plan, just making the point more visible, as some
> apps use OpenGL, KGameCanvas or QPainter directly.

Yes, I'll be sure to cater for both. What are people's thoughts on the 
following:
Instead of a show() function which displays the dialog directly and another 
function which provides a QGraphicsWidget for display, how about two 
functions; one which returns a KDialog which can then be show()n manually and 
another which returns a QGraphicsWidget which can be added manually. I think 
this is a much more symmetric way to handle this.

The other alternative is to have KScoreManager return the raw data which can 
then be passed to a "KScoreBoard : public KDialog" class or 
a "KGraphicsScoreBoard : public QGrapicsWidget" which will create the stuff 
and you can then display the dialog/widget how you wish?

I think I prefer the former but what do you guys think?

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080429/952f37e8/attachment.pgp 


More information about the kde-games-devel mailing list