Commit graph

55 commits

Author SHA1 Message Date
Danny Piper
689f65b38a
Fix for poor performance with large decks (#4347)
* Fix for #4284

-> The menus have the update menu thing emitted when they get triggered.
| -> works surprising well https://youtu.be/KOOmhxvHA2c is a demo on a 10000ish card deck

* changed my comment to make sense

* fix to the issues that @ebbit1q found

what caued them idk

* Revert "fix to the issues that @ebbit1q found"

This reverts commit 20b1ad9f7a675fd3b0d1be7452f71160ce06de71.

* actual fix for the issues @ebbit1q found

* its dirty but works

* fix cards in zoneviews not having a menu

* deleted isempty check as it is updated after the check

* key binds should work now

-> menus updated on zone change/attach/retranslate UI if selected

* clangify

* remove updateCardMenu from carditem entirely

updateCardMenu is done by the player and having it in carditem led to it
often being run multiple times, I've opted to instead run it in the
player and remove the signal entirely

the new logic updates the cardMenu every time a card is set as the
activeCard in the game tab

additionally a cardmenu can change while selected if the selected card:
moves zone, is flipped, or is attached (it receives the unattach action)

this is done in the player instead now, checking if the card is the
activeCard

this however exposes a flaw in the selection management where if you
unselect a card the activeCard is set to nullptr, this was an existing
bug and causes the action on selected cards to suddenly disappear, even
if there are other cards selected!

* revert null test of aCardMenu

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-09-14 16:35:47 -04:00
ebbit1q
00ed5c370c
implement a maximum amount of cardmenus generated for views (#4262) 2021-03-13 14:44:57 -05:00
ebbit1q
8e1d7d12e0
allow multiple zoneviews (#4263) 2021-03-13 14:43:50 -05:00
ebbit1q
18a07274d4
clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
ctrlaltca
1288795de9
fix #3735 (#3746) 2019-06-08 10:14:58 +02:00
ctrlaltca
b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00
Fabio Bas
e94f59d7c2 Crash fix 2016-03-22 17:07:45 +01:00
Matt Lowe
1e0c4cbf87 Updated reveal zone check boxes
I saw in some images from other platforms it can take up alot of space.
Made the boxed horizontal, rather than vertical.

WIP Remade reveal zone

+ darkened card area to eaisily see boundries
+ reverted back to using a window
+ window can be resized
+ removed fake title bar and "X"
+ moved all cards revealed slightly to the right, makes it easier to
drag-select from the left

Cleanup

Changed style to use cockatrice icon

Changed cast

from static_cast to qstyleoption_cast
2015-05-05 10:14:27 +02:00
Matt Lowe
42c4f4a08c Fixed pile view bug
When sorting a view which has the last column the longest an error
happens where the view is squashed.
2015-02-01 00:31:25 +01:00
Matt Lowe
b89535f7ff Refactored code 2015-01-26 22:19:00 +01:00
Matt Lowe
54a1a28619 Added ratio scaling
Previously was adding pixels, rather than using ratios. this was cutting
off cards on higher res screens
2015-01-18 00:18:23 +01:00
Matt Lowe
aad98756d1 Refactorings
+ added comments
+ refactored optimumRect
2015-01-15 23:52:19 +01:00
Matt Lowe
e4e3a1d2e5 Sorting views
+ When viewing a sorted view (like revealing hand, or looking at
library), the cards will now be sorted in columns based on the main card
type.
+ Settings are now saved.
2015-01-14 23:19:22 +01:00
Mark Morschhäuser
49227ad44c Fixed VC "'*/' found outside of comment" warning. 2014-03-11 15:04:26 +01:00
Matt Kelly
1bc48a7849 Convert rest of source to 4-space indent 2014-02-11 11:14:19 -05:00
Max-Wilhelm Bruker
40fbbc5982 added size contraints for zone view & scroll bars, fixing issue #34 2012-04-01 14:01:20 +02:00
Max-Wilhelm Bruker
840b577f42 complete server-side AlwaysRevealTopCard support, related to issue #31 2012-03-31 22:47:42 +02:00
Max-Wilhelm Bruker
4e4a7563db The remote client now runs in an extra thread, fixing issue #29 2012-03-25 13:19:40 +02:00
Max-Wilhelm Bruker
adbb607700 Revealing a library to a player now grants that player permission to drag cards out of that library onto his own table. This permission is revoked by shuffling the library. The zone view window tracks content changes of the zone for as long as the permission lasts so that card ID changes are kept track of. This hopefully fixes issues #5 and #12. 2012-03-24 17:48:25 +01:00
Max-Wilhelm Bruker
d5c628966f PB: everything compiles except for deck storage 2012-01-01 02:48:24 +01:00
Max-Wilhelm Bruker
314f17091d protobuf client->server communication almost working 2011-12-18 18:35:14 +01:00
unknown
da467468d5 improved facedown moving 2011-09-15 14:19:29 +02:00
Max-Wilhelm Bruker
4f4049fccf ZoneViewZone fix 2011-07-22 22:04:13 +02:00
Max-Wilhelm Bruker
ce80d29f50 improved cipt handling, initial p/t for cards 2011-02-16 20:05:03 +01:00
Max-Wilhelm Bruker
9c527fb5aa Click to hide revealed cards; MultiMove function 2011-01-15 21:39:24 +01:00
Max-Wilhelm Bruker
72223b3229 minor reveal fix 2011-01-04 17:40:18 +01:00
Max-Wilhelm Bruker
231887367c card menu improvement, change controller support (bug #3) 2010-12-23 19:21:47 +01:00
Max-Wilhelm Bruker
99c0a41d18 improved rubber band drag 2010-12-14 04:37:13 +01:00
Max-Wilhelm Bruker
92d40515f2 changed card hover handling 2010-11-09 16:19:13 +01:00
Max-Wilhelm Bruker
e1380f199e full reveal card support 2010-10-28 18:44:32 +02:00
Max-Wilhelm Bruker
62bf2572a9 Crash fixes (bug #0000006). Also cleaned up some includes to speed up compilation. 2010-09-08 22:52:04 +02:00
Max-Wilhelm Bruker
168d184e8f local playing bugfixes 2010-08-11 04:23:12 +02:00
Max-Wilhelm Bruker
7921b5f82d initial commit of local server code 2010-08-04 13:56:51 +02:00
Max-Wilhelm Bruker
929f4f9b4d cleanup 2010-03-09 14:43:06 +01:00
Max-Wilhelm Bruker
26a77d9e40 new zone view code 2010-03-08 15:55:35 +01:00
Max-Wilhelm Bruker
d23ece59ea crash fixes; move_card fixes 2009-12-18 19:03:02 +01:00
Max-Wilhelm Bruker
fb61b442ca some (but not all) compatibility changes for qt 4.6 2009-12-02 22:48:19 +01:00
Max-Wilhelm Bruker
55482246dd zone view works 2009-11-29 03:35:55 +01:00
Max-Wilhelm Bruker
694070724c restructured protocol code 2009-11-29 03:07:28 +01:00
Max-Wilhelm Bruker
77015c9ebf event handling 2009-11-28 00:02:11 +01:00
Max-Wilhelm Bruker
e796af2b89 game is almost playable again 2009-11-26 18:52:53 +01:00
Max-Wilhelm Bruker
0d4717f40b new code 2009-11-25 22:58:20 +01:00
Max-Wilhelm Bruker
77f5ec29eb some gui code 2009-11-16 17:18:13 +01:00
Max-Wilhelm Bruker
cb0e4d07e4 everything compiles again; enough for today 2009-11-12 00:09:24 +01:00
Max-Wilhelm Bruker
fa16d86283 small cleanups 2009-09-23 16:00:44 +02:00
Max-Wilhelm Bruker
224a4969bd some zone view changes going on 2009-09-10 18:28:19 +02:00
Max-Wilhelm Bruker
cc8de80db8 zoneview improvement 2009-08-19 18:55:21 +02:00
Max-Wilhelm Bruker
2148005bd1 minor cleanups and log improvements 2009-08-05 16:50:16 +02:00
Max-Wilhelm Bruker
c3fb56581d small changes 2009-07-01 01:05:52 +02:00
Max-Wilhelm Bruker
175512a2ad nice ellipses :) 2009-05-23 01:58:11 +02:00