summaryrefslogtreecommitdiff
path: root/src/gui/setup_colors.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-04-25GUI: Added support for multiple color palettes to ThemeThorbjørn Lindeijer1-14/+21
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-01GUI: Made CheckBox, RadioButton and Slider more customizableThorbjørn Lindeijer1-5/+5
Added handling of padding and text format and added new "spacing" skin variable which is used for the space between the label and the control in case of CheckBox and RadioButton. Small tweaks to UI layout in various places.
2024-02-28Use snprintf instead of sprintfThorbjørn Lindeijer1-5/+1
Using sprintf triggers a warning on macOS. The buffer should be large enough, but a little extra security doesn't hurt.
2024-02-22General code cleanupsThorbjørn Lindeijer1-1/+1
* Use default member initializers * Use range-based loops * Don't use 'else' after 'return' * Removed some unused includes * Construct empty strings with std::string() instead of "" * Clear strings with .clear() instead of assigning "" * Check whether strings are empty with .empty() instead of comparing to "" * Removed redundant initializations
2024-02-09Optimized BrowserBoxThorbjørn Lindeijer1-4/+0
* Introduced a LayoutContext that conveniently allows for relayouting all rows, or just a single one when it is added. BrowserBox::addRow no longer relayouts all the rows. * BrowserLink and LinePart are now merged into a new TextRow struct, so they can be conveniently dropped when the row limit has been reached. * Removed "opaque" option, which was enabled by default but disabled for all BrowserBox instances. * Removed "always update" option, and instead start delaying relayouting automatically when there are a lot of rows (> 100 currently). * Update window now also has text wrapping enabled. Closes #50
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-3/+3
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-08-05Removed all the hardcoded sizes of the various setup tabsThorbjørn Lindeijer1-6/+1
Instead, support for dynamically adjusting layout was added to the Container class. Various other places were also adapted to use the new layout support in Container. Reviewed-by: Erik Schilling
2012-01-31Added missing copyright notices.Yohann Ferreira1-0/+1
Reviewed-by: Erik Schilling
2011-05-24Widened the setup window by 5pxAngelo Castellani1-1/+1
To make room for the interface tab Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-2/+3
Reviewed-by: Yohann Ferreira
2010-03-12Split Palette into Theme and UserPaletteJared Adams1-136/+33
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
2010-02-24Add more to eAthena guild supportJared Adams1-0/+1
It's not complete yet, but it is closer. Also fix up handling of guild/party members. Reviewed-by: Chuck Miller
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-3/+2
2010-02-14Fixed color tab alignment from coming up slightly short.Tametomo1-6/+6
Signed-off-by: Tametomo <irarice@gmail.com>
2010-02-14Match alignment better in the colors tab. Now the textfields terminateTametomo1-16/+16
at the same spot the scroll area does. Signed-off-by: Tametomo <irarice@gmail.com>
2010-01-11Cleanup GUI classesJared Adams1-3/+3
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2009-08-01makes tab colours also configurableMaximilian Philipps1-0/+1
2009-08-01makes the colour for buttons and disabled buttons configurableMaximilian Philipps1-0/+2
2009-07-17Various gettext fixesKess Vargavind1-5/+5
* Merged a few split strings * Fixed some spellings and wordings * Turned a couple of std::cout and std::cerr into logger messages
2009-05-14Fixed the worst layout issues that came up with translationsBjørn Lindeijer1-1/+1
Video and player setup pages now look a bit better when translated or when the font size is increased.
2009-05-09Fixed the updating of sliders/preview on changing color selectionBjørn Lindeijer1-154/+151
It only worked when you clicked, not when the selection changed for any other reason, like click+drag. Use a SelectionListener instead.
2009-05-08Got rid of the non-functional TextFieldListenerBjørn Lindeijer1-4/+3
Pointed out by Jaxad0127. We might want to enable its intended functionality in a different way later.
2009-04-15Reduced maximum gradient delay to 100. 400 was just too high of an upperTametomo1-2/+2
bound to be useful to users. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-04-15Fixed the width of the gradient type label for the Setup Color tab, as wellTametomo1-19/+32
as moving the delay slider down. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-04-15Exposed delay values to the user, but made it so that the delay is colorIra Rice1-30/+59
based, instead of global, so that the user can specify different delays for different types of actions. Signed-off-by: Ira Rice <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-04-15HP Bar Gradual Changes Config (+ bugfixes)Falkreon1-0/+11
* Setup menu now has settings for the HP bar colors. * StatusWindow handles HP bar changes a little more consistently. * Fixed a bug that cut weightedAverage values in half, making the HP bar very dark.
2009-04-08Associated setup tab name with the tab itselfBjørn Lindeijer1-1/+1
Keeps things together in the right place and allowed writing a bit more generic code in the Setup class.
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-6/+7
In an attempt to make the GUI code a little more structured, basic widgets are now put in gui/widgets. Many includes were also cleaned up.
2009-04-07Used custom widgets where appropriate and some cleanupBjørn Lindeijer1-19/+16
Replaced many gcn::Label with Label, gcn::Slider with Slider in character creation dialog. Also cleaned up includes.
2009-04-06Fix a spelling errorJared Adams1-1/+1
2009-04-06Clean up and expand item equip handling in the GUIJared Adams1-0/+5
2009-04-05Fixed compile warningsBjørn Lindeijer1-0/+1
Initialization order, return values, unused variables, missing enumerator.
2009-03-29Merge branch 'master' of git@gitorious.org:tmw/mainlinePhilipp Sehmisch1-1/+1
2009-03-29Fixed compilation on WindowsPhilipp Sehmisch1-1/+1
2009-03-27Removed unnecessary parenthesis on constructorsBjørn Lindeijer1-1/+1
2009-03-25A host of code style fixesBjørn Lindeijer1-1/+1
Mostly putting & and * in the right place and making some getters const.
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-28/+67
Conflicts: Many files.
2009-03-18Windows compilation fixesPhilipp Sehmisch1-1/+1
2009-03-15Fixed color previews for item types.Ira Rice1-0/+1
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-15Fix some mem leaksJared Adams1-3/+2
2009-03-14Made the slider editable when pulse gradient is selected.Ira Rice1-2/+13
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-14Added a pulse effect into the palette class, which uses the set colorIra Rice1-1/+2
and pulsates back and forth between it and black. Added directly after the spectrum effect. Also modified the gradient delay to be a lot farther out, so that we don't end up with a Pokemon seizure causing disaster (the speed was the same, as well as the colors. The new speed should be a lot more considerate of people who are prone to having issues from that speed of color changing). TODO: Modify the palette class to allow for updating the color for the pulse gradient without needing to have it applied first. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-14Exposed the progress bar colors to the color management tab.Ira Rice1-9/+18
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-14Made a label class derived from the guichan label class which utilizesIra Rice1-6/+12
the palette colors. While technically, this can be accomplished through other means, it's rather clumsy overall, and is prone to introducing in programmer errors. This commit finally catches every case where text is used, and applies the text color from the color dialog to each of them appropriately. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-14Code cleanup in the color/palette codeMajin Sniper1-1/+0
2009-03-14Code cleanup in the color/palette codeMajin Sniper1-25/+0
2009-03-13Added item types to the palette class.Ira Rice1-0/+17
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-13Made the TextPreview widget respect alpha values.Ira Rice1-1/+2
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-12Added in option for opacity for the text preview widget, which all ofIra Rice1-3/+1
the other widgets have as well. Also set the preview widget to have opacity off, like all of the other widgets (if it is on, then opacity can't be applied to it. Also looks rather tacky with it) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-12Extend color config gui to support the new colorsMajin Sniper1-32/+153
The new color palette supports many more colors that the browserbox can display. So a change to the color config gui was needed.