1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-15 22:16:37 +02:00

85 Commits

Author SHA1 Message Date
Ivan Savenko
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
Ivan Savenko
948abfb04c AI now uses std::thread, added custom thread interruption logic 2025-03-02 14:33:11 +00:00
Ivan Savenko
156de5b17e Added GameInstance class
- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
2025-02-21 16:54:06 +00:00
Ivan Savenko
ffd37a8fa8 Removed CGI in favor of VLC. Map handle is for now global variable 2025-02-21 16:53:14 +00:00
Ivan Savenko
f657e85305 Integrated CClientState into GameEngine class 2025-02-21 16:53:14 +00:00
Ivan Savenko
cacceda950 Renamed CGuiHandler to GameEngine
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
2025-02-21 16:53:13 +00:00
Laserlicht
2ebf1daf0d add smooth drag for RMB & fix drag for new windows 2025-01-19 00:30:23 +01:00
Ivan Savenko
19c981fc56 Added similar screen for Obelisk, moved assets to dedicated folder 2025-01-06 13:05:45 +00:00
Ivan Savenko
6d0dc9c5bb Added popup for keymasters/border guards similar to teleporters 2025-01-05 23:22:46 +00:00
Laserlicht
c7963cf62f fix TeleporterPopup out of screen 2025-01-04 02:01:44 +01:00
Ivan Savenko
6d8e447ff3 Added new right-click popup to teleporters
Whirlpool, Subterranean Gates, and all Monoliths now show custom popup
on right-click that show all linked objects (exits and entrances).

Only revealed objects are visible, rest are hidden behind fow.

Exits, entrances, and bidirectional objects have different icon that
indicates direction.
2024-12-21 12:01:33 +00:00
Laserlicht
6366175a3c fix window 2024-11-23 19:19:07 +01:00
Ivan Savenko
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Ivan Savenko
fb28de5beb
Merge pull request #4531 from Laserlicht/mouse_right_drag
map drag with right mouse
2024-09-19 16:42:33 +03:00
Ivan Savenko
7064374d87 Fix visions not working for towns 2024-08-29 15:46:03 +00:00
Laserlicht
be7d27234f map drag with right mouse 2024-08-28 22:17:05 +02:00
Ivan Savenko
9fba3d97f1 Renamed & unified OBJECT_CONSTRUCTION macro set 2024-08-09 15:30:04 +00:00
Ivan Savenko
00605b5129 Remove largely unused defActions member from CIntObject 2024-08-09 14:26:53 +00:00
Ivan Savenko
75fd67a921 Fix mouse scroll not working in right-click popups 2024-07-19 19:36:05 +00:00
Ivan Savenko
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
Ivan Savenko
8003d0d7ca Restore handling of double-clicks in message boxes 2024-04-14 13:09:39 +03:00
Ivan Savenko
658747d342 Code cleanup 2024-02-27 14:45:15 +02:00
Ivan Savenko
99cb1df91d Fixes for positioning on popups with components 2024-02-27 13:15:16 +02:00
Ivan Savenko
93b3cb3af5 Better size & positioning of infoboxes 2024-02-26 22:04:30 +02:00
Ivan Savenko
4b4dedeab9 Code formatting 2024-02-26 18:53:12 +02:00
Ivan Savenko
e6b339448f Refactoring & deduplication of infowindow code 2024-02-26 18:32:15 +02:00
Ivan Savenko
658cc14cd0 Removed direct usage of SDL_Surface in info windows 2024-02-26 15:49:27 +02:00
Ivan Savenko
5419df1140 Removed no longer used class 2024-02-26 15:49:27 +02:00
Ivan Savenko
81a48f2d80 Do not attempt to resize text box to zero-width 2023-11-27 14:08:49 +02:00
Ivan Savenko
e0f6b582f5 Display object description only on right-click 2023-10-19 14:36:11 +03:00
Ivan Savenko
0f2922d064 Only show components if UI enhancements is on 2023-10-19 13:33:49 +03:00
Ivan Savenko
927ce4e60e Improvements to rewardable objects popups 2023-10-16 23:55:37 +03:00
Laserlicht
39838fdd3c extend for all selections 2023-09-15 15:24:17 +02:00
Ivan Savenko
e8453916cf Merge remote-tracking branch 'vcmi/beta' into develop 2023-09-08 18:49:06 +03:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Dydzio
e1e41d1107 Implement TOPCENTER text alignment 2023-08-30 00:35:31 +02:00
Dydzio
ed12f20609 Improve neutral creature adventure map popup 2023-08-21 14:42:41 +02:00
Ivan Savenko
01d588ab54 Fix keyboard shortcuts on selection dialogs 2023-07-22 22:29:05 +03:00
Ivan Savenko
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00
Ivan Savenko
06437cbde6 Renamed gesture-related methods, remove unused code 2023-06-20 19:58:05 +03:00
Ivan Savenko
563d7dd41f Renamed RCLICK -> SHOW_POPUP 2023-06-20 19:58:05 +03:00
Ivan Savenko
85a11c090e Enter popup await mode only if there is an active popup 2023-06-20 19:58:05 +03:00
Ivan Savenko
d4aa778547 Replaced clickRight event with showPopupWindow/closePopupWindow 2023-06-20 19:58:05 +03:00
Ivan Savenko
8ea0ecaec1 show/showAll methods now use Canvas instead of SDL_Surface
- added compatibility method to Canvas to allow SDL_Surface access
- added drawBorder method to Canvas to replace CSDL_Ext method
- added drawColor method to Canvas to replace CSDL_Ext method
- minor changes to Tavern and Trade windows to adapt to new API
2023-06-02 16:42:18 +03:00
Ivan Savenko
e2ef136003 Renamed "Int" -> "Window" in WindowHandler API 2023-05-16 19:10:22 +03:00
Ivan Savenko
7838190ef4 Moved window stack management from GuiHandler to new class 2023-05-16 19:10:21 +03:00
Ivan Savenko
c5a48a01ce Remove no longer used code 2023-05-09 13:10:33 +03:00
Ivan Savenko
243773b6ef Renamed some adventure map files & classes 2023-05-09 13:10:33 +03:00
Ivan Savenko
dea10e6091 Use more descriptive names for hotkeys 2023-05-01 17:59:20 +03:00
Ivan Savenko
a654cc2391 Removed vstd::advance. Added vstd::next to handle similar cases. 2023-05-01 17:58:18 +03:00