Skip to content

Commit 3b8b7fc

Browse files
committed
Fix Coloring Bug in Delta Component
1 parent 471e93b commit 3b8b7fc

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

capi/bind_gen/src/emscripten.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ export interface CurrentPaceComponentStateJson {
292292
time: string;
293293
}
294294
295+
export interface DeltaComponentStateJson {
296+
text: string;
297+
time: string;
298+
color: Color;
299+
}
300+
295301
export interface RunEditorStateJson {
296302
icon_change?: string,
297303
game: string,

capi/bind_gen/src/node.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ export interface CurrentPaceComponentStateJson {
306306
time: string;
307307
}
308308
309+
export interface DeltaComponentStateJson {
310+
text: string;
311+
time: string;
312+
color: Color;
313+
}
314+
309315
export interface RunEditorStateJson {
310316
icon_change?: string,
311317
game: string,

src/component/delta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl Component {
6767
let (delta, use_live_delta) = delta::calculate(timer, comparison);
6868

6969
let mut index = timer.current_split_index();
70-
if use_live_delta {
70+
if !use_live_delta {
7171
index -= 1;
7272
}
7373
let color = if index >= 0 {

0 commit comments

Comments
 (0)