Commit Graph
105 Commits
Author SHA1 Message Date
Thierry Crozat 54e99b36e9 AGS: Engine: support pre-3.5.0 Label.TextAlignment with legacy values
Some custom engines supported Label.TextAlignment before 3.5.0 got this
added officially, except they used old alignment constants.

From upstream 46fc9bac4fa6082561a1937861b3e567ccea2cd4
2022-12-15 22:40:17 +01:00
Thierry Crozat 06620b6e9f AGS: renamed Button's MouseButton enum to avoid name confusion
Was conflicting with the internal engine's eAGSMouseButton constants.

From upstream a5cfccee2d3681b55dafb8cfb9e0f38f84124855
2022-10-10 00:16:16 +01:00
Thierry Crozat 56f9bfba9e AGS: fixed GUISlider::IsOverControl() comparing abs with rel coords
Was broken likely by dec832ad4 (upstream 9394a2d)

From upstream 77c10eb3757029d8d185d9b161890d05203d90af
2022-10-09 19:36:47 +01:00
Thierry Crozat dd9595c8ce AGS: don't zero slider's HandleImage internally if sprite is missing
This may lead to unexpected effects when resources are not fully preloaded yet, but a Slider's "UpdateMetrics" was called.

From upstream 5654fb52a64904a6b0cdcec674224f7a0d91a8eb
2022-10-09 19:29:11 +01:00
Thierry Crozat 9ced7b370c AGS: fixed GUIListBox drawing double border outside of the clip
From upstream 0cece949e68d4fe55c6943654643abdc3bbb40d4
2022-10-09 19:16:26 +01:00
Thierry Crozat fa87b3f28f AGS: force update gui metrics on load and on game start
This fixes some controls not reporting their metrics correctly until first displayed on screen.

