The International Simutrans Forum

 

Author Topic: selected theme  (Read 300 times)

0 Members and 1 Guest are viewing this topic.

Offline Andarix

  • *
  • Posts: 338
  • Languages: de
selected theme
« on: November 22, 2021, 12:17:36 PM »
Is it possible that the active theme is marked in the selection list for thmes?

For the fonts, the button for the selected font is depressed. This is not the case with the themes.

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: selected theme
« Reply #1 on: November 22, 2021, 01:10:38 PM »
The code seems to be intended for that, but it doesn't seem to work right now. That is a bug.

EDIT: It compares the path of the theme file with the text in the button(theme name), so they will never match.
Code: [Select]
i.button->pressed = !strcmp( env_t::default_theme.c_str(), i.label->get_text_pointer() ); // mark current theme
« Last Edit: November 22, 2021, 01:21:13 PM by Ranran »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: selected theme
« Reply #2 on: November 23, 2021, 12:22:49 PM »
Fixed in r10244

Offline Ranran

  • Devotee
  • *
  • Posts: 1704
  • 今日は兎汁よー
  • Languages: ja
Re: selected theme
« Reply #3 on: November 24, 2021, 01:39:47 AM »
Oh, I'm sorry I was lazy. I wasn't expecting it to be such an easy fix, and I was hoping you would fix it. (´・ω・`)  Anyways, thank you.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: selected theme
« Reply #4 on: November 24, 2021, 01:51:12 AM »
Oh, I'm sorry I was lazy. I wasn't expecting it to be such an easy fix, and I was hoping you would fix it. (´・ω・`)  Anyways, thank you.
;D ;D ;D ;D ;D :P