Skip to content

Commit

Permalink
register the variables on start (#92)
Browse files Browse the repository at this point in the history
Some variables are initialized with dashes at first. This should put them in the combo-boxes and stuff for layout editing.
  • Loading branch information
AlexKnauth authored Jul 17, 2024
1 parent e8203b1 commit 96b6ea8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hit_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::hollow_knight_memory::*;
use crate::timer::{Resettable, Timer};

/// The dash symbol to use for generic dashes in text.
const DASH: &str = "—";
pub const DASH: &str = "—";
/// The minus symbol to use for negative numbers.
const MINUS: &str = "−";
/// The plus symbol to use for positive numbers.
Expand Down
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use hollow_knight_memory::*;
use splits::Split;
use timer::{Resettable, SplitterAction, Timer};
use load_remover::LoadRemover;
use hit_counter::HitCounter;
use hit_counter::{HitCounter, DASH};
use ugly_widget::store::StoreGui;

asr::async_main!(stable);
Expand Down Expand Up @@ -56,6 +56,14 @@ async fn main() {

asr::print_message("Hello, World!");

// register the variables on start
asr::timer::set_variable_int("hits", 0);
asr::timer::set_variable_int("segment hits", 0);
asr::timer::set_variable("pb hits", DASH);
asr::timer::set_variable("comparison hits", DASH);
asr::timer::set_variable("delta hits", DASH);
asr::timer::set_variable("item", "");

let mut gui = Box::new(SettingsGui::wait_load_merge_register().await);

let mut ticks_since_gui = 0;
Expand Down

0 comments on commit 96b6ea8

Please sign in to comment.