summaryrefslogtreecommitdiff
path: root/src/utils/xml.h
AgeCommit message (Collapse)AuthorFilesLines
2025-04-25GUI: Added support for multiple color palettes to ThemeThorbjørn Lindeijer1-4/+4
Each Skin can point to a different palette, which can be used to tweak text colors where necessary. For now there is no generic solution for this, instead a number of locations have been adjusted to take the palette into account: * ChatWindow sets its palette on the BrowserBox used in its tabs. * Popup sets its palette on child widgets when they are added (covering BrowserBox, Label and TextBox). * ItemPopup now uses its palette when looking up colors. The BrowserBox now retrieves its numbered text colors from the theme. Also added OLDCHAT, AWAYCHAT and GLOBAL theme colors, with ##g, ##o and ##a to choose these colors respectively. Fixed ImageRect move constructor. TextPreview class was cleaned up from unused functionality. Being name colors are no longer different between the name shown on the being and the name shown in the SpeechDialog.
2025-04-25Introduced theme dropdown in interface setupThorbjørn Lindeijer1-2/+11
* Added Theme dropdown to Interface setup * Added CARET theme color * Fixed issue with logging errors in `check` function in `theme.cpp` * Fixed XML::Children::Iterator to iterate only element nodes * Changed default theme to "jewelry" Changing the theme (or font size) shows a dialog that points out a restart is required to apply these changes. This is necessary at the moment because many things, like default or minimum window sizes, are only calculated once.
2025-01-21Replaced include guards with #pragma onceThorbjørn Lindeijer1-4/+1
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to remove duplicated newlines at end of file: find src -type f -name '*.h' -exec \ sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof Fixes compile on macOS, which appears to have been due to the EVENT_H include guard.
2025-01-20Made client config statically typedThorbjørn Lindeijer1-28/+40
This makes accessing the config values much faster, since it no longer needs to do a lookup nor string conversion, which means we could remove some needless copying of the values. Overall it makes it easier to find out where settings are used and it puts the defaults along with the declaration. Options with default values are no longer saved to the config file. This does not include unrecognized options, which are kept around to provide some compatibility with older clients. While most basic options have kept the same name, more complicated settings like window geometry, shortcuts, outfits, etc. now have their own XML elements. Older clients will ignore these and erase them when saving the configuration.
2025-01-20Wrapped xmlNodePtr access with a Node classThorbjørn Lindeijer1-72/+143
Slightly more ergonomic and this eliminates direct libxml2 usage from many places.
2025-01-18Introduced small convenience wrapper to write XMLThorbjørn Lindeijer1-0/+87
Might not seem worth it right now, but it will be if we write out more XML structures.
2024-09-27Replaced for_each_xml_child_node macro with helper classThorbjørn Lindeijer1-3/+29
The new XML::Children class enables using a C++11 range-based for loop to iterate over the children of an xmlNodePtr.
2024-03-28Fixed compile against libxml2 2.12ewew ukek1-0/+1
Quote from Fedora mailing lists: The latest released versions of libxml2 have a couple of important changes in header files that have unintentionally caused some packages to fail to build without modification, including: * several functions now accept or return a const xmlError struct * cyclic dependencies in header files were fixed (by dropping some includes)
2024-02-02Restored support for setting monster ID offset on monsters tagThorbjørn Lindeijer1-2/+7
Apparently this was supported before, but support for that was lost in bd1fdd87eed48ba3ffcc413936d6a6a60a429a97. Fixes #46
2013-04-27Small cleanupThorbjørn Lindeijer1-4/+0
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-09Spotted some more hard-coded files and paths definitions.Yohann Ferreira1-0/+4
Conflicts: src/actorsprite.cpp
2010-08-15Merge branch '1.0'Chuck Miller1-9/+5
Conflicts: mana.cbp mana.files src/CMakeLists.txt src/Makefile.am src/utils/xml.cpp
2010-08-05Add better XML error logging and do some related cleanupJared Adams1-9/+5
Error details from libxml2 are no longer ignored and are properly logged now. XML initialization code is now in the XML namespace. The XML::Document constructor that took a data pointer was removed because it wasn't being used and it would make the new logging less useful (no filename). Signed-off-by: Chuck Miller
2010-07-10Moved parsing of specials.xml from gui/specialswindow.cpp to separate source ↵Philipp Sehmisch1-4/+9
files. Restored functional recharge bars in specials window. Individual specials are only shown after the server informed the client about their status. Made level label, use button and progress bars optional. Their use is controlled through specials.xml. The special window button is again shown even when the player has no specials. This problem needs to be solved differently now for architecture reasons. Reviewed-by: Jaxad0127
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2009-12-19Added support for resources.xml from update server... Also added option to ↵Chuck Miller1-1/+1
download music optionally I had to edit the XML wrapper a bit, basicilly its constructor can now take a optional thrid arguement which will tell it to use a resman or open the file directly Also I added fallback support for the old resouce2.txt so servers don't have to upgrade if they do not want to
2009-03-26Changed includes in utils/ dictory to new guidelinesBjørn Lindeijer1-1/+1
2009-01-25Removed the TMW branding from header guardsBjørn Lindeijer1-2/+2
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2008-12-07Some code reformattingBjørn Lindeijer1-6/+4
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-05-21Merged revisions 4013,4027,4043,4174,4250,4254 via svnmerge from Philipp Sehmisch1-0/+37
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r4013 | crush_tmw | 2008-04-01 01:18:19 +0200 (Di, 01 Apr 2008) | 1 line Implemented NPC XML database which maps NPC IDs to one or more animation files and thus enables animated NPCs. ........ r4027 | crush_tmw | 2008-04-02 01:34:14 +0200 (Mi, 02 Apr 2008) | 1 line misspelled filename ........ r4043 | b_lindeijer | 2008-04-07 10:37:23 +0200 (Mo, 07 Apr 2008) | 3 lines Added XML::Document class which simplifies parsing an XML document and automatically cleans it up again. ........ r4174 | b_lindeijer | 2008-04-23 14:57:45 +0200 (Mi, 23 Apr 2008) | 2 lines Fixed svn:keywords properties and added header to guild.h. ........ r4250 | crush_tmw | 2008-05-19 18:18:38 +0200 (Mo, 19 Mai 2008) | 1 line Added the possibility to add particle effects to NPCs in npcs.xml. ........ r4254 | crush_tmw | 2008-05-20 15:58:26 +0200 (Di, 20 Mai 2008) | 1 line fixed some filename confusion messup in the last commit. ........ NOTE: This was my first commit using svnmerge. Please check if I did everything correctly.
2007-05-04Merged particle engine into main eAthena branch.Philipp Sehmisch1-0/+11
2007-04-23Merged Björn Steinbrinks improvements at the xml parsing from trunk version.Philipp Sehmisch1-0/+6
2006-11-15Added missing Id keyword property to recently added files.Bjørn Lindeijer1-1/+1
2006-11-15Separated getProperty method to an XML utility namespace.Bjørn Lindeijer1-0/+46