Reverse time graphics

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
Duke_Anax
Posts: 35
Joined: March 29th, 2024, 10:50 pm

Reverse time graphics

Post by Duke_Anax »

For people who live in the northern Hemisphere (about 90% of people), the sun rises on the left and sets on the right. So it's odd that Wesnoth does it the other way around. I also have difficulty getting used to it, constantly second-guessing and double-checking. So can we get an option to reverse it?
Duke_Anax
Posts: 35
Joined: March 29th, 2024, 10:50 pm

Re: Reverse time graphics

Post by Duke_Anax »

Ravana wrote: April 4th, 2024, 7:48 pm It was intentionally disabled in core. https://github.com/wesnoth/wesnoth/issues/1905
OK ..., I'm just gonna not comment on that ...
Ravana wrote: April 4th, 2024, 7:48 pm Can be done with addon https://files.wesnoth.org/addons/1.14/M ... le.tar.bz2
That add-on looks plain simple, but 1.18 doesn't seem to recognize the replacement directory like that.

For a workaround, I manually overwrote the original game directory. But I don't like that approach.
User avatar
egallager
Posts: 584
Joined: November 19th, 2020, 7:27 pm
Location: Concord, New Hampshire
Contact:

Re: Reverse time graphics

Post by egallager »

Duke_Anax wrote: April 4th, 2024, 7:34 pm For people who live in the northern Hemisphere (about 90% of people), the sun rises on the left and sets on the right. So it's odd that Wesnoth does it the other way around. I also have difficulty getting used to it, constantly second-guessing and double-checking. So can we get an option to reverse it?
1. Dave (the original creator) is Australian
2. Perhaps the sun(s) work differently on Irdya?
Duke_Anax
Posts: 35
Joined: March 29th, 2024, 10:50 pm

Re: Reverse time graphics

Post by Duke_Anax »

egallager wrote: April 5th, 2024, 8:23 pm 1. Dave (the original creator) is Australian
That explains why it started that way, not why they removed the option to change it and kept it the default anyway.
2. Perhaps the sun(s) work differently on Irdya?
Doesn't matter really. It's a GUI element that is meant to remind the player of a crucial game state, so it should be localized to the player.
Imagine today's date is presented to an American as 05.04.2024 instead of 04/05/2024, they'd be confused. Or taking that argument to the extreme, you could say we don't need an English translation, write everything in Irdya, the player can get used to it.

All of that was explained in the GitHub thread, but someone in power was stubborn.
User avatar
Ravana
Forum Moderator
Posts: 3018
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Reverse time graphics

Post by Ravana »

I should be able to create Lua theme based way to mirror the images nowadays, maybe will try tomorrow.
User avatar
Ravana
Forum Moderator
Posts: 3018
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Reverse time graphics

Post by Ravana »

Uploaded for 1.18.

Code: Select all

# Addon icon is misc/time-schedules/default/schedule-morning.png~FL()~CROP(10,-10,72,72)~BLIT(misc/time-schedules/default/schedule-morning.png~CS(50,0,0)~CROP(80,-10,36,72)~BLIT(misc/red-x.png~SCALE(24,24),8,16)~O(1),36,0)

[modification]
    id=Rav_Reverse_Time_Graphics
    name=_"Reverse Time Graphics"
    description=_"Flips sidebar time of day images so that sun moves left to right."
    require_modification=yes
    [event]
        name=preload
        first_time_only=no
        [lua]
            code=<<
local old_time_of_day = wesnoth.interface.game_display.time_of_day
function wesnoth.interface.game_display.time_of_day()
	local output = old_time_of_day()
	local element = wml.get_child(output, "element")
	if element ~= nil and element.image ~= nil then
		element.image = element.image .. "~FL()"
	end
	return output
end
local old_selected_time_of_day = wesnoth.interface.game_display.selected_time_of_day
function wesnoth.interface.game_display.selected_time_of_day()
	local output = old_selected_time_of_day()
	local element = wml.get_child(output, "element")
	if element ~= nil and element.image ~= nil then
		element.image = element.image .. "~FL()"
	end
	return output
end
>>
        [/lua]
    [/event]
[/modification]

Duke_Anax
Posts: 35
Joined: March 29th, 2024, 10:50 pm

Re: Reverse time graphics

Post by Duke_Anax »

Wow, that was fast, thank you.

Now it perfectly reverses my hack to restore the default, lol. (easy fix)
Post Reply