This Home Screen application is a Pygame-based user interface that allows users to navigate through different apps displayed as circular icons. The app features an interactive main menu where the main home button toggles the visibility of app icons. Users can select and launch these apps by clicking on them.
- Home Circle Toggle: Tap the main circle to reveal or hide the app icons.
- Animated App Icons: Smooth animations when toggling the visibility of app circles.
- Dynamic App Launch: Click on an app circle to launch the corresponding app.
- Interactive Touch Mapping: Supports capacitive touch input with custom coordinate mapping for better touch accuracy.
- Audio Feedback: Provides audio feedback for different actions (like tapping the home button or selecting an app).
- Python 3.10+
- Libraries:
pygame==2.5.0
python-dotenv==1.0.0
You can install all dependencies using the following command: pip install -r requirements.txt
- Home Screen Navigation:
- Tap the main home circle to toggle the visibility of app circles.
- Tap an app circle to launch the corresponding app.
- Touch Screen Input:
- Touch screen input is mapped using the
map_coords(x, y)
function to ensure accurate alignment with the display.
- Exiting:
- Close the application window to exit.
- The central main circle serves as a toggle button. When tapped, it animates the app circles to appear or disappear.
- Up to 8 app circles are displayed around the main circle. Each circle can be clicked to launch its respective app.
- When hovered, the circle's size increases slightly, providing a hover effect.
- Touch inputs from capacitive touch screens are mapped to the display using the
map_coords()
function. This ensures the touch points are aligned with the display.
- The app circles smoothly animate to their final positions when toggled.
- Different sounds play for key actions:
- Startup Sound: Plays on app launch.
- Home Button Sound: Plays when toggling the app menu.
- Confirmation Sound: Plays when an app is successfully launched.
- Reject Sound: Plays if the app to be launched is not found.
- Create a folder in
apps/
namedapp_<index>
, where<index>
is the next available index. - Place the app logic in
app_<index>.py
within the newly created folder. - Add an image for the app in
resources/
namedapp_<index>.jpg
.
Replace the files in the audio/
folder with your own .wav
files.
To adjust the position and layout of the circles, modify the create_circles()
function in main.py
. The app circle layout is based on polar coordinates relative to the main circle.
- Ensure that the folder and file structure for the app is correct.
- Verify that the
app_<index>.py
file exists in the correct folder.
- Adjust the
map_coords()
function to correctly align touch coordinates with the display. - I found the touch screen i bought to be inverted and rotated. Yours may not be.
- Make sure the
.wav
files are present in theaudio/
folder. - Verify that the audio files are not corrupted.
- Add more customizable animations.
- Introduce app preview animations before launch.
- Support multi-touch inputs for advanced interactions.
This project is open-source and free to use for personal or educational purposes.