ChessPenguin 0.2.0: screenshots in English and Russian, shorter better lines
Some checks failed
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
Release / version (push) Has been cancelled
Release / linux (push) Has been cancelled
Release / flatpak (push) Has been cancelled
Release / windows (push) Has been cancelled
Release / publish (push) Has been cancelled
Some checks failed
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
Release / version (push) Has been cancelled
Release / linux (push) Has been cancelled
Release / flatpak (push) Has been cancelled
Release / windows (push) Has been cancelled
Release / publish (push) Has been cancelled
- New screenshots (Merida pieces, green board) in English and Russian: engine analysis, game review, engine marks, engine settings, library, settings. - Better lines under marked moves show 6 moves and grow while stepping. - CP_REPORT dev hook; version 0.2.0, changelog and AppStream release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
56cfb4d09f
commit
26bf901124
23 changed files with 50 additions and 11 deletions
|
|
@ -198,6 +198,9 @@ impl App {
|
|||
if std::env::var("CP_ENGINE_PANEL").is_ok() {
|
||||
g.debug_open_engine_settings();
|
||||
}
|
||||
if std::env::var("CP_REPORT").is_ok() {
|
||||
g.debug_show_report();
|
||||
}
|
||||
if let Some(k) = std::env::var("CP_BEST").ok().and_then(|v| v.parse().ok()) {
|
||||
g.debug_best_line(k);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -958,6 +958,14 @@ impl GameView {
|
|||
self.engine_settings_open = true;
|
||||
}
|
||||
|
||||
/// Shows the Report tab (with the graph) when an analysis is available.
|
||||
pub fn debug_show_report(&mut self) {
|
||||
if self.review.has_data() {
|
||||
self.review.visible = true;
|
||||
self.side_tab = SideTab::Report;
|
||||
}
|
||||
}
|
||||
|
||||
/// Opens the better line of the first engine-marked move up to its `shown`-th move.
|
||||
pub fn debug_best_line(&mut self, shown: usize) {
|
||||
let mark = self
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ pub enum NotationCommand {
|
|||
|
||||
const ROW_H: f32 = 26.0;
|
||||
const NUM_W: f32 = 38.0;
|
||||
/// Moves of an engine's better line shown under a marked move.
|
||||
const MARK_LINE_MOVES: usize = 6;
|
||||
|
||||
impl Notation<'_> {
|
||||
pub fn show(self, ui: &mut Ui) -> NotationResponse {
|
||||
|
|
@ -275,7 +277,9 @@ fn mark_block(ui: &mut Ui, n: &Notation, id: NodeId, mark: &Mark, out: &mut Nota
|
|||
return;
|
||||
}
|
||||
ui.label(RichText::new(tr("Best:")).weak());
|
||||
for (i, san) in mark.best_san.iter().enumerate() {
|
||||
// Short by default; grows while the line is stepped through on the board.
|
||||
let visible = MARK_LINE_MOVES.max(shown.unwrap_or(0));
|
||||
for (i, san) in mark.best_san.iter().enumerate().take(visible) {
|
||||
let label = match start {
|
||||
Some((num, turn)) => {
|
||||
let ply = i as u32 + u32::from(turn == Color::Black);
|
||||
|
|
@ -310,6 +314,9 @@ fn mark_block(ui: &mut Ui, n: &Notation, id: NodeId, mark: &Mark, out: &mut Nota
|
|||
out.best = Some((id, i + 1));
|
||||
}
|
||||
}
|
||||
if mark.best_san.len() > visible {
|
||||
ui.label(RichText::new("…").weak());
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue