// Author: cirakg & claude ai // Summary: Input of the spike screen: UP/DOWN or swipes scroll, START/tap jumps back to the top. import Toybox.Lang; import Toybox.WatchUi; class SpikeDelegate extends WatchUi.BehaviorDelegate { // Lines moved per button press or swipe. private const SCROLL_STEP = 3; // Large enough to reach the first line from anywhere. private const TO_TOP = -1000; private var _view as SpikeView; function initialize(view as SpikeView) { BehaviorDelegate.initialize(); _view = view; } function onNextPage() as Boolean { _view.scroll(SCROLL_STEP); return true; } function onPreviousPage() as Boolean { _view.scroll(-SCROLL_STEP); return true; } function onSelect() as Boolean { _view.scroll(TO_TOP); return true; } }