It is currently 20 Jul 2019, 22:41
   
Text Size

card view from prompts

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, friarsol, Blacksmith, KrazyTheFox, Agetian, CCGHQ Admins

card view from prompts

Postby pfps » 20 Jan 2017, 00:55

I made changes to the prompt code to show more information about the spell
or ability that caused a prompt. I also made changes to the gui interface
and the desktop gui to record this spell or ability (view) and to show its
card (view) when the mouse is over the prompt pane. This required more
changes to the code than I would have liked because the spell or ability has
to be dragged from the player code through the input code all the way to the
view code. I had to add new methods fairly high up in the class hierarchy
- for IGuiGame - showPromptMessage(playerView, message, sav)
- for InputBase - showMessage(message, sav)
pfps
 
Posts: 53
Joined: 09 Jan 2015, 14:34
Has thanked: 0 time
Been thanked: 7 times

Re: card view from prompts

Postby Agetian » 20 Jan 2017, 04:57

This is a very interesting and very nice feature to have! Thanks, I'll test it soon! :)

- Agetian
Agetian
Programmer
 
Posts: 3341
Joined: 14 Mar 2011, 05:58
Has thanked: 641 times
Been thanked: 495 times

Re: card view from prompts

Postby Xitax » 20 Jan 2017, 17:35

pfps wrote:I made changes to the prompt code...
This is a very welcome addition to be sure. Not knowing the source of the prompt or what it's asking for is an all to frequent annoyance.
Xitax
 
Posts: 861
Joined: 16 May 2010, 17:19
Has thanked: 155 times
Been thanked: 116 times

Re: card view from prompts

Postby pfps » 20 Jan 2017, 20:19

Thanks.

I'm not completely happy with the information showing up in the prompts, but at least all the relevant information should now show up.
pfps
 
Posts: 53
Joined: 09 Jan 2015, 14:34
Has thanked: 0 time
Been thanked: 7 times

Re: card view from prompts

Postby pfps » 21 Jan 2017, 17:23

Some triggered abilities on some cards don't have a description, e.g., for Boros Garrison. This isn't ideal, but I guess is a flaw in the card description and shouldn't be papered over in the code. (Besides which, it's not very clear what should be shown - the stack description could be used, but it is not very clear - the trigger description would be nice to show but I don't know how to get ahold of that when the triggered ability is asking for input.)
pfps
 
Posts: 53
Joined: 09 Jan 2015, 14:34
Has thanked: 0 time
Been thanked: 7 times

Re: card view from prompts

Postby pfps » 25 Jan 2017, 02:17

Both the desktop and the mobile interface can show the card "responsible" for a prompt, if there is one. In the desktop interface this is via clicking on the prompt. In the mobile interface this is via a long press or a swipe.
pfps
 
Posts: 53
Joined: 09 Jan 2015, 14:34
Has thanked: 0 time
Been thanked: 7 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 5 guests

Login Form