Commit graph

84212 commits

Author SHA1 Message Date
Subhraman Sarkar
aa3006c883 miscellaneous fixes 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
6ec5af83df update help pages and generators 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
db5ea45ffb improve inline image support and autocount table columns
tables columns are automatically counted and col key is removed
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
a1dbcdc9f5 inline image text support
some extra y space is still getting added somewhere
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
f611188cd4 help_impl.cpp cleanup 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
069a0c659d rich_label: move attributes to ctor 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
dc68d261ca improve nested formatting tag support 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
449689a37c more refactoring and rudimentary nested formatting tags 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
9e891fbd78 refactor: remove some global variables and simplify add_image 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
9c46869585 remove "jump" and table-specific "br" behavior 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
7fdf4848db updated help pages to use nested table tags 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
f1bc261c62 nested table tag improvements and global var removal 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
6a1de922bd nested table tag (preliminary)
new syntax:
<table><row><col>text</col>...</row><row>...</row>...</table>
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
3c4dd9628b typo fix 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
beaba772cc tree view: stop scrollbar from jumping to top during layout 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
2adab6593a improve link calculation with non-zero padding 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
e1c87a24a8 rich_label: allow width key to be a wfl formula 2024-09-23 19:49:44 -04:00
Celtic Minstrel
570d358110 pango_text: apply scaling to size attribute runs 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
0b4611abb4 Fix scrollbar bug when not initialized with text, add link click sound 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
ae8d107c65 add default font size to canvas 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
5ec7bee190 enforce max text width and remove wrong <br/> 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
8ab6d2458a help browser: fix weird spacing and alignment issue in treeview
thanks to Vultraz for helping with the fix
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
470c3da79c update editor help pages to new markup 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
518e733dd2 minor fixes 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
b46a04bc1f update markup in terrain editor pages 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
bbb728c927 fix whitespace 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
e6c36b914e update help markup in terrains page 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
5f32302c00 text renderer: update documentation of add_attribute methods 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
76780d1fb0 update help markup in faction descriptions 2024-09-23 19:49:44 -04:00
Celtic Minstrel
586fbec882 Update GUI2 schema to match existing implementation of text attributes 2024-09-23 19:49:44 -04:00
Celtic Minstrel
6eed9522e4 Rich label: Add fallback handling for unknown character entities 2024-09-23 19:49:44 -04:00
Celtic Minstrel
65124f30d7 Help markup: Add a unit test for unknown character entities 2024-09-23 19:49:44 -04:00
Celtic Minstrel
ecd93adb8e Fix indentation 2024-09-23 19:49:44 -04:00
Celtic Minstrel
5f47ea6643 Help markup: add more unit tests and fix a small parser issue 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
63497a9d27 add method xy_to_index and use it to calculate wrap position 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
6d670f11c6 rich_label: use new get_line method 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
8bca642854 refactor attribute system and rename set_highlight_area 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
5958ca209e reformat the ToD page and bugfixes
Although not perfect, this makes the page usable. Using the previous version leads to multiple complex bugs at this point.
also stops a y calculation bug in table.
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
b109bda9d4 correctly add paragraph break height in [text] tag 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
e4bffc04ce improve manual linebreak functionality outside table
also reformats some broken pages with manual breaks
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
ce9d3bdc38 insert paragraph breaks correctly 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
b1fc4701aa rich label: fix broken tables and reorganize code 2024-09-23 19:49:44 -04:00
Celtic Minstrel
62c03ad779 Help markup parser: Avoid UB and unused param when checking closing tag 2024-09-23 19:49:44 -04:00
Celtic Minstrel
2e3c401f45 Help markup parser: Fix some issues with auto-closed tags 2024-09-23 19:49:44 -04:00
Celtic Minstrel
d910171b3d Rewrite the help markup parser.
It is now roughly a superset of Pango and supports the following new features
* XML character entities, including decimal and hex entities, common named entities (apos, quot, lt, gt, amp), and even unrecognized named entities
* Nesting tags within each other (new-style only)
* Attributes without a value
2024-09-23 19:49:44 -04:00
Subhraman Sarkar
14e6d1c5fe rich label bugfixes 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
72f1f0007c new definitions for label and new font size macros 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
21906c9bf4 help text adjustments to new markup (partial) 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
fe9de2f638 convert help_topic_generator to new markup (partial) 2024-09-23 19:49:44 -04:00
Subhraman Sarkar
78ca6f50a9 help browser changes
1. back/forward button functionality
2. some ui adjustments
3. use rich_label
2024-09-23 19:49:44 -04:00