how to change font size for [menu]/[action] 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 change font size for [menu]/[action] in UI theme?

Post by lea »

this seems to be ignored:

Code: Select all

[menu]
# (other keys for [menu] tag)
font_size=20
[menu]
(similarly for [action])

is there any way to change font size for in-game menus from UI theme?
or any other way at least?

EDIT: also is there any way to change default font size for text in tooltips of UI theme [label]'s?
Last edited by lea on January 22nd, 2022, 7:05 am, edited 1 time in total.
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
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: how to change font size for [menu]/[action] in UI theme?

Post by Lord-Knightmare »

I think you have to make your own theme and add your preferred sizes there. That's how it's done in BMR.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
lea
Posts: 300
Joined: October 1st, 2016, 7:25 pm

Re: how to change font size for [menu]/[action] in UI theme?

Post by lea »

Lord-Knightmare wrote: January 21st, 2022, 8:19 pm I think you have to make your own theme and add your preferred sizes there. That's how it's done in BMR.
what is "BMR"?
or are there any other working examples?
it is of course in UI theme, that's where [menu]/[action] tags are from
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
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: how to change font size for [menu]/[action] in UI theme?

Post by Lord-Knightmare »

lea wrote: January 22nd, 2022, 7:04 am
Lord-Knightmare wrote: January 21st, 2022, 8:19 pm I think you have to make your own theme and add your preferred sizes there. That's how it's done in BMR.
what is "BMR"?
or are there any other working examples?
it is of course in UI theme, that's where [menu]/[action] tags are from
Bad Moon Rising. It has its defined UI theme for the extra features in it. So, that's an working example you can check out.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
lea
Posts: 300
Joined: October 1st, 2016, 7:25 pm

Re: how to change font size for [menu]/[action] in UI theme?

Post by lea »

Lord-Knightmare wrote: January 22nd, 2022, 12:41 pmBad Moon Rising. It has its defined UI theme for the extra features in it. So, that's an working example you can check out.
downloaded "Bad Moon Rising" campaign from Wesnoth 1.14
it does use custom UI theme and even has a custom UI dialog for unit stats opened from right-click menu but all font sizes for its menus and tooltips are same as for default theme
where exactly did you see menus with changed font sizes?
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
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: how to change font size for [menu]/[action] in UI theme?

Post by Lord-Knightmare »

where exactly did you see menus with changed font sizes?
Back in the 1.15 version of the campaign. However, people complained about the smaller font causing greater eye strain so it was reverted back it seems.

However, if you think changing font sizes is bugged, file a bug report at bugs.wesnoth.org
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
beetlenaut
Developer
Posts: 2814
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: how to change font size for [menu]/[action] in UI theme?

Post by beetlenaut »

WML keys and tags only exist in certain contexts and are ignored in all others. The font_size key only exists in [label] and subtags of [status]. That explains why it is being ignored in [menu], but not why that decision was made. I would file a feature request to be able to use ThemeWML to change the font of all UI items that have text. (It does need to be fixed because the main BfW font seems to be set in pixels, and is tiny on a high-res monitor.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
lea
Posts: 300
Joined: October 1st, 2016, 7:25 pm

Re: how to change font size for [menu]/[action] in UI theme?

Post by lea »

would rather prefer an ugly workaround that works in older versions of Wesnoth
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)
Post Reply