Added breakpoints code.
This commit is contained in:
@ -69,9 +69,9 @@
|
||||
#include "poker/turn.h"
|
||||
#include "poker/winner.h"
|
||||
|
||||
|
||||
// User Interface Objects
|
||||
#include "ui/align.h"
|
||||
#include "ui/breakpoint.h"
|
||||
#include "ui/frame.h"
|
||||
#include "ui/framedtextmenu.h"
|
||||
#include "ui/grid.h"
|
||||
|
30
include/dawn/ui/breakpoint.h
Normal file
30
include/dawn/ui/breakpoint.h
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
|
||||
/** Maximum breakpoints that the list can support. */
|
||||
#define BREAKPOINT_COUNT_MAX 0x04
|
||||
|
||||
/** Callback for when a new breakpint is reached. */
|
||||
typedef void breakpointcallback_t(void *user, uint8_t i, float breakpoint);
|
||||
|
||||
typedef struct {
|
||||
/** List of breakpoints */
|
||||
float breakpoints[BREAKPOINT_COUNT_MAX];
|
||||
uint8_t breakpointCount;
|
||||
|
||||
/** Which breakpoint is current */
|
||||
uint8_t breakpointCurrent;
|
||||
|
||||
/** Pointer to any custom user data. */
|
||||
void *user;
|
||||
|
||||
/** Callback for when a breakpoint is reached */
|
||||
breakpointcallback_t *onBreakpoint;
|
||||
} breakpointlist_t;
|
Reference in New Issue
Block a user