1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
Commit Graph

68 Commits

Author SHA1 Message Date
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Ivan Savenko
64d6e48540 Fixed mouse double-click handling in some widgets.
Now double-click when 1st click was not inside widget should work as
expected:
- scenario list: 2nd click on non-selected scenario will select it
instead of starting unselected map
- component selection: 2nd click on non-selected component would select
it instead of confirming choice
- town portal dialog: 2nd click on non-selected town would only select
it
- tavern window: right-click would now also select this hero (h3 logic)
2024-05-10 16:05:59 +00:00
Ivan Savenko
01c2814d35
Merge pull request #3821 from SoundSSGood/CWindowWithArtifacts-refactoring
CWindowWithArtifacts refactoring
2024-04-26 11:58:38 +03:00
Ivan Savenko
1dc962804e Fixed possible crash on having selectable reward with no visual image 2024-04-25 14:04:45 +03:00
SoundSSGood
25d2b468c3 CWindowWithArtifacts preparations 2024-04-23 16:06:58 +03:00
Ivan Savenko
99cb1df91d Fixes for positioning on popups with components 2024-02-27 13:15:16 +02:00
Ivan Savenko
ec159f2fdd Fixed bad line breaks in starting faction description popup 2024-02-26 22:04:02 +02:00
Ivan Savenko
056ef00f74 Bugfixing 2023-11-02 13:52:58 +02:00
Ivan Savenko
10e50548e7 Converted Component class to use VariantIdentifier instead of int 2023-11-02 12:00:04 +02:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Laserlicht
fa9d5e9971
show missing resources 2023-10-09 21:43:43 +02:00
Ivan Savenko
037efdf5fc Improvements to type safety of Identifier class
- Constructor of Identifier from integer is now explicit
- Lobby hero/town selection now uses Identifiers instead of int's
- Removed serialization workaround for hero portraits
- Added dummy objects for custom heroes portraits for ID resolver to use
- HeroInstance now stores portrait ID only in case of custom portrait
- Fixed loading of campaign heroes portraits on RoE maps
2023-10-04 18:05:23 +03:00
Laserlicht
03316c62bf Easy choosing for a secondary skill in Level Up Dialog by double clicking it 2023-09-15 15:24:17 +02:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Ivan Savenko
43795c39a5 Replaced all usage of SDL_Color outside of render with ColorRGBA 2023-07-31 21:07:30 +03:00
Ivan Savenko
9ef959a7f8
Merge pull request #2310 from IvanSavenko/left_click_refactor
Left click input refactor
2023-07-13 13:03:06 +03:00
Ivan Savenko
9acab48bc3
Merge pull request #2268 from SoundSSGood/CArtifactInstance-rework
CArtifact CArtifactInstance refactoring
2023-07-11 14:36:08 +03:00
Ivan Savenko
ca889a5c2a Replaced clickLeft with clickPressed clickReleased methods 2023-07-08 14:33:04 +03:00
Ivan Savenko
8b61c0d59b Replaced CIntObject::type bitfield with bool's. Added input blocking. 2023-07-03 19:24:12 +03:00
SoundSSGood
d44821e733 CArtifactInstance moved to own file 2023-06-30 19:41:19 +03:00
SoundSSGood
f8023ad283 CScrollArtifactInstance 2023-06-30 19:41:04 +03:00
Ivan Savenko
563d7dd41f Renamed RCLICK -> SHOW_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
1e9eea30e1 Merge remote-tracking branch 'soundsgood/CArtHandler-rework' into develop 2023-06-05 18:53:17 +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
SoundSSGood
021f94a579 artifact utils 2023-05-17 17:00:31 +03:00
Ivan Savenko
a654cc2391 Removed vstd::advance. Added vstd::next to handle similar cases. 2023-05-01 17:58:18 +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
SoundSSGood
9a838598a6 arts refactoring part1 2023-04-15 00:10:39 +03:00
Konstantin
bf67784840 vcmi: correctly show spells from SpellInt.def 2023-03-11 21:41:57 +03:00
Konstantin
de211e9f13 vcmi: all notifications now shows inside the infobar properly
No more dangling images or text.
2023-03-11 21:41:57 +03:00
Konstantin
bc228a938a vcmi: use enum class for EComponentType
There is really no reason not to use it
2023-03-11 21:41:57 +03:00
Konstantin
2bd74e5c67 vcmi: use small icons for medium components
It makes more sense due to current UI implementation. It is better
to have icon smaller than have icons overlap
2023-03-11 21:41:57 +03:00
Konstantin
1ca89c8492 vcmi: implement splitting by ID in infobar
This will get a much better result than naive sorting
2023-03-11 21:41:57 +03:00
Konstantin
8a05f5bed7 vcmi: allow set font size on component
Now it is possible to set arbitrary font size
for CComponent. So, let's use it
2023-03-11 21:41:57 +03:00
Konstantin
da8840c499 CComponent: do not always assume 80 for text 2023-03-11 21:41:57 +03:00
Konstantin
4617ce10e5 vcmi: allow showing more than one components in infobar
Up to 8, AFAIK. So, we can show multi-reward in infobox now.
One issue remain - cannot dynamically choose components size
based on text size.
2023-03-11 21:41:57 +03:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
Ivan Savenko
f8c1c46562 removed CAdvMapInt::handleRightClick method 2023-02-14 11:18:41 +02:00
Ivan Savenko
108a42e4ba Reorganized includes for new layout. New class - IImageLoader 2023-02-01 20:42:06 +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
Ivan Savenko
05a1d7c6e3 All text for factions/towns/building are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
388ed88b5d All artifact strings now pass through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
e22f6283c2 Secondary skills strings are now passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822 All spell texts are now passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
0e8ee929df Renamed CCursorHandler -> CursorHandler 2023-01-15 21:18:34 +02:00
Ivan Savenko
864990db13 Implemented Bloodlust & Petrification effect
- ColorFilter is now in separate file
- Moved lerp function into global.h
- Bloodlust visuals mostly matches H3
- Petrify visual matches H3
- TODO: Adjust timing of all ColorFilter efects to match H3
- TODO: Petrify should pause stack animations
- TODO: ColorFilter-powered effects should be configurable in Spell system
2022-12-15 23:24:03 +02:00
Ivan Savenko
495e0b3657 Merge remote-tracking branch 'vcmi/develop' into battleint_refactor 2022-12-01 23:58:01 +02:00
SoundSSGood
909dcb82fa use ArtifactID 2022-11-29 00:32:18 +02:00