1
0
mirror of https://github.com/Burrit0z/kai synced 2025-07-03 13:26:48 +00:00

progress towards rewrite (code trash rn)

This commit is contained in:
Burrit0z
2020-05-21 21:00:28 -04:00
parent 5aae2efc2e
commit 16f294d77f
6 changed files with 45 additions and 23 deletions

19
Kai.xm
View File

@ -6,14 +6,14 @@
-(void)_layoutStackView {
NSInteger lastSlot = [[self stackView].subviews count] -1;
//NSInteger lastSlot = [[self stackView].subviews count] -1;
//this code is used to determine if kai is at the bottom of the stack view
if([[self stackView].subviews objectAtIndex:lastSlot] != [KAIBattery sharedInstance] && belowMusic) {
//if([[self stackView].subviews objectAtIndex:lastSlot] != [KAIBattery sharedInstance] && belowMusic) {
//if it is not, but the option to have kai below music is on, i simply remove from it's current pos.
//and insert into last slot.
[[self stackView] removeArrangedSubview:[KAIBattery sharedInstance]];
[[self stackView] insertArrangedSubview:[KAIBattery sharedInstance] atIndex:lastSlot];
}
//[[self stackView] removeArrangedSubview:[KAIBattery sharedInstance]];
//[[self stackView] insertArrangedSubview:[KAIBattery sharedInstance] atIndex:lastSlot];
//}
//makes kai lay itself out when the stack does
[self KaiUpdate];
@ -78,6 +78,13 @@
if(!isUpdating) {
isUpdating = YES;
[[KAIBattery sharedInstance] updateBattery];
[self KaiUpdate];
isUpdating = NO;
/*isUpdating = YES;
[UIView animateWithDuration:0.3 animations:^{
//nice fade out
@ -94,7 +101,7 @@
isUpdating = NO;
}];
}];
}];*/
}