Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ target_link_libraries(TemplateApp PUBLIC
)

# Register the application class
RegisterApplicationClass(Template)
RegisterApplicationClass(ExampleApp)
9 changes: 4 additions & 5 deletions Template.cpp → ExampleApp.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#include "Template.h"
#include "ExampleApp.h"

// Run once
void Template::Setup() {
void ExampleApp::Setup() {
// Write Logics that happens when app first starts
}

// Run in a loop after Setup()
void Template::Loop() {
void ExampleApp::Loop() {
// Write logics that should keep happens

}

void Template::End() {
void ExampleApp::End() {
// Write logic that should happen when app exits
}
8 changes: 2 additions & 6 deletions Template.h → ExampleApp.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
/*
This is the template application for Matrix OS
*/

#pragma once

#include "MatrixOS.h"
#include "Application.h"

class Template : public Application {
class ExampleApp : public Application {
public:
inline static Application_Info info = {
.name = "Template",
.name = "ExampleApp",
.author = "203 Systems",
.color = Color(0xFFFFFF),
.version = 1,
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MatrixOS Application Template

A template repository for creating C++ native applications for [MatrixOS](https://github.com/203System/MatrixOS)
A template repository for creating C++ native applications for [MatrixOS](https://github.com/203-Systems/MatrixOS)

## 🚀 Quick Start

Expand All @@ -9,12 +9,11 @@ A template repository for creating C++ native applications for [MatrixOS](https:
3. Rename files and update the application name:
- Rename `ExampleApp.h` → `YourAppName.h`
- Rename `ExampleApp.cpp` → `YourAppName.cpp`
- Update class name from `ExampleApp` to `YourAppName` in all files
- Update `APP_NAME` in `CMakeLists.txt`
- Update class name from `ExampleApp` to `YourAppName` in all files (`.cpp`, `.h`, `.txt`)
4. Add more cpp or h files and Implement your application logic.
5. Add your app to MatrixOS (see [Installation](#installation))
5. Add your app to MatrixOS

## 🛠️ Installation
## 🛠️ Installation on MatrixOS

### Method 1: Git URL (Recommended)

Expand Down Expand Up @@ -114,14 +113,14 @@ MatrixOS provides a comprehensive UI framework for building interactive interfac
- **UIComponents** - Pre-built components like buttons, selectors, menus, and more
- **UIUtility** - Helper functions for common UI patterns (number input, text display, etc.)

To use the UI framework, create UI objects within your application and call their `Start()` method to enter UI. See the UI components in [OS/UI/](https://github.com/203System/MatrixOS/tree/main/OS/UI) for available components.
To use the UI framework, create UI objects within your application and call their `Start()` method to enter UI. See the UI components in [OS/UI/](https://github.com/203-Systems/MatrixOS/tree/main/OS/UI) for available components.
- And many more...

For complete documentation of all available APIs, refer to [Project Matrix Wiki](matrix.203.io) and [OS/MatrixOS.h](https://github.com/203-Systems/MatrixOS/blob/main/OS/MatrixOS.h).
For complete documentation of all available APIs, refer to [Project Matrix Wiki](https://matrix.203.io) and [OS/MatrixOS.h](https://github.com/203-Systems/MatrixOS/blob/main/OS/MatrixOS.h).

## 🔗 Resources

- [Project Matrix Wiki](matrix.203.io)
- [MatrixOS Repository](https://github.com/203System/MatrixOS)
- [Project Matrix Wiki](https://matrix.203.io)
- [MatrixOS Repository](https://github.com/203-Systems/MatrixOS)
- [Discord Community](https://discord.gg/rRVCBHHPfw)