I have a reasonably presentable version of XBoard now that implements menu dialogs XBoard so far was lacking. I also redid some existing popups, such as the Edit-Comment and Edit-Tags popups, the New-Variant dialog, the ICS Input Box, in order to simplify the code. There also is a user-configurable ICS Text Menu to send prepared commands to an ICS.
I am open to feedback on the current design. What option settings would you like in addition to see in dialogs, should there be more dialogs, etc.
The sources can be downloaded as the latest snapshot from the "popups" branch in my on-line repository:
http://hgm.nubati.net/cgi-bin/gitweb.cg ... ads/popups
Feedback on XBoard menu dialogs welcome
Moderators: hgm, Rebel, chrisw
-
- Posts: 27809
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
-
- Posts: 1763
- Joined: Sun Feb 26, 2006 1:49 pm
- Location: Edmonton, Alberta, Canada
- Full name: Peter Skinner
Re: Feedback on XBoard menu dialogs welcome
It compiles cleanly under Windows, but I don't see the ICS Text Menu to send prepared commands anywhere.hgm wrote:I have a reasonably presentable version of XBoard now that implements menu dialogs XBoard so far was lacking. I also redid some existing popups, such as the Edit-Comment and Edit-Tags popups, the New-Variant dialog, the ICS Input Box, in order to simplify the code. There also is a user-configurable ICS Text Menu to send prepared commands to an ICS.
I am open to feedback on the current design. What option settings would you like in addition to see in dialogs, should there be more dialogs, etc.
The sources can be downloaded as the latest snapshot from the "popups" branch in my on-line repository:
http://hgm.nubati.net/cgi-bin/gitweb.cg ... ads/popups
Where could this be?
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
-
- Posts: 27809
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Feedback on XBoard menu dialogs welcome
It should be in the View menu, but it is only enabled in ICS mode. To see something when you click it, the -icsMenu option should be defined, though. I the xboard.conf file that is in git I did put some demo definition:
So make sure this .conf file is installed.
In the future I want to converge the format for this option to what WinBoard has now. There you can indicate by two numbers 0 or 1 if it should send the command immediately, or just write it in the input field so the user can complete it, and if it should include the name you clicked to bring up the context menu. XBoard uses the X-term console for ICS output, though, so I cannot bring up the context menu like it happens in WinBoard, and as a consequence there is no such thing as the "clicked name". It might be possible to use the X-selection, though.
Code: Select all
-icsMenu {+Q,ptell Give me a Queen!
-Q,ptell Don't let him have a Queen!
+R,ptell Give me a Rook!
-R,ptell Don't let him have a Rook!
+B,ptell Give me a Bishop!
-B,ptell Don't let him have a Bishop!
+N,ptell Give me a Knight!
-N,ptell Don't let him have a Knight!
+P,ptell Give me a Pawn!
-P,ptell Don't let him have a Pawn!
Who,who
}
In the future I want to converge the format for this option to what WinBoard has now. There you can indicate by two numbers 0 or 1 if it should send the command immediately, or just write it in the input field so the user can complete it, and if it should include the name you clicked to bring up the context menu. XBoard uses the X-term console for ICS output, though, so I cannot bring up the context menu like it happens in WinBoard, and as a consequence there is no such thing as the "clicked name". It might be possible to use the X-selection, though.
-
- Posts: 1763
- Joined: Sun Feb 26, 2006 1:49 pm
- Location: Edmonton, Alberta, Canada
- Full name: Peter Skinner
Re: Feedback on XBoard menu dialogs welcome
I see. It would be great if a command window for ICS mode would allow one to input various commands, and save them as a term. Then when the user wanted to execute that command, it was available via an ICS menu. One could have several batch commands saved for ease of use later on.hgm wrote:It should be in the View menu, but it is only enabled in ICS mode. To see something when you click it, the -icsMenu option should be defined, though. I the xboard.conf file that is in git I did put some demo definition:
So make sure this .conf file is installed.Code: Select all
-icsMenu {+Q,ptell Give me a Queen! -Q,ptell Don't let him have a Queen! +R,ptell Give me a Rook! -R,ptell Don't let him have a Rook! +B,ptell Give me a Bishop! -B,ptell Don't let him have a Bishop! +N,ptell Give me a Knight! -N,ptell Don't let him have a Knight! +P,ptell Give me a Pawn! -P,ptell Don't let him have a Pawn! Who,who }
In the future I want to converge the format for this option to what WinBoard has now. There you can indicate by two numbers 0 or 1 if it should send the command immediately, or just write it in the input field so the user can complete it, and if it should include the name you clicked to bring up the context menu. XBoard uses the X-term console for ICS output, though, so I cannot bring up the context menu like it happens in WinBoard, and as a consequence there is no such thing as the "clicked name". It might be possible to use the X-selection, though.
This would be nice for tournament managers and ICS admins.
Peter
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
-
- Posts: 27809
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Feedback on XBoard menu dialogs welcome
I am not sure what exactly you propose here. In WinBoard the ICS context menu contains user configurable commands. Do you want to have a way to set the -icsMenu option to configure it from the menu? It would be easy enough to let the Edit-Tags dialog act on the -icsMenu (as I already added menu items to edit the -first/secondChessProgramNames and -icsNames).
-
- Posts: 2658
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
Re: Feedback on XBoard menu dialogs welcome
Compiles and runs fine under Ubuntu Linux 10.10.I am open to feedback on the current design. What option settings would you like in addition to see in dialogs, should there be more dialogs, etc.
Optic looks like an huge improvement to me. With the yellow arrows i can follow games a lot of easier. thx.
--
Srdja
-
- Posts: 1763
- Joined: Sun Feb 26, 2006 1:49 pm
- Location: Edmonton, Alberta, Canada
- Full name: Peter Skinner
Re: Feedback on XBoard menu dialogs welcome
I would like a window to popup from a menu item that will allow me to enter 5 or 6 commands and be saved as a single command. For instance:hgm wrote:I am not sure what exactly you propose here. In WinBoard the ICS context menu contains user configurable commands. Do you want to have a way to set the -icsMenu option to configure it from the menu? It would be easy enough to let the Edit-Tags dialog act on the -icsMenu (as I already added menu items to edit the -first/secondChessProgramNames and -icsNames).
Window pops up, and I type in the commands:
peter create tournament
peter set time control 50
peter set inc control 3
peter set name CCT 14
peter set open
All of the above would be saved under a command "CCT 14" from a menu dialogue, and when clicked on, would issue all those commands in the order they appear.
Then I could set multiple menu items based on event type and name. Do you see what I mean?
Peter
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
-
- Posts: 27809
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Feedback on XBoard menu dialogs welcome
Just to be sure: are you talking about WinBoard or XBoard now?
In WinBoard the ability to hide prepared user-defined commands under a button is realized through the ICS context menu. This includes groups of multiple commands like you show above. Currently, the only way to configure that in WinBoard, however, is to edit the settings file, in particular the /icsMenu={...} multi-line part of it.
I guess there are really two issues here:
1) It should be possible to configure this from the menus, rather than through editing a settings file.
2) Parsing of the menu string to recogize the items is crappy, making definition of multi-line commands very non-obvious.
The current syntax of the menu string is
Parsing of the definition strig is currently a bit flakey, though, as after locating the second number (third comma) in an item, it does not test if the following character is a ';' or linefeed separator, but simply skips to the next one. This can cause problems by skipping to an intra-command ';' of a following item (thus getting out of phase, and skipping a number of item definitions). Perhaps I should make that more stringent. But then in principle the followig item definition should always work:
The second point is how to allow making such a definition from the menu, rather than by editing an ini file. But when there wold be a dialog that brigs up the entire -icsMenu string for editing (similar to the "Options -> Add ICS..." menu that brigs up an edit dialog for the -icsNames option), wouldn't that be good enough?
Perhaps I should allow the syntax of the definition string to be more free-format, allowing the use of tabs and linefeeds which are then ignored (i.e. ignore a linefeed after comma, and all tabs after linefeed). This would allow the menu-definition string to appear in the edit box as:
An alterative would be to switch to a format that puts the numbers specifing the behavior immediately behind the item text. Or better yet, do away with the numbers completely, and adopt the convetion that any %s in the command would be replaced by the clicked word in stead, and that commands that end in an empty line are sent immediately:
It would make the editing of existing commands, or adding new ones a much more intuitive process. And by using ';' after the item text in stead of ',' to indicate this new format, it can be destinguished from the old format without loss of backward compatibility.
Would that satisfy your needs?
In WinBoard the ability to hide prepared user-defined commands under a button is realized through the ICS context menu. This includes groups of multiple commands like you show above. Currently, the only way to configure that in WinBoard, however, is to edit the settings file, in particular the /icsMenu={...} multi-line part of it.
I guess there are really two issues here:
1) It should be possible to configure this from the menus, rather than through editing a settings file.
2) Parsing of the menu string to recogize the items is crappy, making definition of multi-line commands very non-obvious.
The current syntax of the menu string is
Code: Select all
<menuDefinition> := <itemDefinition>
| <itemDefinition> ';' <menuDefinition>
| <itemDefinition> '\n' <menuDefinition>
<itemDefinition> := <menuText> ',' <IcsCommand> ',' <number> ',' <number>
<number> := '0'
| '1'
Code: Select all
CCT 14,peter create tournament
peter set time control 50
peter set inc control 3
peter set name CCT 14
peter set open,0,1
Perhaps I should allow the syntax of the definition string to be more free-format, allowing the use of tabs and linefeeds which are then ignored (i.e. ignore a linefeed after comma, and all tabs after linefeed). This would allow the menu-definition string to appear in the edit box as:
Code: Select all
CCT 14,
peter create tournament
peter set time control 50
peter set inc control 3
peter set name CCT 14
peter set open,
0,1
who,
who,
0,1
finger (name),
finger,
1,1
Code: Select all
CCT 14;
peter create tournament
peter set time control 50
peter set inc control 3
peter set name CCT 14
peter set open
shout;
shout
tell (name);
tell %s
who;
who
finger (name);
finger %s
mailstore (name);
mailstor %s -1
Would that satisfy your needs?
-
- Posts: 1763
- Joined: Sun Feb 26, 2006 1:49 pm
- Location: Edmonton, Alberta, Canada
- Full name: Peter Skinner
Re: Feedback on XBoard menu dialogs welcome
Yes I suppose that would satisfy them. Let me know when you have something I can compile and test.hgm wrote:Just to be sure: are you talking about WinBoard or XBoard now?
In WinBoard the ability to hide prepared user-defined commands under a button is realized through the ICS context menu. This includes groups of multiple commands like you show above. Currently, the only way to configure that in WinBoard, however, is to edit the settings file, in particular the /icsMenu={...} multi-line part of it.
I guess there are really two issues here:
1) It should be possible to configure this from the menus, rather than through editing a settings file.
2) Parsing of the menu string to recogize the items is crappy, making definition of multi-line commands very non-obvious.
The current syntax of the menu string is
Parsing of the definition strig is currently a bit flakey, though, as after locating the second number (third comma) in an item, it does not test if the following character is a ';' or linefeed separator, but simply skips to the next one. This can cause problems by skipping to an intra-command ';' of a following item (thus getting out of phase, and skipping a number of item definitions). Perhaps I should make that more stringent. But then in principle the followig item definition should always work:Code: Select all
<menuDefinition> := <itemDefinition> | <itemDefinition> ';' <menuDefinition> | <itemDefinition> '\n' <menuDefinition> <itemDefinition> := <menuText> ',' <IcsCommand> ',' <number> ',' <number> <number> := '0' | '1'
The second point is how to allow making such a definition from the menu, rather than by editing an ini file. But when there wold be a dialog that brigs up the entire -icsMenu string for editing (similar to the "Options -> Add ICS..." menu that brigs up an edit dialog for the -icsNames option), wouldn't that be good enough?Code: Select all
CCT 14,peter create tournament peter set time control 50 peter set inc control 3 peter set name CCT 14 peter set open,0,1
Perhaps I should allow the syntax of the definition string to be more free-format, allowing the use of tabs and linefeeds which are then ignored (i.e. ignore a linefeed after comma, and all tabs after linefeed). This would allow the menu-definition string to appear in the edit box as:
An alterative would be to switch to a format that puts the numbers specifing the behavior immediately behind the item text. Or better yet, do away with the numbers completely, and adopt the convetion that any %s in the command would be replaced by the clicked word in stead, and that commands that end in an empty line are sent immediately:Code: Select all
CCT 14, peter create tournament peter set time control 50 peter set inc control 3 peter set name CCT 14 peter set open, 0,1 who, who, 0,1 finger (name), finger, 1,1
It would make the editing of existing commands, or adding new ones a much more intuitive process. And by using ';' after the item text in stead of ',' to indicate this new format, it can be destinguished from the old format without loss of backward compatibility.Code: Select all
CCT 14; peter create tournament peter set time control 50 peter set inc control 3 peter set name CCT 14 peter set open shout; shout tell (name); tell %s who; who finger (name); finger %s mailstore (name); mailstor %s -1
Would that satisfy your needs?
Peter
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
-
- Posts: 2851
- Joined: Wed Mar 08, 2006 10:01 pm
- Location: Irvine, CA, USA
Re: Feedback on XBoard menu dialogs welcome
Why, when I paste in this game, am I told that Houdini doesn't support variant wild35?hgm wrote:I am open to feedback on the current design. What option settings would you like in addition to see in dialogs, should there be more dialogs, etc.
[Event "W 035"]
[Site "W 035"]
[Date "1989.??.??"]
[EventDate "1989.??.??"]
[Round "?"]
[Result "0-1"]
[White "H R Rost"]
[Black "E Sneiders"]
[ECO "C34"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "20"]
1. e4 e5 2. f4 exf4 3. Nf3 Nf6 4. e5 Nh5 5. Be2 d6 6. O-O dxe5
7. Nxe5 Bc5+ 8. Kh1 Ng3+ {? This tempting sacrifice is unsound.}
9. hxg3 fxg3 10. d4 {? 10.Bb5+! followed by 11.Qh5! keeps White's
advantage} Qh4+ 0-1
(Another problem I have is that I only see half the menus. For instance, in edit position I only see the black options. I'm using Fedora 13, though, with who know what software environment. I doubt anyone can help if they cannot reproduce it.)