Commit graph

84096 commits

Author SHA1 Message Date
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
Subhraman Sarkar
f318ac0d11 various rich_label bugfixes 2024-09-23 19:49:44 -04:00
Charles Dang
03e11a62e1 Removed GUI1 Help interface code
Not needed anymore since we're moving to GUI2 for this dialog.
2024-09-23 19:49:44 -04:00
Charles Dang
e6c0064755 Help: removed code to show old GUI1 help browser
Attempting to launch it crashes the game (probably to do with a null video surface),
and since it's being replaced there's no point in restoring it to functionality.

The implementation details (help_menu, etc) have been left for now. Will remove soon.

This also means the GUI2 help browser is shown by default now.
2024-09-23 19:49:44 -04:00
Charles Dang
ee82387c3d Some build fixups to reflect changes since the help commits were originally made 2024-09-23 19:49:44 -04:00
Charles Dang
1b20d04d07 Help Browser: removed help topic padding 2024-09-23 19:49:44 -04:00
Charles Dang
b3babea922 Help Browser: fixup topic title layout 2024-09-23 19:49:44 -04:00
Celtic Minstrel
0480131fd6 Help Browser: Support arbitrary initial topic
Hidden topics still untested.
2024-09-23 19:49:44 -04:00
Celtic Minstrel
5996cba135 Help Browser: Don't double-list a section's root topic 2024-09-23 19:49:44 -04:00
Celtic Minstrel
ada7b50403 Help Browser: Show topic title 2024-09-23 19:49:44 -04:00
Celtic Minstrel
bbf6df2ddf Help Browser: Fix back button being visible when dialog opens 2024-09-23 19:49:44 -04:00
Charles Dang
6144b5e778 Help Browser: properly implement toggling by clicking the book icons 2024-09-23 19:49:44 -04:00
Celtic Minstrel
f96aa94e03 Fix GUI1 help topics not showing 2024-09-23 19:49:44 -04:00
Celtic Minstrel
5fffe8539f Help Browser: Implement history 2024-09-23 19:49:44 -04:00
Charles Dang
f52bb4f098 Moved new help entry point to a common location 2024-09-23 19:49:44 -04:00
Charles Dang
28dd0f8a68 Help Browser: implemented viewing of sub-sections/topics 2024-09-23 19:49:44 -04:00
Celtic Minstrel
bf4f02bdcf Help Viewer: Parse help markup to Pango markup... mostly.
The help parser now outputs a config rather than a vector of strings of
which some should be taken literally and others parsed as WML.
2024-09-23 19:49:44 -04:00