It is currently 19 Apr 2024, 11:07
   
Text Size

card view from prompts

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, 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: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 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: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 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 51 guests


Who is online

In total there are 51 users online :: 0 registered, 0 hidden and 51 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 51 guests

Login Form