Skinnable sudoku (1 Viewer)

Sambal

Portal Pro
February 4, 2008
144
144
Home Country
Netherlands Netherlands
The current version of the sudoku game is very limited from a skinning perspective. Some color and image settings are hardcoded. This is no problem for lightcoloured skins but for the darker ones like Monochrome or Aeon it gets hard to play the game and there is currently no way to fix this.

I think to achieve a professional look of MP even when using third party skins at least the plugins shipped with MP should look good and therefore need to be skinnable.

I use a dark skin (Aeon) and play the Sudoku game every once in a while so i decided to make the game skinnable.

Everything i changed is backwards compatible so if you don't have any changed skin files the game looks the same way it does now.

I've made changes to the cell control. By doing so it is now possible to make changes per cell and thus allowing for greater control over the appearance of the game board.

The following tags are implemented for the cell control.

<textcolor> The colour of text when you enter a value
<disabledcolor> The colour of text for numbers the game provides
<incorrectcolor> The colour for invalid numbers you enter or the solution if you press solve
<textureFocus> Texture when the cell has focus
<textureNoFocus> Texture when the cell doesn't have focus
<font> font used to render number

Attached are the modified source files.

Happy sudoku-ing :D

Sambal
 

Sambal

Portal Pro
February 4, 2008
144
144
Home Country
Netherlands Netherlands
Great, now what do I do with those files to skin my Sudoku?
Thanks
Patrick

You replace the original sudoku(Numberplace) source files and build yourself a new WindowPlugins.dll. Next you replace the original WindowPlugins.dll with your new one and you're set to go :)

This does not actually skin your sudoku, it only replaces the current sudoku with a skinnable version. This means you now have the ability to skin the sudoku game which wasn't possible before. To some extend it was but you now have greater control.

If you don't have the tools to build a new dll i uploaded one to rapidShare here.
 

Patrick-Mav

MP Donator
  • Premium Supporter
  • November 19, 2008
    35
    1
    Home Country
    Germany Germany
    Ok, cool.
    Downloaded the new .dll from rapidshare and replaced in my installation. Sudoku is still working.

    I assume, I have to put a skin.xml now somewhere, in which I define the textcolour. How exactly do I do that?
    Sorry for sounding so newbie-ish, but I am a newbie to MP.

    Thanks for your help. I appreciate it.
    Rgds
    Patrick
    :D
     

    Sambal

    Portal Pro
    February 4, 2008
    144
    144
    Home Country
    Netherlands Netherlands
    ...

    I assume, I have to put a skin.xml now somewhere, in which I define the textcolour. How exactly do I do that?

    ...

    In the directory of your favourite skin, probably something like 'MediaPortal\skin\Aeon wide' ;), you'll find mynumberplace.xml. This is where the sudoku game is defined.

    The tags i mentioned in the OP can be applied to controls of type cell. You'll find 81 of them.

    To change the text colour to blue for all cells simply do a search/replace
    replace <type>cell</type> with <type>cell</type><textcolor>000FF</textcolor>
     

    Users who are viewing this thread

    Top Bottom