Skip to content

Night Mode Toggle

Tarushi edited this page Sep 11, 2024 · 1 revision

Night Mode Feature Documentation

Overview

The Night Mode feature allows users to toggle between a standard Day Mode and a visually darker Night Mode for the game's main menu. This feature helps reduce eye strain in low-light environments and provides users with an alternative visual experience.

Key Components

1. Flag Variable:

  • isNightMode:
    A boolean flag that tracks whether the Night Mode is currently enabled.

2. Textures:

  • lightBackgroundTexture:
    Stores the texture for the standard Day Mode background.
  • nightBackgroundTexture:
    Stores the texture for the Night Mode background.

Implementation

Toggle Button:

A TextButton is added to the top left corner of the screen to allow users to toggle between Day and Night Mode. The button text dynamically changes between "Night Mode" and "Day Mode" based on the current mode.

Visuals

IMG_20240911_214739_276 IMG_20240911_214742_728

Clone this wiki locally