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

205 Commits

Author SHA1 Message Date
Dydzio
a06ca4b5cf Tweak statusbar options, fixes mouse stuttering 2019-05-19 16:19:16 +02:00
Dydzio
c428e326b9 Optimize button responsiveness during pregame options 2019-04-20 18:26:54 +02:00
Michał Janiszewski
7be9aa4868 Prevent shadowing of function arguments by local vars 2018-10-29 16:56:14 +01: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
Andrii Danylchenko
ee033e9c9c fix android build 2018-05-25 22:57:29 +03:00
Alexander Shishkin
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
Arseniy Shestakov
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
Arseniy Shestakov
14f03e22da CLabelGroup: add currentSize method
Might be someone will suggest me better name.
And actually I need method to clean group too.
2018-04-03 22:11:14 +07:00
Arseniy Shestakov
ab2b9086d3 CLabel: add methods getWidth, setColor, setAutoRedraw
For somethign like map list we need to change CLabel data without redrawing it.
2018-04-03 22:11:14 +07:00
AlexVinS
b09a54fa9c [tweaks] IImage * -> auto 2018-03-30 14:29:55 +03:00
AlexVinS
43acfa160b [tweaks] IImage * -> auto 2018-03-30 14:02:04 +03:00
AlexVinS
031d3204f7 Fixed "Error: accessing unavailable frame" in some cases 2018-03-30 13:40:40 +03:00
Raphnalor
0f00dbf8cf Fix highlighting of a selected bonus for campaign. (#432) 2018-03-17 12:23:22 +08:00
jerryskye
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
Nikolay Shalakin
3795985de9 Eliminate warnings / errors. Pull request #388 2018-02-11 15:17:14 +03:00
FeniksFire
1331c81a8b Update graphics for QuickRecruitmentWindow
Adding graphics maded by edeksumo
2018-01-13 09:49:29 +01:00
FeniksFire
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
ArseniyShestakov
4149662845 Merge pull request #376 from vcmi/newAnimations
New animations
2017-10-11 16:18:06 +03:00
godric3
f03a0b1151 fix #2731, now no morale, and no luck texts show properly 2017-10-05 17:13:49 +02:00
AlexVinS
270e1b75ce Support for creature 2-hex attack, alternate death and cast animation types
* margin option .json animation
* Use ranged attack animation for spell cast if there is no cast animation, display cast animation only on active casting.
2017-09-12 19:51:54 +03:00
AlexVinS
9423555015 Declare ownership of CCursorHandler::dndObject
# Conflicts:
#	AI/FuzzyLite
#	client/gui/CGuiHandler.cpp
2017-09-05 15:25:31 +03:00
Henning Koehler
abdca71828 skill names and descriptions are fully managed by CSkillHandler 2017-08-30 22:35:23 +12:00
Henning Koehler
0357a4fe3b enabled config of skill descriptions 2017-08-26 10:08:06 +12:00
AlexVinS
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
AlexVinS
85e952f25f Logging cleanup 3 2017-08-10 20:17:10 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
Fay
80f149e296 Better android input handling: sending notifications about CInputText changes to java so that we can display textinput overlay there; (#354) 2017-07-23 20:23:48 +03:00
Arseniy Shestakov
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
ArseniyShestakov
b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
ArseniyShestakov
a4c0ad94b1 Code style: remove default value hints in definitions (#342)
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
Arseniy Shestakov
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
Fay
65e88639a3 Minor: code format; 2017-06-08 21:07:09 +02:00
Fay
02fa478bfb Refactor: unified logic for notyfing CIntObjs about left/right mouse click events;
Added support for middle-click;
2017-06-07 20:16:18 +02:00
AlexVinS
0190c9804e formatting 2017-06-06 19:45:34 +03:00
AlexVinS
a31c28ec33 Unified war machine mechanics.
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
AlexVinS
df3574b50f Fixed https://bugs.vcmi.eu/view.php?id=2685 2017-05-27 17:07:11 +03:00
Piotr Wójcik
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
Piotr Wójcik
e4d3cdca09 Simplify 2017-05-13 16:57:15 +02:00
Piotr Wójcik
cc02001836 T hotkey select first town when last is active, fixes #1293 2017-05-11 20:49:17 +02:00
FeniksFire
cde8542475 Oversight. 2017-03-18 14:25:17 +01:00
FeniksFire
dd5660ff08 Simplifity code. 2017-03-18 14:21:41 +01:00
FeniksFire
d045f59a11 Little fix in braces #2. 2017-03-18 07:58:40 +01:00
FeniksFire
68c618cb99 Little fix in highlight in CGarrisonSlot. 2017-03-17 21:24:55 +01:00
Arseniy Shestakov
d4091db172 CInfoBar: only pop up when adventure map interface is on top 2017-03-14 00:03:15 +03:00
AlexVinS
7d29365e4a Fixed CID 1243197 2016-11-28 02:50:45 +03:00
AlexVinS
2dd6a47764 try to plug a few coverity false positives 2016-11-28 02:50:41 +03:00
AlexVinS
312793efd9 try to plug a few coverity false positives 2016-11-27 23:41:17 +03:00
AlexVinS
6196ae7fca Fixed a few CWE-457 2016-11-27 19:00:16 +03:00
AlexVinS
27b853618c Fixed a few CWE-457 2016-11-27 18:17:20 +03:00
AlexVinS
c4ab962cc0 Fixed a few CWE-457 2016-11-27 17:48:18 +03:00
AlexVinS
f11c54b5e9 Wipe unused ClickableArea 2016-11-27 16:07:03 +03:00
AlexVinS
30663f15ea Fixed CID 1288863 2016-11-26 22:12:52 +03:00
AlexVinS
ac8b618a42 Fixed CID 1366373 2016-11-25 19:17:37 +03:00
AlexVinS
db40e125eb Fixed CID 1243181, CID 1197449, CID 1366374, CID 1366377, CID 1366359 2016-11-24 21:56:30 +03:00
AlexVinS
33c0bc49f6 Merge branch 'CommanderArtifacts3' into develop 2016-11-13 15:31:16 +03:00
dydzio
b626f9a134 Fix CCommanderArtPlace localization + minor fixes 2016-11-08 17:26:24 +01:00
AlexVinS
a8a661b159 Map handler refactoring, part 2. 2016-11-08 00:19:53 +03:00
AlexVinS
aad675a7c4 Revert "Merge branch 'p254_4' into develop"
This reverts commit 37f68713a7, reversing
changes made to 4477b7c35d.
2016-11-08 00:17:20 +03:00
AlexVinS
c9a3d92ff3 cleanup 2016-11-06 17:36:46 +03:00
dydzio
96fa0fb6d4 Implement giving commander artifacts back to hero 2016-11-06 13:02:00 +01:00
AlexVinS
46196daa07 cleanup 2016-11-06 05:27:56 +03:00
dydzio
baeb3c9e55 Refactor CArtPlace + use it for commanders 2016-11-04 17:54:09 +01:00
Vadim Markovtsev
220e4d2030 Survive giving Commander's badge to stacks
Used to SEGFAULT
2016-10-30 14:27:53 +01:00
AlexVinS
365c64a345 use CAnimImage for world view legend 2016-10-27 16:34:10 +03:00
AlexVinS
ba5b65ff93 get rid of CDefHandler in CSpellWindow 2016-10-16 15:27:35 +03:00
AlexVinS
3a52a3c663 Allow CAnimImage to share animation object. 2016-10-16 12:58:18 +03:00
AlexVinS
63cbf960df cleaned up spell window creation 2016-10-16 09:27:22 +03:00
AlexVinS
5506ae036a Reworked CHillFortWindow
* fixed displaying free upgrades
* do not try to print 3rd or more resource in slot cost (in theory possible with mods)
** we need dynamic gui for that
* CDefEssential--
2016-10-16 08:03:52 +03:00
AlexVinS
abb875b400 cleanup 2016-10-16 03:52:11 +03:00
Vadim Markovtsev
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
dydzio
68af6a0c19 Refactoring InfoAboutHero + GetHeroInfo 2016-09-28 13:22:33 +02:00
Arseniy Shestakov
0236309d25 CArtifactsOfHero: use shared_ptr for SCommonPart 2016-08-30 07:05:31 +03:00
AlexVinS
ef05a56e49 cleanup 2016-08-30 05:13:45 +03:00
Arseniy Shestakov
452e28d183 Remove some useless includes found by cppclean
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
Arseniy Shestakov
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
Vadim Markovtsev
afa95312ba Fix 2139 captured spell scroll descriptions 2016-01-25 08:49:26 +03:00
Vadim Markovtsev
9ffd0155e6 Fix 1810 suggest artifact assembly 2016-01-23 16:24:43 +03:00
DjWarmonger
b02bd61c83 Merge pull request #164 from vmarkovtsev/issue/1821
Fix 1821 artifact assembly statusbar text
2016-01-21 09:37:43 +01:00
Vadim Markovtsev
b1f3480c68 Fix 1821 artifact assembly statusbar text 2016-01-21 10:50:53 +03:00
Vadim Markovtsev
419bde8997 Fix 2358 swapped garrison <-> visiting status text 2016-01-21 09:59:39 +03:00
Vadim Markovtsev
74111b7689 Return missing building name instead of crashing in CComponent::getSubtitleInternal 2016-01-19 10:35:10 +03:00
Arseniy Shestakov
8eb4f14ff0 MoraleLuckBox: handle BLOCK_LUCK bonus. Fix issue 2130 2015-12-24 22:35:32 +03:00
Vadim Markovtsev
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
ArseniyShestakov
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
AlexVinS
8cad23956c Fix 2258 2015-09-19 17:16:09 +03:00
AlexVinS
d181d764bb fix 2215 2015-09-15 10:02:27 +03:00
AlexVinS
8f2da66a18 fix mantiss 1967 + some refactoring
* remove TModDescr and realted APIs - they were only used in one place
2015-09-04 22:29:20 +03:00
Sandy Carter
a79ade7d44 Garrison: Move all but one creature when last slot 2015-08-26 08:44:23 -04:00
Sandy Carter
dafc40d896 Garrison: Fix selection behaviour when swapping with ally 2015-08-26 08:40:00 -04:00
Sandy Carter
a89ef88ce3 Garrison: Factor complex if statement to functions 2015-08-26 08:40:00 -04:00
Sandy Carter
cd13807115 Garrison: Clarify upg by turning into a class enum 2015-08-26 08:39:57 -04:00
Sandy Carter
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
Sandy Carter
3d327e650a Garrison: Boyscouting: simplify clickLeft 2015-08-25 09:47:23 -04:00
Sandy Carter
c02700853a Garrison: Disable split buttons when visiting ally 2015-08-25 09:47:23 -04:00
Sandy Carter
742f244426 Garisson: Documentation: Convert comments to doc 2015-08-25 09:47:23 -04:00
Sandy Carter
6ffb03cba3 Garrison: Documentation for our() and ally() 2015-08-25 09:47:21 -04:00
Sandy Carter
b2da2b8ef0 Garrison: Show "(in garisson)" for garissoned heroes' creatures 2015-08-25 09:22:25 -04:00
Sandy Carter
236492ed39 widgets: Cleanup musicButton specific hacks 2015-08-22 12:40:14 -04:00