From 5a560aa9eb1b2cc9caa06331d384ecc955095513 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Sun, 7 Jul 2024 18:08:35 -0700 Subject: [PATCH] Fancy comments, part 5 (of 5) Added a "format help" button to the long comment edit window. This brings up a quick summary of the format tags in a modal dialog. Updated documentation and tutorial. --- .../SGTestData/20090-notes-and-comments.dis65 | 2 +- .../20090-notes-and-comments_64tass.S | 2 + .../Expected/20090-notes-and-comments_acme.S | 2 + .../Expected/20090-notes-and-comments_cc65.S | 2 + .../20090-notes-and-comments_merlin32.S | 2 + SourceGen/Tools/WpfGui/ShowText.xaml.cs | 1 + SourceGen/WpfGui/EditLongComment.xaml | 9 +- SourceGen/WpfGui/EditLongComment.xaml.cs | 22 ++++ docs/sgmanual/editors.html | 96 ++++++++++++++++-- .../images/t1-edit-long-comment.png | Bin 16902 -> 21415 bytes docs/sgtutorial/making-edits.html | 3 +- 11 files changed, 124 insertions(+), 17 deletions(-) diff --git a/SourceGen/SGTestData/20090-notes-and-comments.dis65 b/SourceGen/SGTestData/20090-notes-and-comments.dis65 index a095acf..034a213 100644 --- a/SourceGen/SGTestData/20090-notes-and-comments.dis65 +++ b/SourceGen/SGTestData/20090-notes-and-comments.dis65 @@ -167,7 +167,7 @@ "BackgroundColor":0}, "115":{ -"Text":"[BOX]ALL CAPS [URL=HTTPS://EXAMPLE.COM/]FOR EVERYTHING[/URL][HR][/BOX]\r\n[BR]\r\n[WIDTH=10]SHORT LINES\r\n[BOX CHAR=\u0027X\u0027]BOXED[/BOX]\r\n", +"Text":"[BOX]ALL CAPS [URL=HTTPS://EXAMPLE.COM/]FOR EVERYTHING[/URL][HR][/BOX]\r\n[BR]\r\n[WIDTH=10]SHORT LINES\r\n[BOX CHAR=\u0027X\u0027]BOXED[HR CHAR=\u0027-\u0027]STUFF[/BOX]\r\n", "IsFancy":true, "BoxMode":false, "MaxWidth":80, diff --git a/SourceGen/SGTestData/Expected/20090-notes-and-comments_64tass.S b/SourceGen/SGTestData/Expected/20090-notes-and-comments_64tass.S index 83ab9fc..3b9f63a 100644 --- a/SourceGen/SGTestData/Expected/20090-notes-and-comments_64tass.S +++ b/SourceGen/SGTestData/Expected/20090-notes-and-comments_64tass.S @@ -170,6 +170,8 @@ L1062 bit plataddr ;Pull in plataddr to see the comment on the platform ;LINES ;XXXXXXXXX ;X BOXED X +;X-------X +;X STUFF X ;XXXXXXXXX lda #$17 ;Test some folding diff --git a/SourceGen/SGTestData/Expected/20090-notes-and-comments_acme.S b/SourceGen/SGTestData/Expected/20090-notes-and-comments_acme.S index f74647d..7834265 100644 --- a/SourceGen/SGTestData/Expected/20090-notes-and-comments_acme.S +++ b/SourceGen/SGTestData/Expected/20090-notes-and-comments_acme.S @@ -168,6 +168,8 @@ L1062 bit plataddr ;Pull in plataddr to see the comment on the platform ;LINES ;XXXXXXXXX ;X BOXED X +;X-------X +;X STUFF X ;XXXXXXXXX lda #$17 ;Test some folding diff --git a/SourceGen/SGTestData/Expected/20090-notes-and-comments_cc65.S b/SourceGen/SGTestData/Expected/20090-notes-and-comments_cc65.S index 2dd8de2..358ac33 100644 --- a/SourceGen/SGTestData/Expected/20090-notes-and-comments_cc65.S +++ b/SourceGen/SGTestData/Expected/20090-notes-and-comments_cc65.S @@ -170,6 +170,8 @@ L1062: bit plataddr ;Pull in plataddr to see the comment on the platform ;LINES ;XXXXXXXXX ;X BOXED X +;X-------X +;X STUFF X ;XXXXXXXXX lda #$17 ;Test some folding diff --git a/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S b/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S index 32bbd0e..06217a3 100644 --- a/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S +++ b/SourceGen/SGTestData/Expected/20090-notes-and-comments_merlin32.S @@ -165,6 +165,8 @@ L1062 bit plataddr ;Pull in plataddr to see the comment on the platform f *LINES *XXXXXXXXX *X BOXED X +*X-------X +*X STUFF X *XXXXXXXXX lda #$17 *Test some folding diff --git a/SourceGen/Tools/WpfGui/ShowText.xaml.cs b/SourceGen/Tools/WpfGui/ShowText.xaml.cs index 2472d99..2c32d02 100644 --- a/SourceGen/Tools/WpfGui/ShowText.xaml.cs +++ b/SourceGen/Tools/WpfGui/ShowText.xaml.cs @@ -66,6 +66,7 @@ namespace SourceGen.Tools.WpfGui { private void Window_KeyEventHandler(object sender, KeyEventArgs e) { if (e.Key == Key.Escape) { Close(); + e.Handled = true; } } } diff --git a/SourceGen/WpfGui/EditLongComment.xaml b/SourceGen/WpfGui/EditLongComment.xaml index 8c7543c..d828618 100644 --- a/SourceGen/WpfGui/EditLongComment.xaml +++ b/SourceGen/WpfGui/EditLongComment.xaml @@ -82,9 +82,10 @@ limitations under the License. FontFamily="{StaticResource GeneralMonoFont}" VerticalScrollBarVisibility="Visible" IsReadOnly="True" Background="#f8f8f8"/> - -