The buttons in Cricket 26 were an adventure. We hadn't done anything this fun with regular ol' buttons since the competition buttons in Rugby 25, but they were implemented when I was very new and wasn't really sure about the best way to go about them. Still, they provided a really valuable base to get the Cricket buttons working just how I wanted them!
The rainbows were super exciting, and it meant that I figure out the most efficient way to get this done.
My first thought was resource dictionaries - great idea, but that meant a lot of files for just a colour and a little background decoration, and would have gotten out of hand really quickly due to the competition buttons as well:
So for the basic coloured buttons, I set up a dependency property that set the colour and then used triggers to adjust the colours and decor accordingly. With the competition buttons, I used individual resource dictionaries instead, but for the basic colours it felt a bit like overkill. It would have been fine, but it was pretty fun to dip my toes in the water of some more interesting custom dependency properties.
These buttons also led to me developing the Tile Row Control, which has been brought across to many of our other games. It's a ListBox that grabs how many items there are, how wide they are, which item the user has selected and calculates how far to move the list based on this information. This gives us a whole lot more freedom with animation than the stock-standard WPF ScrollViewer, which doesn't really play nice with animation, especially when controllers are involved.
Since it's a custom control, I had to write a whole lot of C++. I'm not going to pretend I'm fluent - pointers are confusing and the syntax is such a pain for someone who doesn't come from a programming background, but I got by with a little help from my friends. And I was gonna try, with a little help from my friends... Thanks, Big Ant UI Programming Team! <3
Writing animations in xaml was already an adventure, but I can promise that writing animations in C++ is significantly worse and I'll never complain about xaml again. However... Nothing compares to the joy I felt after getting this to work, and realising that maybe custom controls aren't that scary. A whole new world opened up to me after this, and it was such a win for my confidence!
"Cricket 26 - The Official Game of the Ashes"
"Featuring the all-new Management Career, a bigger and better Pro Team, in-depth Ashes mode, and expanded control on and off the field from enhanced gameplay and in-depth strategies - Cricket 26 is The Ultimate Showdown."
Working at Big Ant Cricket 26 has been one of my favourite experiences so far, because the menus in this game are just so FUN! I learned so much on this project and was able to dip my toes into the implementation side of things a little more.