New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dark mode: stars instead of clouds in the main menu #11308
Comments
@sfan5 Tried to code it but failed. Patch filediff --git a/builtin/mainmenu/textures.lua b/builtin/mainmenu/textures.lua
index a3acbbdec..7c071b63b 100644
--- a/builtin/mainmenu/textures.lua
+++ b/builtin/mainmenu/textures.lua
@@ -66,6 +66,11 @@ function mm_texture.reset()
else
mm_texture.set_dirt_bg()
end
+ if core.settings:get_bool("dark_mode") then
+ core.set_timeofday(0)
+ else
+ core.set_timeofday(0.5)
+ end
end
end Error Log
Code refs
|
It looks to me like the previous version of the code is calling a function to set the main menu texture. Because it says texture, I'm skeptical that the main menu has a time of day you can adjust. |
This may require a C++ engine change and Lua changes |
@Emojigit i support this but it's worth clarifying that on typical LCDs, dark colors consume more power than light colors. LCD color tech is fundamentally subtractive, not additive, and the more color you filter out, the more electricity it uses. so white uses the lowest amount of power, black the highest. this is still a great idea tho, and i'd benefit a lot from it; i do a lot of mod testing at night and that means constantly flipping through the main screen, which is so bright it hurts my eyes lol. |
@velartrill technically wrong, but ok... |
@hlqkj https://en.wikipedia.org/wiki/LCD
it's a great feature idea, but it won't save power except for CRT users, sorry. best way for users with LCDs to save power is to turn down the backlight or graphics quality. |
And except for OLED users too, that is most of the ones using mobile phones and tablets nowadays. Those are the devices where improved power consumption could help most I think. As per LCD screens, you miss the point that the vast majority of the energy they consume comes from the backlight, not from the liquid crystal cells drive. Unless you, or your PC/monitor firmware, or your OS or something else adjusts the brightness for you the power drained by the display will not change much from its average. However most modern hardware do dynamically adjust the brightness based on the displayed image, not only for power saving but also to improve contrast and save our eyes (see for example Intel's DPST). This brightness management does have an impact on the overall power consumption and that's why darker themes could help a bit even LCD users. |
This would probably be called something else than I'd really like it if this was also possible to set from a game, I'm creating one set in space and having stars instead of clouds would be nice. An alternative solution to this is just to set a star image as a game's |
I tried to add "night mode" back in June 2021, but it only worked for the main menu (not with the loading screen). Today, I tried to add/apply "night mode", too, for the loading screen. EDIT: I only changed the colour of the sky and the clouds. There are no stars for now. |
Problem
I want the dark mode to reduce the power consumption. However, minetest does not support the dark mode.
Solutions
Use stars instead of clouds in the main menu.
The text was updated successfully, but these errors were encountered: