Steps, part 2

Not too much going on this week, still playing way too much Team Fortress 2 🙂 I’ve fixed a couple of problems with the sequencing. For example, the first draw step of the game must be skipped for a normal 2 player game. Also, I’m in the process of having the same steps UI on the right side of the layout. The left part will only be visible on your turn, the right part on your opponent’s turn. I think I’ve seen that in Incantus, so kudos to you 🙂 I’m still learning WPF, so some small things take more time than I would think. For example, just getting the same steps control to be used both for the right and left side was quite tricky:


The answer was to apply this pretty complicated binding on my listbox:

    Binding RelativeSource=
                RelativeSource FindAncestor,
                               AncestorType={x:Type UserControl}

so that my ListBox takes the correct HorizontalContentAlignment set on my Steps control. I’m kind of disappointed that only some WPF dependency properties are inherited by child controls.. and HorizontalContentAlignment is not one of them 😦

The next step is to show only the appropriate side 🙂 Still no UI glue code yet, so all is good in WPF land 🙂


About fparadis2

Lead Game programmer
This entry was posted in Mox. Bookmark the permalink.

One Response to Steps, part 2

  1. Incantus says:

    I use the same panel of phase icons for both sides, just moving it from one side to the other and redoing the layout. To highlight priority I shade the color of the current phase according to the player’s color. This is pretty easy since my interface is OpenGL and every icon is basically a texture-rendered quad. I got the initial idea from Magic Workstation, although they show the phase icons across the middle of the screen (since the players are split into the top and bottom halves. But i liked the way the phase bar would pop into the half of the current player.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s