[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    Re: [kde-edu-devel] Kard
From:       Whitehawk Stormchaser <zerokode () gmx ! net>
Date:       2003-06-15 11:46:08
[Download RAW message or body]

On Saturday 07 of June 2003 03:52, Mahfouf Anne-Marie wrote:
> Hi all,
>
> I rewrote the first game I coded for KDE and I imported it in cvs HEAD in
> kdenonbeta. The name is Kard and it's a Memory-like game for young kids.
> http://edu.kde.org/kard/obtain.php
>
> At the moment, I have 2 major problems in Kard, in the kardview.cpp file.
> 1) when I set the theme to "house", there are pictures on the cards and
> they are not sized correctly.
> 2) when I click 2 same cards in this theme "house", their backgrounds are
> not recognized to be equal.
>
> KardWidget is the widget for one card i.e. a QLabel with another QLabel on
> top of it to hide it.
> In kardview.cpp:
> The layout of the game is done in the game() method (cards are drawn,
> colors or pics are set as background).
> Then when you click on a card, you go to slotTimer() and there the card is
> identified by
> kardW[co] = (KardWidget* ) sender();
> co being 0 then incremented
> when 2 cards are discovered, the connection is stopped (clicking on a card
> has no effect) and in slotMatch() I see if the cards have the same
> backgrounds.
> But this does not work when the background is a pixmap (colors work OK).
>
> If someone has some time to have a look at this, it would be great as I am
> lost... Maybe my approach to the problem is not good...
>
> Anne-Marie

...right...
OK... I have patched the CVS a bit... This is fixed:
- Compatibility with the older version of Qt (3.1) (I still have it)
- Don't crash on the changing the number of cards
- Make the 'theme1' actually install

Anne:  I think it would be better if you would assigned a number to each 
picture, and that the numbers would be then compared...
It looks like with the images was already fixed, but something is wrong... If 
I user QPixmap instead of setBackgroundPixmap it looks cool, but the problem 
is then, whichever pair you select, wether wrong or right it always 
matches...

Have exam on Wensday, and it is not likely for me to fix that anytime soon...

Regards. ~W.

-- 
Nobody can be exactly like me.  Sometimes even I have trouble doing it.
-- Tallulah Bankhead
---------------------
KDE XMame Wrapper: The KMameleon Project
http://designs.stormheart.com/kmameleon/

K Desktop Environment: "Best is opened"
http://www.kde.org/
_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic