Ivan Savenko
7267e02b8d
Better handling of Ctrl / Cmd modifier keys on Apple systems:
...
- Test only for Cmd modifier key when processing mouse clicks
- Test both Ctrl and Cmd modifier key when processing keyboard input
- This logic is now used for all Apple systems - macOS and iOS
2024-05-12 17:09:31 +00:00
Alexander Wilms
0495c52cf4
Don't call ScreenHandler::onScreenResize() when the window has been (un)maximized to avoid creating a huge texture and crashing
2024-02-05 18:59:55 +01:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
...
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.
This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.
Files that are Windows specific like *.vcxproj and *.props files were
not converted.
Closes : #3073
2023-10-19 16:23:21 +02:00
Ivan Savenko
d6b9fa8fbd
Replaced CPlayerInterface::pim with CGuiHandler::interfaceLock
...
- Removed CPlayerInterface::pim since this lock does not actually
protects LOCPLINT but rather entire game UI state
- added more logical CGuiHandler::interfaceLock
- interface lock is now non-recursive and is locked only once by initial
caller that want to access GUI
2023-09-27 18:33:52 +03:00
Ivan Savenko
1d0e696db6
Added RenderHandler that acts as factory for images and animations
2023-09-04 18:22:34 +03:00
Ivan Savenko
0613756abc
Remove unused code
2023-08-23 16:32:29 +03:00
Ivan Savenko
0f8d53e978
Replaced SDL user events list with dispatching of arbitrary functors
2023-06-26 21:51:10 +03:00
Ivan Savenko
dfeeeb1f5f
Removed no longer used
2023-06-22 22:12:05 +03:00
Ivan Savenko
34123c7f07
Minor refactoring of mouse input handling
2023-06-05 19:00:56 +03:00
Ivan Savenko
c77f8482e3
Replaced event handling break system with key capturing
2023-05-20 01:51:49 +03:00
Ivan Savenko
0e70f2998f
SDL event handling is now done exclusively in input handler
2023-05-20 01:51:49 +03:00
Ivan Savenko
5e86b00dda
Moved input handling from GuiHandler to set of classes in eventsSDL dir
2023-05-20 01:51:49 +03:00
Ivan Savenko
6012e0cb45
Minor code reorganization
2023-05-20 01:51:49 +03:00
Ivan Savenko
d5d0ca96a8
Minor fixes and cleanup
2023-05-20 01:51:49 +03:00
Ivan Savenko
1f513fd280
Extracted event management from GuiHandler and CIntObject
2023-05-20 01:51:49 +03:00
Ivan Savenko
008a1ebec4
split massive handleCurrentEvent method into per-event parts
2023-05-20 01:51:49 +03:00
Ivan Savenko
ad3e54e6c0
Reduced usage of topWindow() method
2023-05-16 21:57:45 +03:00
Ivan Savenko
7838190ef4
Moved window stack management from GuiHandler to new class
2023-05-16 19:10:21 +03:00
Ivan Savenko
f84c2c3bb5
Removed getFrameDeltaMilliseconds from gui handler
2023-05-14 22:30:59 +03:00
Ivan Savenko
8a31aeb94b
Battle animations use tick() for updates
2023-05-14 22:23:00 +03:00
Ivan Savenko
3ecdff2a21
FramerateManager now uses chrono instead of SDL_Ticks
2023-05-14 22:22:37 +03:00
Ivan Savenko
03df274450
Framerate manager is now in a separate file and private member of GH
2023-05-14 22:22:37 +03:00
Ivan Savenko
e26b18c139
Rename & cleanup of WindowHandler -> ScreenHandler
2023-05-09 13:10:33 +03:00
Ivan Savenko
fd3933e589
Support for changing resolution without game restart
2023-05-09 13:10:33 +03:00
Ivan Savenko
b4e7093c01
Added IWindowHandler interface for OS screen/window utilities
2023-05-09 13:10:33 +03:00
Ivan Savenko
c688411bab
Extracted window management from CMT to new class
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
832e56e005
Implementation of (very basic) shortcuts system
...
- Added EShortcut enumeration that contains all in-game shortcuts
- CIntObject::keyPressed now receive values from hotkey enumeration
- On keypress, SDL key code will be translated to shortcut ID
- Removed access to SDL key codes from most of engine
2023-05-01 17:58:17 +03:00
Konstantin
86f5d6de69
vcmi: modernize headers
2023-04-30 13:35:54 +03:00
Ivan Savenko
2e69a4769d
Implemented framerate limit option (not available in UI)
2023-03-05 21:06:52 +02:00
Ivan Savenko
b57a07b10f
Restored ambient sounds functionality
2023-03-05 18:02:59 +02:00
Ivan Savenko
7c58a46279
Removed some instances of access to screen
surface
2023-02-03 18:23:53 +02:00
Ivan Savenko
b1821d4442
Removed some SDL access from non-SDL code
2023-02-03 11:39:40 +02:00
Ivan Savenko
e1bd0d2a04
API for custom events no longer requires SDL access
2023-02-03 11:39:40 +02:00
Ivan Savenko
860fe43131
Merged two mouse button enums
2023-02-03 11:39:40 +02:00
Ivan Savenko
6669ffd4b3
Moved input-related code from SDL_Extensions to GuiHandler
2023-02-03 11:39:40 +02:00
Ivan Savenko
214fc19e74
CIntObject now receives mouse position as point instead of SDL event
2023-02-03 11:39:39 +02:00
Ivan Savenko
9c3030603d
Removed most SDL includes from headers, removed SDL int's
2023-01-30 19:55:32 +02:00
Ivan Savenko
57ee9a9bf3
Merge vcmi/beta into vcmi/develop
2023-01-29 18:21:55 +02:00
Ivan Savenko
50a0fc4fb2
Removed pointer to current SDL_Event from GuiHandler
2023-01-27 23:17:40 +02:00
Ivan Savenko
9be38780cd
Removed remaining parts of Geomeotries.h/cpp
2023-01-20 16:11:43 +02:00
Ivan Savenko
ee7a573cb8
Refactoring of SDL API usage:
...
- Rect no longer inherits from SDL_Rect
- renamed vcmi functions that used SDL naming format
- moved all functions in SDL_Extensions file into CSDL_Ext namespace
- SDL_Rect is now used only by SDL_Extensions, all other code uses Rect
2023-01-20 16:11:43 +02:00
Andrii Danylchenko
6c843bce0b
SDL relative pointer for android
2023-01-18 10:38:55 +02:00
Andrii Danylchenko
c24b89fe06
2 finger rclick block adwmap scrolling and disable for iOS
2023-01-17 16:22:44 +02:00
nordsoft
521328addd
Adding macros for targeted object binding
2022-12-22 00:54:06 +04:00
Ivan Savenko
7a6ad671ab
Separated battle control panel into new class, refactoring of
...
CGStatusBar to allow shared API with battle console
2022-11-18 17:54:10 +02:00
Andrey Filipenkov
ff635edc0b
wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
...
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrii Danylchenko
1128abc593
Fix hero movement animation
2022-06-07 15:00:39 +03:00
KasyanDiGris
fa5a14e2d8
Stabilize vcmi ( #488 )
...
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Alexander Shishkin
75f8c8b29a
Gui cleanup4 ( #446 )
...
* use smart pointers for almost all widget fields
* use SDL2 texture for cursor
* a lot af small tweaks and formatting
* removed CompImage class, it is actually useless as long as regular SDLImage support margins
* CGuiHandler: use smart pointers for [push|pop]Int
2018-07-25 01:36:48 +03:00