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

110 Commits

Author SHA1 Message Date
ad3e54e6c0 Reduced usage of topWindow() method 2023-05-16 21:57:45 +03:00
e2ef136003 Renamed "Int" -> "Window" in WindowHandler API 2023-05-16 19:10:22 +03:00
7838190ef4 Moved window stack management from GuiHandler to new class 2023-05-16 19:10:21 +03:00
a8220c551f fixed init CArtifactsOfHero 2023-04-23 14:33:47 +03:00
f0f9eecf97 Backpack limit part5. End of battle. Other stuff 2023-03-21 12:14:33 +02:00
acdb8d6e06 renamed Unicode -> TextOperations, to use for all text processing 2023-03-05 17:39:23 +02:00
34dcb4127a Removed text utilities from SDL_Extensions 2023-02-03 18:55:25 +02:00
d87fb43dcd Replaced SDL access with VCMI methods 2023-02-03 11:39:40 +02:00
3fef2a5e1f Moved Colors to a separate file, updated includes 2023-02-03 11:39:40 +02:00
6669ffd4b3 Moved input-related code from SDL_Extensions to GuiHandler 2023-02-03 11:39:40 +02:00
9c3030603d Removed most SDL includes from headers, removed SDL int's 2023-01-30 19:55:32 +02:00
6727a3673f limit displayed units number to 4 digits on adventure map
- garrison view (hero, town)
- small hero window
2023-01-20 20:40:28 +03:00
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
405b2976d5 Renamed getUpgradeInfo -> fillUpgradeInfo 2022-12-25 14:03:43 +02:00
0cae259f53 Most of rendering in BattleInt is done via canvas
- refactoring of CBattleStacksController.cpp
- moved EAlignment enum to Geometries.h from CIntObject
- renamed EAlignment to ETextAlignment, to avoid conflict with good/evil
alignemt
- ETextAlignment is now enum class
2022-11-26 23:12:20 +02:00
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
a320af837d fix includes in client subdirectories 2022-09-18 17:43:40 +03:00
0d15089dd4 Do not remove hero if left only with commander 2022-05-01 09:30:30 +03:00
8cae3398ba Feature: Army Management Shortcuts should work as in HD+ Mod 2021-11-28 20:00:43 +02:00
483a4689ce Fixes for code review issues 2021-02-20 04:57:50 +03:00
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
6d8f1e4530 Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
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
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
dec825fdc2 redefined lctrl to lgui for macs (#426)
keyboard shortcuts for splitting armies will use left command key
instead of left control
2018-03-04 10:46:29 +08:00
86021f0bda Add keyboard shortcuts for quick army management from HD mod.
Just want add fast some really nice shortcuts from HD mod.
1) [LShift] + LClick – splits a half units from the selected stack into
an empty slot. WARNING: The second behaviour ("smart split, ignores
single creatures") of this HD mod option is not done.
2) [LCtrl] + LClick – splits a single unit from the selected stack into
an empty slot.
3) [LCtrl] + [LShift] + LClick – split single units from the selected
stack into all empty hero/garrison slots
2017-10-27 05:21:33 +02:00
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
76acc29d6c Correctly display visiting army in kingdom overview, fixes #1761
Do not modify CIntObject::pos, according to its doc
2017-05-22 22:34:05 +02:00
cde8542475 Oversight. 2017-03-18 14:25:17 +01:00
dd5660ff08 Simplifity code. 2017-03-18 14:21:41 +01:00
d045f59a11 Little fix in braces #2. 2017-03-18 07:58:40 +01:00
68c618cb99 Little fix in highlight in CGarrisonSlot. 2017-03-17 21:24:55 +01:00
7d29365e4a Fixed CID 1243197 2016-11-28 02:50:45 +03:00
2dd6a47764 try to plug a few coverity false positives 2016-11-28 02:50:41 +03:00
27b853618c Fixed a few CWE-457 2016-11-27 18:17:20 +03:00
0236309d25 CArtifactsOfHero: use shared_ptr for SCommonPart 2016-08-30 07:05:31 +03:00
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
419bde8997 Fix 2358 swapped garrison <-> visiting status text 2016-01-21 09:59:39 +03:00
ffb8e6a696 Garrison: fix more issues introduced in pull #115
After 8cad23956c there was several issues remaining:
* Last creature would remain even for town garrisons.
* Impossibility to move last stack even within same garrison.
* Impossibility of partially merge of last stack into other hero stack.
All fixed. However last stack merge to other hero will now make split window appear instead of auto merge.
2015-09-23 08:12:43 +03:00
8cad23956c Fix 2258 2015-09-19 17:16:09 +03:00
a79ade7d44 Garrison: Move all but one creature when last slot 2015-08-26 08:44:23 -04:00
dafc40d896 Garrison: Fix selection behaviour when swapping with ally 2015-08-26 08:40:00 -04:00
a89ef88ce3 Garrison: Factor complex if statement to functions 2015-08-26 08:40:00 -04:00
cd13807115 Garrison: Clarify upg by turning into a class enum 2015-08-26 08:39:57 -04:00
b008d24c68 Garrison: Refactor Left Click
Restructure large nested if statements into more shallow blocks
Factor out contents of if statements to functions for better readability
    * viewInfo
    * hightlightOrDropArtifact
    * split
2015-08-25 09:47:23 -04:00
3d327e650a Garrison: Boyscouting: simplify clickLeft 2015-08-25 09:47:23 -04:00