mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
scene and track colors; random_color_near
This commit is contained in:
parent
f500c717a2
commit
6bee5b0bcd
5 changed files with 80 additions and 38 deletions
|
|
@ -120,7 +120,8 @@ impl Handle<Tui> for PhrasePool<Tui> {
|
|||
self.phrase += 1;
|
||||
},
|
||||
key!(KeyCode::Char('d')) => { // insert duplicate
|
||||
let phrase = (*self.phrases[self.phrase].read().unwrap()).clone();
|
||||
let mut phrase = (*self.phrases[self.phrase].read().unwrap()).clone();
|
||||
phrase.color = random_color_near(phrase.color, 0.1);
|
||||
self.phrases.insert(self.phrase + 1, Arc::new(RwLock::new(phrase)));
|
||||
self.phrase += 1;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue