Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Show related card" option added to ingame context menu #3115

Merged

Conversation

Vafthrudnir
Copy link
Contributor

@Vafthrudnir Vafthrudnir commented Feb 15, 2018

Related Ticket(s)

Short roundup of the initial problem

There was no way to know the details of a card's reverse side without actually creating that card in-game.

What will change with this Pull Request?

  • "Show Card" option added to in-game right click menus in all zones and pop-up card lists (e.g. on top cards of library view)
  • Each related card is a menu new menu item, when clicked it updates the card info widget with its details
  • Context menu on cards without related cards haven't changed

Screenshots

screenshot 2018-02-17 02 43 38

screenshot 2018-02-17 02 43 24

screenshot 2018-02-17 02 43 17

screenshot 2018-02-17 02 43 09

@Daenyth
Copy link
Member

Daenyth commented Feb 15, 2018

I'm concerned that "Show card" might be misleading to users. It's very similar to "reveal card"

@Vafthrudnir
Copy link
Contributor Author

Yeah, that really may be so. Do you have a suggestion what to rename it to?

@Daenyth
Copy link
Member

Daenyth commented Feb 15, 2018

"Display card info"? Maybe? @ZeldaZach @tooomm thoughts?

Copy link
Member

@ZeldaZach ZeldaZach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording changes and location in the grid to prevent fluff and excessive length

cardMenu->addSeparator();
auto *signalMapper = new QSignalMapper(this);
for (const CardRelation *relatedCard : relatedCards) {
QAction *viewCard = cardMenu->addAction("Show Card: \"" + relatedCard->getName() + "\"");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...->addAction(tr("View Card") + ":\"" + relatedCard->getName() + "\"");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note especially the tr, that's important so the string gets translated for other languages

@@ -2685,6 +2686,28 @@ void Player::updateCardMenu(const CardItem *card)
cardMenu->addAction(aClone);
}
}
addRelatedCardView(card, cardMenu);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this location is good for cards in hand, it's really inconvenient for cards in play. Either we should make this feature only work in hand, or we should place it somewhere better when the card's in play. Similar issues on the stack.

screenshot 2018-02-16 02 35 21

screenshot 2018-02-16 02 35 25

screenshot 2018-02-16 02 35 51

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For cards in play I'd actually put it near the token menu, maybe above or below

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought was to view related card images > submenu it

@Vafthrudnir
Copy link
Contributor Author

I left the option at the end of the context menu, but changed its name ("View related card info:") and added it as a submenu. Also added the tr() call.

Copy link
Member

@Daenyth Daenyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the screenshots updated?

@@ -2612,6 +2612,8 @@ void Player::updateCardMenu(const CardItem *card)

if (card->getZone()) {
if (card->getZone()->getName() == "table") {
// Card is on the battlefield
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this comment adds any clarity; the line above says the same thing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added since I added to all of them

cardMenu->addAction(aPlay);
cardMenu->addAction(aPlayFacedown);
cardMenu->addSeparator();
cardMenu->addAction(aClone);
cardMenu->addMenu(moveMenu);
} else {
// Card is in hand
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in hand or any custom zone that the server is using which the client isn't aware of, would be more accurate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, i'll make this change

@ZeldaZach
Copy link
Member

Screenshots Updated

Copy link
Contributor Author

@Vafthrudnir Vafthrudnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the addRelatedCardView() call is left out here, the feature won't work on revealed card (e.g. when an opponent reveals his/her hand to you)

@ZeldaZach
Copy link
Member

I see... Can you add it in for that case?

@ZeldaZach
Copy link
Member

I just have to say, with the tokens, it seems really weird to see the same card twice. Maybe we can move the create tokens to a sub dialog? What do y'all think?

@Daenyth
Copy link
Member

Daenyth commented Feb 17, 2018 via email

Copy link
Member

@ZeldaZach ZeldaZach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome change!

@ZeldaZach ZeldaZach merged commit 7cfbf11 into Cockatrice:master Feb 19, 2018
@Vafthrudnir Vafthrudnir deleted the feature/1993_show_related_card_ingame branch February 21, 2018 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants