1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

60 Commits

Author SHA1 Message Date
b568e2f628 Merge branch 'vcmi:develop' into quickspell 2024-07-17 03:20:31 +02:00
d23d4b32c7 cleanup 2024-07-17 01:02:11 +02:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
989394de53 Selectionwindow 2024-06-21 21:25:14 +02:00
1f6e0fae7d quickspell draft 2024-06-21 21:25:14 +02:00
cc14f85445 Refactoring. Regressions fixing. 2024-03-25 12:55:05 +02:00
22f23ba6f8 Restore previously disabled functionality 2024-02-29 16:47:44 +02:00
ddb2acb9c2 Code cleanup 2024-02-29 15:39:13 +02:00
0051ffa7a9 Implemented configurable buttons. Replaced 'animateLonelyFrame' logic. 2024-02-29 13:57:25 +02:00
07d201502e Refactoring of button class to prepare for configurable button 2024-02-29 13:57:25 +02:00
e677164ed0 client/widgets/Buttons.h: Fix const reference
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2023-10-29 13:34:19 +00:00
f1bb6b999c client/widgets/Buttons.{h,cpp}: Pass expensive to copy object "callback" by reference to const. 2023-10-29 13:33:57 +00:00
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
c064b805c2 Refactor combo box 2023-08-28 17:10:52 +04:00
43795c39a5 Replaced all usage of SDL_Color outside of render with ColorRGBA 2023-07-31 21:07:30 +03:00
9ef959a7f8 Merge pull request #2310 from IvanSavenko/left_click_refactor
Left click input refactor
2023-07-13 13:03:06 +03:00
ca889a5c2a Replaced clickLeft with clickPressed clickReleased methods 2023-07-08 14:33:04 +03:00
2a634b2ec0 Fixed UI updates on switching to/from fullscreen 2023-07-07 15:26:42 +03:00
d4aa778547 Replaced clickRight event with showPopupWindow/closePopupWindow 2023-06-20 19:58:05 +03:00
6fe00ad55c Moved slider class to a separate file 2023-06-05 19:16:01 +03:00
360bf48031 Implemented panning/swiping gesture for sliders 2023-06-05 19:09:56 +03:00
dc8e9cd048 wheelScrolled event now accepts distance instead of bool 2023-06-05 19:00:57 +03:00
e2a85e25fa Removed old code 2023-06-05 19:00:57 +03:00
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
d4098059b8 Proper support for player-colored buttons in UI 2023-05-09 13:10:33 +03:00
a015bf6507 Initial part of dynamically-sized adventure map:
- removed no longer used CConfigHandler
- remove no longer use resolutions.json
- moved widget management from adventure map to a separate class
- adventure map layout is now loaded from config
2023-05-09 13:10:33 +03:00
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
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
507d8bf7fd Allow defining active areas for sliders. Fixes settings window. 2023-04-02 22:24:07 +03:00
3fef2a5e1f Moved Colors to a separate file, updated includes 2023-02-03 11:39:40 +02:00
cfcaf5cbb6 renamed keyDown -> keyPressed 2023-02-03 11:39:40 +02:00
d4fba3787c Removed usage of SDL_KeyboardEvent from UI code 2023-02-03 11:39:40 +02:00
214fc19e74 CIntObject now receives mouse position as point instead of SDL event 2023-02-03 11:39:39 +02:00
108a42e4ba Reorganized includes for new layout. New class - IImageLoader 2023-02-01 20:42:06 +02:00
9c3030603d Removed most SDL includes from headers, removed SDL int's 2023-01-30 19:55:32 +02:00
8ed115a628 Fix ios compile 2023-01-20 16:11:43 +02:00
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
bdb8e0ee5c Introduced string identifiers for H3 texts, still WIP 2023-01-01 14:56:44 +02:00
b1f2c7aed4 Team alignments implemented 2022-12-17 08:19:16 +04:00
d3c3feb037 Configurable template selection 2022-12-16 02:15:53 +04:00
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
01ca21ae67 Fix bug: LobbyScreen UI has a bug on the Difficulty toggle group.
Scenario: In LoadGame Lobby screen, the difficulty toggle group is showing multiple choices, but actually only one valid is working.

The reason is, in the Lobby screen Initialization code will set the difficulty = 0, and each time the player changes a map in the selection, the toggle group control is not resetting the difficulty buttons to disabled state.

How fix:
Add a new method to ToggleGroup class: setSelectedOnly, which will disable all other buttons and then set the selected button.

Note:
During the game loading time, the client is loading the map, and send a NetPack to server: LobbySetMap, and send a NetPack to Interface: LobbyUpdateState.
In the LobbyUpdateState it sets the map difficulty.
2020-01-21 01:09:08 -08:00
5c09f751b3 Gui cleanup3 - UI refactoring to use smart pointers (#440)
* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
2018-04-07 18:34:11 +07:00
0f00dbf8cf Fix highlighting of a selected bonus for campaign. (#432) 2018-03-17 12:23:22 +08:00
1331c81a8b Update graphics for QuickRecruitmentWindow
Adding graphics maded by edeksumo
2018-01-13 09:49:29 +01:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
c4ab962cc0 Fixed a few CWE-457 2016-11-27 17:48:18 +03:00
f11c54b5e9 Wipe unused ClickableArea 2016-11-27 16:07:03 +03:00
3a52a3c663 Allow CAnimImage to share animation object. 2016-10-16 12:58:18 +03:00
abb875b400 cleanup 2016-10-16 03:52:11 +03:00