From upstream ea4e6762236a13621ba0771b9d5d8ac4bcf33ee8
2022-10-09 19:12:22 +01:00
Thierry Crozat 0c936b888d AGS: Fixed GUI textual controls not redrawn when translation changes
From upstream 618d2e38a118f47389aaf7e57972b2520b81fc1b
2022-06-21 23:28:01 +01:00
Thierry Crozat 282ee9ad97 AGS: Fixing more trivial warnings
From upstream 83f7d9857e70f7d1d10fedf61196740d20ba0b0a
2022-06-18 01:08:54 +01:00
Paul Gilbert 1933841f79 AGS: Removed numgui* variables, use size of vectors instead
From upstream 095cf9d77c96fb3a1f9e887d7aaa1ef1e92ebe60
2022-05-10 21:35:19 -07:00
Paul Gilbert 91d25a3098 AGS: Added animation volumes to save format
From upstream 752da45aa7666355e383df0f1017cf5c5842fea1
2022-05-10 21:18:01 -07:00
Paul Gilbert 706766f4b5 AGS: Guimain tidy-up
From upstream fd656469bc71385ffd9da50ad0315641cd5f6d22
2022-05-10 21:18:00 -07:00
Paul Gilbert eb7421400c AGS: Use empty() to check for emptiness in vector
From upstream 166803dd6cb99851e424f9eb9d150169cd3909fe
2022-05-10 21:18:00 -07:00
Paul Gilbert c54f4d1c10 AGS: Guibutton, removes non-updated comment
From upstream 50f1677770e54eb4a5d366a936ffb8366a0432eb
2022-05-10 21:18:00 -07:00
D G Turner dbaa9439da AGS: Remove Various Unused Variables Causing Compiler Warnings 2022-05-07 20:41:45 +01:00
Paul Gilbert b1649597d7 AGS: Replaced Math/std Min/Max with ScummVM macros
Inspired by 6dee5ee6f271c600e30879d892295ea6069e8cc9
2022-05-05 22:41:10 -07:00
Paul Gilbert a8ead540c5 AGS: GUIControl::CalcGraphicRect returns relative rect
From upstream f827c75396f433542b451ec4caaea4c41c22e5b2
2022-05-05 22:41:08 -07:00
Paul Gilbert da1178d905 AGS: Implemented proper HasAlphaChannel for all gui controls
From upstream 83306ee321e127368a41068f32bd4899ae00223e
2022-05-05 22:41:06 -07:00
Paul Gilbert 274500e0d7 AGS: Compilation fixes 2022-05-02 19:04:31 -07:00
D G Turner 437678110e AGS: Fix GCC Compiler Warnings 2022-05-02 16:19:16 +01:00
Paul Gilbert 3be37608f0 AGS: Fixed potential division by zero in GUISlider
From upstream 36d21686e4a815a22b99e4fbceff11852241a25b
2022-05-01 17:23:25 -07:00
Paul Gilbert d9da1e3759 AGS: Don't try rendering gui controls with zero size
From upstream 84179aecc419cc8feb56b947bb7519e69062fe70
2022-05-01 17:23:25 -07:00
Paul Gilbert a94adb5968 AGS: Fixed TextBox duplicating letter input
From upstream 6aead72e207b33a991a5e3d2d32f7991007f786c
2022-05-01 17:23:24 -07:00
Paul Gilbert 3b20393a17 AGS: Implemented gui control transparency in software mode
From upstream bcffc2cdeb24a426e2b048e8a98df9c84cb7c6f2
2022-05-01 17:23:23 -07:00
Paul Gilbert 8319217b7a AGS: Added GUIControl.Transparency
From upstream a7c406b1d162bf9ac3896ecb8e26bc6d5327ecfe
2022-05-01 17:23:23 -07:00
Paul Gilbert ec170ebd2f AGS: More strict MarkChanged use for gui controls, on changes only
From upstream 1383ff33eb4620eae18598f96f7e0cc948977174
2022-05-01 17:23:22 -07:00
Paul Gilbert d8d593079a AGS: Don't MarkChanged guis changing Transparency or Visible flag
From upstream d4deb499893109a54ed7e011af22d2619c432549
2022-05-01 17:23:22 -07:00
Paul Gilbert 50b2b1af05 AGS: Replaced OnControlPositionChanged() with MarkControlsChanged()
From upstream 2f676fbad2b725fe0089de45ba9f925bc48ab586
2022-05-01 17:23:21 -07:00
Paul Gilbert d7375f0772 AGS: Fixed GUIObject::SetVisible(), should MarkChanged
From upstream e5aa27dfb7c4e8cd8dfaf9c418bb56df2b28ae7e
2022-05-01 17:23:21 -07:00
Paul Gilbert 211abe3744 AGS: Implemented HasAlphaChannel() in GuiButton and GuiSlider
From upstream 05999579489e427b7df7a01bab9643b6677d5afb
2022-05-01 17:23:21 -07:00
Paul Gilbert a476850123 AGS: Calculate visible graphic size of gui controls for textures
From upstream a91bec5f3fa7f37187a084cabd0ab2289e609a6e
2022-05-01 17:23:19 -07:00
Paul Gilbert 2df62bdd55 AGS: Only redraw gui controls when they are marked as changed
From upstream 27a6bd6a13494cd670fb6749e5bd663f088487ea
2022-05-01 17:23:19 -07:00
Paul Gilbert c768b94cf6 AGS: Draw GUI Controls on separate textures
From upstream 5cbe36626842ddd900cbda8fd4b6ddfc3804456f
2022-04-29 22:20:41 -07:00
Paul Gilbert 62ebde86a1 AGS: Gui controls draw themselves at requested offset
From upstream 9e9c8ffafe465b907ed0d22bcb1ba4df06803b8b
2022-04-29 22:20:40 -07:00
Paul Gilbert 673c8c242e AGS: Split GUIMain::DrawAt into DrawSelf and DrawWithControls
From upstream d353f8151d77c1c9e66f8b1aed7b24ecbadf0609
2022-04-29 22:20:40 -07:00
Paul Gilbert 939d116fba AGS: Fixed GUIMain::Poll(), only affect clickable controls
From upstream 951e65274cd578b25436526dc12cc51ac5e20150
2022-04-29 22:20:40 -07:00
Paul Gilbert 403892950c AGS: Removed ListBox::DrawItemsFix, add preview items externally
From upstream af126ccdef791d6f97a65018bc3188e9767d399f
2022-04-29 22:20:40 -07:00
Paul Gilbert ad599a6425 AGS: In gui clipping mode prevent listbox items drawn over scrollbar
From upstream 37d757e88bfd7df47cf4154d37ec1a3df79e2c16
2022-04-29 22:20:39 -07:00
Paul Gilbert f2399dc15c AGS: Fixing various "unused variable/arg" warnings
From upstream 4b3c27c1a2b39d6c6b089adee111c6889d19ad0e
2022-04-25 19:17:26 -07:00
Paul Gilbert 250190e997 AGS: Fixing various type-cast warnings
From upstream 82e89d3c3dccfa0aba0b18c1aa544130ac7e6902
2022-04-25 18:47:12 -07:00
Le Philousophe 00876a1092 AGS: Fix int vs. int32_t discrepancies 2022-04-24 21:12:17 +02:00
Paul Gilbert 3467180e39 AGS: Refactored GUIMain to not use mouse coords directly
From upstream 2f736d3365dc5fae6eebe353b64e16af156308f8
2022-04-23 17:56:20 -07:00
Paul Gilbert 0e283a9a87 AGS: Removed guis list param from ResortGUI (useless)
From upstream fcb6c37e27be324a122be92fc28b8b36ad80bde9
2022-04-22 21:30:23 -07:00
Paul Gilbert 7dab6a4964 AGS: Exclude Sliders from clipping GUI controls rule
From upstream fd8976b09e821b015b8d267531c2bce659d95d13
2022-04-22 21:21:46 -07:00
Paul Gilbert dec832ad4f AGS: Refactor GUISlider::Draw(), make it easier to understand
From upstream 9394a2df433f63a4753e1dbbaf5a2a6fdff6e69a
2022-04-22 21:18:01 -07:00
Paul Gilbert 623e895971 AGS: Changed text alignment switches to use kGameVersion_360_21
From upstream 0948e6be65b46df8bd4b183f77655375d6a06e95
2022-04-22 21:01:38 -07:00
Paul Gilbert f2f80939ad AGS: Don't do text's v-alignment hack in the new games (> 3.6.0)
From upstream ed971d2c5d289db6df31e2a2214771bcb162e5ca
2022-04-22 20:57:16 -07:00
Paul Gilbert 62574f8eda AGS: Use outlined width/height when arranging text on GUI
From upstream 8fd4b1b55dc08949e70d295afb4be91d1a26da5c
2022-04-22 20:54:00 -07:00
Paul Gilbert 5cc7daedfe AGS: Use outline fonts too when getting outlined text width / height
From upstream 1f3960014a313fc7b47dd26274ffd87b96bbbb87
2022-04-22 20:34:19 -07:00
Paul Gilbert bf5e0b2d08 AGS: Updated AnimatingButton save format
From upstream 7920a8719db3bc39b1187a076184d9a6d66b1310
2022-04-21 22:18:33 -07:00
Paul Gilbert aeddd232e0 AGS: Removed animating buttons limit
From upstream 484f6d3f44c7dbb361ddeebd8bb46862760501bc
2022-04-13 21:55:18 -07:00