Commit Graph
148 Commits
Author SHA1 Message Date
Cameron Cawley 00e3c03755 ALL: Remove unnecessary graphics/colormasks.h includes 2020-06-15 16:59:34 +01:00
Eugene Sandulenko c403182353 GRAPHICS: Initialize class variables in VectorRenderer 2020-04-27 13:57:35 +02:00
Bastien Bouclet 2c812a6b7a GUI: Add DropdownButtonWidget and use it in the launcher for mass add
DropdownButtonWidget is a button split in two parts vertically. Clicking
the left part triggers a default action. Clicking the right part shows a
list of other actions the user can choose from.

Using this widget on the launcher lets 'Mass add' be a secondary action
of the 'Add' button, removing the necessity of pressing the shift key to
access the feature.
2019-11-24 14:06:25 +01:00
D G Turner be56e9afed GRAPHICS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-17 10:11:25 +00:00
Bastien Bouclet 191059b060 GRAPHICS: Fix drawing rounded rectangle borders for the non AA renderer
The check for the clipping rect was in the non-clip version of the method,
and was using values not in screen-space.
2019-10-08 20:54:50 +02:00
Bastien Bouclet eabb81829f GRAPHICS: Fix modern theme tab widgets being 2px too tall
This was noticeable in the graphics tab of the options dialog when
scrolling down. The widgets would be partially drawn on top of the
tabs.
2019-10-07 22:18:27 +02:00
Bastien Bouclet 1d764bd787 GRAPHICS: Vector renderer clipping rect related cleanups
Selecting whether a clipping variant of a draw call needs to be used is
no longer the responsibility to the caller. The clipping rect is now
part of the state of the renderer.

