Theme.txt Syntax
« on: 28 February 2016, 00:38:54 »
Sorry for all the questions, I really appreciate your help.

I'm trying to figure out the syntax of the Black.txt file included in the download so I can make my own from premade textures. I can't seem to find a description on either the forum or the main site. I assumed that the brackets with 4 values were (top,left,width,height) but that doesn't appear to work.

Also is it possible to do something like this:
Code: [Select]
Button {
    NormalImage     : "ThemeNormalImage.png" Part(whatever) Middle(whatever);
    HoverImage      : "ThemeHoverImage.png" Part(whatever) Middle(whatever);
    DownImage       : "ThemeDownImage.png" Part(whatever) Middle(whatever);

so that I could load every individual texture from its own file? Granted not safe efficient but I have them split up as it is.

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: Theme.txt Syntax
« Reply #1 on: 28 February 2016, 09:17:45 »
I wanted to write a tutorial about it because someone else asked for an explanation too, but eventually I discovered a bug while doing so and I spend the time that I had with fixing it and finishing the tests for the Texture class instead of actually writing the tutorial.
Writing a tutorial is a boring task anyway so I'm not really motivated to write it during these few hours a week that I have some spare time now.

The values are (LEFT, TOP, width, height) but for the Middle rect it should be noted that it is relative to the Part rect (if Part rect is given).

The Part and Middle rect are both optional, to load the image from a separate file, just write the following:
NormalImage : "ThemeNormalImage.png";
« Last Edit: 28 February 2016, 10:10:30 by texus »

Re: Theme.txt Syntax
« Reply #2 on: 28 February 2016, 13:19:24 »
The values are (LEFT, TOP, width, height) but for the Middle rect it should be noted that it is relative to the Part rect (if Part rect is given).
That's what I meant, thanks :)

The Part and Middle rect are both optional, to load the image from a separate file, just write the following:
NormalImage : "ThemeNormalImage.png";
Amazing, that'll really speed things up for me. Thanks for the help.