This is for the options screen:
screen options():
title "Options"
vbox:
# Check if the current background is the light mode image
if renpy.defaultbg == "your_light_mode_background_image_filename.png":
textbutton _("Enable Dark Mode") action EnableDarkMode()
else:
textbutton _("Disable Dark Mode") action DisableDarkMode()
textbutton _("Back") action Return()
# Add this line to use the dark_mode_bg style
style "options" box_style "dark_mode_bg"
add "ui/hud/options_background.png"
This is for the script.rpy or whatever .rpy that starts the game:
init:
# Set the default background to the light mode background image
$ renpy.defaultbg = "your_light_mode_background_image_filename.png"
label EnableDarkMode():
# Set the background to the dark mode background image
$ renpy.defaultbg = "your_dark_mode_background_image_filename.png"
label DisableDarkMode():
# Set the background to the light mode background image
$ renpy.defaultbg = "your_light_mode_background_image_filename.png"
I hope this works lol