how to scale image of selected unit in UI theme?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
lea
Posts: 300
Joined: October 1st, 2016, 7:25 pm

how to scale image of selected unit in UI theme?

Post by lea »

how to make image of selected/highlighted unit (middle right on attached screenshot) 2x larger than default?
same as it looks in recruit dialog (top left on attached screenshot)
unit-images-in-UI.PNG
if UI theme syntax does not allow scaling then maybe it can be done outside of UI theme with lua?
author of: Altered Era/Ruleset (AKA "Altera"), latest version is on add-ons servers for BfW 1.16 and 1.14, latest version also still supports BfW 1.12 and 1.10, 1.10 server is stuck with older buggy version)
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: how to scale image of selected unit in UI theme?

Post by beetlenaut »

You can add a theme .cfg file to data/themes and then select it in the BfW preferences. (I'm not sure if that is the preferred way to do it, but it does work.) You can modify that theme however you want, including scaling, but it would probably take some study to get the effect you are going for.

Anyway, you can read up on themeWML here: https://wiki.wesnoth.org/ThemeWML, and there are some examples in this thread: viewtopic.php?p=213690#p213690.

Some of the UI elements, including the unit image border, are just .png images stored here: data/core/images/themes, and you would need to modify those as well.

I'm sure other people with high-resolution monitors would appreciate a larger theme, so if you actually do this, you should post it.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Post Reply