working on seperating main into editor fiels
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user