Skip to content

Commit

Permalink
command op
Browse files Browse the repository at this point in the history
  • Loading branch information
tomara-x committed Jun 10, 2024
1 parent 5092085 commit a5466eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ but for persistent change to bloom/tonemapping you have to leave the circles wit
- `update_rate`
- inputs: `n -> 1`, `n -> 2`
- by default quartz will respond (as fast as possible) to any mouse input/movement, or keyboard input, or if the refresh duration has elapsed. that duration is by default 1/60 of a second (60fps) when the window is in focus, and 30fps when out of focus. first input is the refresh rate (in hz) for focused mode, second input is unfocused rate
- `command`
- inputs: `0 -> 1` (op string to first input)
- when the white hole is open set the command line text to the string of the input circle
- `screenshot`
- inputs: `n -> 1`
- when input num is non-zero, take a screenshot and save it as screenshots/{time in ms since 1970}.png (make sure that folder exists)
Expand Down
9 changes: 9 additions & 0 deletions src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,15 @@ pub fn process(
}
}
}
} else if op == "command" {
for hole in holes {
if let Ok(wh) = white_hole_query.get(*hole) {
if wh.link_types == (0, 1) && wh.open {
let input = access.op_query.get(wh.bh_parent).unwrap().0.clone();
access.command_line_text.single_mut().sections[0].value = input;
}
}
}
} else if op == "screenshot" {
for hole in holes {
if let Ok(wh) = white_hole_query.get(*hole) {
Expand Down

0 comments on commit a5466eb

Please sign in to comment.