[Kde-games-devel] [PATCH] Single Pile Highlighting in KPat

Parker Coates parker.coates at gmail.com
Tue Dec 2 07:21:47 CET 2008


Hello list,

The attached patch for KPat "fixes" a behaviour that has mildly
annoyed me for some time.

Currently when dragging a card, KPat checks all piles currently under
the card and highlights all those that are valid drop points for the
card being moved. In certain situations in certain games, this can
lead to up to four piles being highlighted at once. The problem is
that from any given position, the card can only actually be dropped on
a single pile. Highlighting more than one pile, when in reality only
one is the "real" drop target is a little misleading and (in my
opinion) looks bad.

My patch essentially extracts the pile selection code from the drop
function into its own method. This method is then called by both the
hover logic (for selecting which pile to highlight) and the drop
function (for selecting the pile to drop on). The result is less code
and more consistency.

So I come to you with the following questions. Do we agree that
highlighting a single pile is preferred to highlighting multiple
piles? Does my patch look alright? This is my first time touching the
KPat code base, so I wouldn't be surprised if I missed something.

Thanks,

Parker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KPatSingleHighlight.diff
Type: text/x-patch
Size: 3922 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20081202/b55a2e9a/attachment.diff 


More information about the kde-games-devel mailing list