Also fix some of the draw calls to better apply the clipping rect.
2019-10-07 21:47:42 +02:00
Bastien Bouclet 042e196488 GRAPHICS: Fix VectorRenderer's colorFillClip to apply the clipping rect 2019-09-08 19:55:23 +02:00
Lothar Serra Mari fe83c985be GUI: Allow GUI background colors other than black in Classic Theme (#1526)
GUI: Allow GUI background colors other than black in Classic Theme
2019-03-10 16:56:17 +02:00
Adrian Frühwirth 3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Adrian Frühwirth d36a9ce672 JANITORIAL: Fix formatting 2018-03-23 20:40:30 +01:00
Bastien Bouclet b272701834 GRAPHICS: Dont clip in the non-clip version of drawRoundedSquareAlg
Fixes missing modern theme GUI dialog borders when using the
non-antialiased renderer.
2018-03-17 16:11:41 +01:00
Bastien Bouclet d26aa8255d GRAPHICS: Fix drawing clipped key colored bitmaps
The previous implementation was not clipping the bottom part of the
bitmap.
2018-01-27 18:16:08 +01:00
Bastien Bouclet 482c075747 GRAPHICS: Fix incorrect call to blendFill in drawRoundedSquareShadowClip
Was broken in commit 622adff628.
2017-12-30 19:37:56 +01:00
Bastien Bouclet 622adff628 GRAPHICS: Speed up drawing of rounded square soft shadows
When drawing a rounded rectangle, first its shadow is drawn, and then
the rectangle proper is drawn over it. This optimization skips drawing
a shadow rectangle that is entirely occluded by the main rectangle.

A quick benchmark shows large improvements to the modern theme GUI draw
speed. On a 1 GHz ARMv7 CPU with optimizations enabled, drawing the add
game dialog @ 1920x1080 went from 976 ms to 136 ms.
2017-12-30 19:04:18 +01:00
Colin Snover a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Bastien Bouclet ce3d5ebec1 GRAPHICS: Fix buffer overflow in drawBevelSquareAlgClip
Port of the fix from 0d8afad55.
2017-11-12 10:38:05 +01:00
Colin Snover 0d8afad559 GRAPHICS: Fix buffer overflow in drawBevelSquareAlg
Thanks to garethbp for discovering the issue and providing a fix.

Fixes Trac#6468.
2017-11-11 20:49:19 -06:00
Torbjörn Andersson 5602ca3d64 JANITORIAL: Silence some more GCC 7 fallthrough warnings
These weren't explicitly flagged as deliberate, but I recognize
Duff's Device when I see it.
2017-08-06 15:26:44 +02:00
Eugene Sandulenko 355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Eugene Sandulenko 6524a8d103 GUI: Added transparency to PicWidgets 2016-08-24 16:07:55 +06:00
Eugene Sandulenko 94bc75ae46 GUI: Implemented centering of dialog background 2016-08-24 16:07:55 +06:00
Eugene Sandulenko 75f9b099dc GUI: Added possibility to specify scale mode for AlphaBitmaps 2016-08-24 16:07:55 +06:00
Eugene Sandulenko 38114eb760 GUI: Plug NinePatch bitmaps into parser 2016-08-24 16:07:55 +06:00
Eugene Sandulenko ec7312ac13 GUI: Implemented more modes to autoscale 2016-08-24 16:07:55 +06:00
Eugene Sandulenko 4474ccf814 GUI: Implemented alphabitmap autoscale 2016-08-24 16:07:55 +06:00
Eugene Sandulenko f0c52096f3 GUI: Implemented possibility to use alphabitmaps in GraphicsWidget 2016-08-24 16:07:55 +06:00
Eugene Sandulenko 53a42ececf GUI: Added new alphabitmap image type 2016-08-24 16:07:55 +06:00
Torbjörn Andersson 11ec5ad5a3 GRAPHICS: Fix copy/paste error in blitAlphaBitmapClip() (CID 1357410) 2016-07-11 05:43:24 +02:00
Torbjörn Andersson 6eabc887e1 GRAPHICS: Fix copy/paste error in blitSurfaceClip (CID 1357411) 2016-07-11 05:41:04 +02:00
Alexander Tkachev 6de5324742 JANITORIAL: Fix a few warnings 2016-07-03 12:24:55 +02:00
Alexander Tkachev cea58cc61c JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
Alexander Tkachev 6fd6043391 GUI: Fix blitAlphaBitmapClip() 2016-07-03 12:24:11 +02:00
Alexander Tkachev 916c86e689 GUI: Add blitAlphaBitmapClip() 2016-07-03 12:23:41 +02:00
Alexander Tkachev e636894b06 GUI: Add fillSurfaceClip() 2016-07-03 12:23:12 +02:00
Alexander Tkachev 0dcd29e998 GUI: Fix drawRoundedSquareClip() 2016-07-03 12:22:26 +02:00
Alexander Tkachev 80412a4139 GUI: Add drawTabClip() 2016-07-03 12:22:10 +02:00
Alexander Tkachev ee00156d54 GUI: Add drawBeveledSquareClip() 2016-07-03 12:21:55 +02:00
Alexander Tkachev 05383532b7 GUI: Add drawLineClip() 2016-07-03 12:21:40 +02:00
Alexander Tkachev 2231de040f GUI: Add drawCircle() 2016-07-03 12:21:24 +02:00
Alexander Tkachev f22d11953d GUI: Add drawSquareClip() 2016-07-03 12:21:09 +02:00
Alexander Tkachev 559ca37daf GUI: Add VectorRendererSpec::drawTriangleClip() 2016-07-03 12:20:37 +02:00
Alexander Tkachev cccf6eed78 GUI: Add drawRoundedSquareShadowClip() 2016-07-03 12:18:18 +02:00
Alexander Tkachev e04e13de33 GUI: Remove unnecessary debug output 2016-07-03 12:18:00 +02:00
Alexander Tkachev 425d963bd3 GUI: Fix ThemeItemTextData's dirty rectangle 2016-07-03 12:17:26 +02:00
Alexander Tkachev 8f2d35b0b8 GUI: drawRoundedSquareClip() 2016-07-03 12:16:26 +02:00
Alexander Tkachev 3d2730a0dd GUI: clippingRect propagated deeper 2016-07-03 12:15:51 +02:00
Ori Avtalion 9b69b86f29 GRAPHICS: Prevent crash when drawing 0-height rounded corners
Opening/closing the console when scroll bars were visible caused
occasional crashes. Fixes #7089.
2016-03-26 19:43:16 +03:00
Johannes Schickel b6b2bcf607 GRAPHICS: Remove superfluous ABS usage to silence a warning. 2016-02-21 17:45:30 +01:00
Johannes Schickel 0a06942e4e GRAPHICS: Skip empty rects and empty shadows in VectorRendererSpec::drawSquareShadow. 2016-02-21 14:41:29 +01:00