working on seperating main into editor fiels

This commit is contained in:
2025-11-07 18:29:07 -08:00
parent 99c46cec29
commit 3f9bd14056
4 changed files with 92 additions and 34 deletions

View File

@@ -44,6 +44,8 @@ struct nomiNavigation __nav__ = {
*/
void NomiInit(trunk* tr) {
__nav__ = (struct nomiNavigation){ .branches = {0}, .depth = 0, .selectedBranch = &tr->branches[0] };
__nav__.branches[0] = 1;
__nav__.depth = 1;
}
branchId* NomiNavigation(char input) {
@@ -72,6 +74,13 @@ branchId* NomiNavigation(char input) {
return __nav__.branches;
}
branch* GetSelectedBranch() {
return __nav__.selectedBranch;
}
void SetSelectedBranch(branch* b) {
__nav__.selectedBranch = b;
}
/*
* This will create the truk of the note.
* */
@@ -100,6 +109,7 @@ void AddBranch(trunk* t, branch br) {
if(t->branchCount < MAX_BRANCHES) {
t->branches[t->branchCount] = br;
t->branchCount++;
__nav__.selectedBranch = &t->branches[t->branchCount];
}
}