Books should have a bit simpler formatting than it is suggested on PyGame_GUI guide, at least when it comes to images. Currently, this is how you'd put image via pure PyGame_GUI HTML:
<img src="stats/ansur/assets/london.jpg" float=right>
I assume this means absolute path, which is very rough. I'd suggest using function like that:
def parseBook(book_contents: str) -> str:
return book_contents.replace('<img src="', f'<img src="stats/{ID}/assets/')
Where ID would be of course related to mod ID of the book - but what's important is that this would allow us to write code like that:
<img src="london.jpg" float=right>
Which is way better, as relative paths should be default for IoA mods, at least in this context (just how other resources were treated).
Books should have a bit simpler formatting than it is suggested on PyGame_GUI guide, at least when it comes to images. Currently, this is how you'd put image via pure PyGame_GUI HTML:
I assume this means absolute path, which is very rough. I'd suggest using function like that:
Where ID would be of course related to mod ID of the book - but what's important is that this would allow us to write code like that:
Which is way better, as relative paths should be default for IoA mods, at least in this context (just how other resources were treated).