Hi, I follow and explore chess very very infrequently, like once in a few years, usually when maybe a chess championship is going on or hear something about a new chess engine or I am experimenting something or so.
So also I am not good at visualizing text chess move lines/variations without having visual hint like coordinates on a chess board. Given that currently ScidVsPC doesnt have an option for the same wrt analysis board, have created this patch (03- patch file name) to enable the same. If the user enables coordinates on all sides wrt the main board (ie boardCoords value 2), then this logic will enable coordinates on the analysis board. Inturn when working on this, noticed that the board::flip logic wasn't setting the vertical (1-8) coordinate values correctly for the analysis board always, it seemed to have a race based on when the board gets enabled and when the user toggles board coords. So have created a additional patch (04- patch file name) which sets the labels based purely on flip variable. NOTE: Not able to reproduce this currently, dont remember the sequence of enabling different options and boards, but did notice it few times initially, when I was working with only 03- patch file. Also this 04- patch file makes the logic directly depend on flip variable rather than any value that may be already there wrt the labels. So feel this may be a better logic. NOTE: I had created & inturn maintain scidvspc-hkvc snap package, to run scidvspc on linux distros with snap package system support, which again I update once in a bluemoon. These patches are included in the version which I have released there. I have added the suffix -hkvc to ensure that in future if the scidvspc team wants to release their own snap package, there is no confusion. These patches can be tested/verified by running the scidvspc-hkvc snap package, if needed. -- Keep ;-) HanishKVC
--- scid 2024-11-29 13:46:32.000000000 +0530 +++ scid.hkvc 2024-11-29 13:58:29.042475082 +0530 @@ -142536,6 +142536,12 @@ if {![winfo exists $w.frame.bd]} { frame $w.frame ::board::new $w.frame.bd [expr {$analysis(boardSize) * 5 + 20}] 0 $::board::_flip(.main.board) + if {$::boardCoords == 2} { + set ::board::_coords($w.frame.bd) 1 + } else { + set ::board::_coords($w.frame.bd) 0 + } + ::board::coords $w.frame.bd button $w.frame.close -image arrow_close -font font_Small -relief flat -command " set analysis(showBoard$n) 0 pack forget $w.frame @@ -142591,6 +142597,12 @@ } set bd .analysisWin$n.frame.bd + if {$::boardCoords == 2} { + set ::board::_coords($bd) 1 + } else { + set ::board::_coords($bd) 0 + } + ::board::coords $bd if {$::board::_flip($bd) != $::board::_flip(.main.board)} { ::board::flip $bd }
--- scid 2024-11-29 20:44:04.000000000 +0530 +++ scid.hkvc 2024-11-29 21:19:56.319770297 +0530 @@ -161873,11 +161873,18 @@ } # Change coordinate labels: + if {$flip} { + for {set i 1} {$i <= 8} {incr i} { + $w.lrank$i configure -text $i + $w.rrank$i configure -text $i + } + } else { for {set i 1} {$i <= 8} {incr i} { - set value [expr {9 - [$w.lrank$i cget -text]} ] + set value [expr {9 - $i}] $w.lrank$i configure -text $value $w.rrank$i configure -text $value } + } if {$flip} { foreach file {a b c d e f g h} newvalue {h g f e d c b a} { $w.tfile$file configure -text $newvalue
_______________________________________________ Scidvspc-users mailing list Scidvspc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scidvspc-users