chore: initial padel scaffold + design docs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-04 09:58:02 +02:00
commit cad84029fd
16 changed files with 1380 additions and 0 deletions

28
source/garmin-padelApp.mc Normal file
View File

@@ -0,0 +1,28 @@
import Toybox.Application;
import Toybox.Lang;
import Toybox.WatchUi;
class garmin_padelApp extends Application.AppBase {
function initialize() {
AppBase.initialize();
}
// onStart() is called on application start up
function onStart(state as Dictionary?) as Void {
}
// onStop() is called when your application is exiting
function onStop(state as Dictionary?) as Void {
}
// Return the initial view of your application here
function getInitialView() as [Views] or [Views, InputDelegates] {
return [ new garmin_padelView(), new garmin_padelDelegate() ];
}
}
function getApp() as garmin_padelApp {
return Application.getApp() as garmin_padelApp;
}

View File

@@ -0,0 +1,15 @@
import Toybox.Lang;
import Toybox.WatchUi;
class garmin_padelDelegate extends WatchUi.BehaviorDelegate {
function initialize() {
BehaviorDelegate.initialize();
}
function onMenu() as Boolean {
WatchUi.pushView(new Rez.Menus.MainMenu(), new garmin_padelMenuDelegate(), WatchUi.SLIDE_UP);
return true;
}
}

View File

@@ -0,0 +1,19 @@
import Toybox.Lang;
import Toybox.System;
import Toybox.WatchUi;
class garmin_padelMenuDelegate extends WatchUi.MenuInputDelegate {
function initialize() {
MenuInputDelegate.initialize();
}
function onMenuItem(item as Symbol) as Void {
if (item == :item_1) {
System.println("item 1");
} else if (item == :item_2) {
System.println("item 2");
}
}
}

View File

@@ -0,0 +1,33 @@
import Toybox.Graphics;
import Toybox.WatchUi;
class garmin_padelView extends WatchUi.View {
function initialize() {
View.initialize();
}
// Load your resources here
function onLayout(dc as Dc) as Void {
setLayout(Rez.Layouts.MainLayout(dc));
}
// Called when this View is brought to the foreground. Restore
// the state of this View and prepare it to be shown. This includes
// loading resources into memory.
function onShow() as Void {
}
// Update the view
function onUpdate(dc as Dc) as Void {
// Call the parent onUpdate function to redraw the layout
View.onUpdate(dc);
}
// Called when this View is removed from the screen. Save the
// state of this View here. This includes freeing resources from
// memory.
function onHide() as Void {
}
}