Hi Steve,

Attaching two patches

1. Define variables which get managed through options.dat, for the
colors used wrt BoardVisualiseMoves Odd and Even lines, so that user
can configure/change the same if required.

2. Allow user to select which engine PV from among MultiPVs to show on
analysis board wrt moves visualisation.



-- 
Keep ;-)
HanishKVC
Index: tcl/start.tcl
===================================================================
--- tcl/start.tcl	(revision 3499)
+++ tcl/start.tcl	(working copy)
@@ -424,6 +424,8 @@
 set analysis(boardSize) 2
 set analysis(boardType) Arrows
 set analysis(boardSeqNumColor) black
+set analysis(boardSeqL0Color) white
+set analysis(boardSeqL1Color) gray40
 
 # Colors
 
Index: tcl/tools/analysis.tcl
===================================================================
--- tcl/tools/analysis.tcl	(revision 3499)
+++ tcl/tools/analysis.tcl	(working copy)
@@ -3782,7 +3782,7 @@
 
       # Show an arrow between start and end squares
       set coord [::board::mark::GetArrowCoords $board $sq_start $sq_end [expr $::board::arrowLength*0.33]]
-      $board create line $coord -fill [expr {($im+$ply) % 2 ? "grey40" : "white"}] -arrow last -width 2 -arrowshape {5 7 3} -tag bvm
+      $board create line $coord -fill [expr {($im+$ply) % 2 ? $analysis(boardSeqL1Color) : $analysis(boardSeqL0Color)}] -arrow last -width 2 -arrowshape {5 7 3} -tag bvm
 
       # and the move number midway along the line
 
Index: tcl/menus.tcl
===================================================================
--- tcl/menus.tcl	(revision 3499)
+++ tcl/menus.tcl	(working copy)
@@ -983,7 +983,7 @@
     gameInfo(show) gameInfo(photos) gameInfo(wrap) gameInfo(showStatus) 
     gameInfo(fullComment) gameInfo(showMarks) gameInfo(showMenu) gameInfo(showTool) 
     gameInfo(showMaterial) gameInfo(showFEN) gameInfo(showButtons) gameInfo(showTB) 
-    analysis(mini) engines(F2) engines(F3) engines(F4) analysis(logMax) analysis(logName) analysis(maxPly) analysis(lowPriority) analysis(boardSize) analysis(boardType) analysis(showBoard) analysis(showEngineInfo) analysis(wrapPV) analysis(boardSeqNumColor)
+    analysis(mini) engines(F2) engines(F3) engines(F4) analysis(logMax) analysis(logName) analysis(maxPly) analysis(lowPriority) analysis(boardSize) analysis(boardType) analysis(showBoard) analysis(showEngineInfo) analysis(wrapPV) analysis(boardSeqNumColor) analysis(boardSeqL0Color) analysis(boardSeqL1Color)
     scidBooksDir scidBasesDir 
     ::book::lastBook1 ::book::lastBook2 ::book::lastTuning ::book::sortAlpha 
     ::book::showTwo ::book::oppMovesVisible ::gbrowser::size 
Index: tcl/tools/analysis.tcl
===================================================================
--- tcl/tools/analysis.tcl	(revision 3501)
+++ tcl/tools/analysis.tcl	(working copy)
@@ -2395,6 +2395,7 @@
   ::utils::tooltip::Set $w.b.alllines $tr(AddAllVariations)
   bind $w.b.alllines <Button-3> "addAllVariations $n 2"
 
+  set analysis(boardSeqPVSel$n) [lrange {0 1 2 3 4 5 6 7 8 9} 0 0]
   spinbox $w.b.multipv -from 1 -to 8 -increment 1 -textvar analysis(multiPVCount$n) -justify center \
     -width 2 -font font_Small -command "changePVSize $n" 
   ::utils::tooltip::Set $w.b.multipv $tr(Lines)
@@ -2782,6 +2783,12 @@
       sendToEngine $n "setoption name MultiPV value $analysis(multiPVCount$n)"
     }
   }
+
+  set analysis(boardSeqPVSel$n) [lrange {0 1 2 3 4 5 6 7 8 9} 0 [expr $analysis(multiPVCount$n)-1]]
+  if {[winfo exists .analysisWin$n.frame.pvsel]} {
+    .analysisWin$n.frame.pvsel selection set 0
+  }
+
 }
 
 
@@ -3687,8 +3694,19 @@
     button $w.frame.close -image arrow_close -font font_Small -relief flat -command "
       set analysis(showBoard$n) 0
       pack forget $w.frame"
+    pack $w.frame.bd $w.frame.close -side left -anchor n
 
-    pack $w.frame.bd $w.frame.close -side left -anchor n
+    if {$analysis(boardType$n) == "Sequential"} {
+      listbox $w.frame.pvsel -listvariable analysis(boardSeqPVSel$n) -width 0 -height 0 -exportselection false
+      $w.frame.pvsel selection set 0
+      ::utils::tooltip::Set $w.frame.pvsel {select multipv pv to view}
+      bind $w.frame.pvsel <<ListboxSelect>> "
+        set analysis(boardSeqLengthSeen$n) 0
+        set analysis(boardSeqDepthSeen$n) 0
+        updateAnalysisBoard $n redraw"
+      pack $w.frame.close $w.frame.pvsel -side top -anchor n
+    }
+
     bind $w.frame.bd.bd <Button-2> "
       $w.frame.bd.bd delete var bvm
       nextBoardType $n"
@@ -3868,6 +3886,8 @@
       }
     } else {
       # Hanish's feature
+      set pvsel [.analysisWin$n.frame.pvsel curselection]
+      set pvmoves [lindex [lindex $analysis(multiPVraw$n) $pvsel] 2]
       if {[sc_pos moves] == {}} {
         set analysis(boardSeqLengthSeen$n) 0
         set analysis(boardSeqDepthSeen$n) 0 
@@ -3874,12 +3894,12 @@
       } else {
         # Show some amount of the initial part of the Main PV using thin arrows
         if {$analysis(uci$n) && 
-            ([llength $moves] > $analysis(boardSeqLengthSeen$n)/2 || 
+            ([llength $pvmoves] > $analysis(boardSeqLengthSeen$n)/2 || 
             $analysis(depth$n) > ($analysis(boardSeqDepthSeen$n)+1) ||
             $analysis(scoremate$n) != 0)} {
-          set analysis(boardSeqLengthSeen$n) [llength $moves]
+          set analysis(boardSeqLengthSeen$n) [llength $pvmoves]
           set analysis(boardSeqDepthSeen$n) $analysis(depth$n)
-          boardVisualizeMoves $bd.bd $n $moves
+          boardVisualizeMoves $bd.bd $n $pvmoves
         } else {
           $bd.bd raise bvm
         }
_______________________________________________
Scidvspc-users mailing list
Scidvspc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scidvspc-users

Reply via email to