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

39 Commits

Author SHA1 Message Date
Ivan Savenko
45e2875342 Completely removed old TerrainRect class 2023-03-05 17:57:36 +02:00
Ivan Savenko
d0f57fed6f Cleaned up code of Minimap 2023-02-14 11:18:41 +02:00
Ivan Savenko
3fef2a5e1f Moved Colors to a separate file, updated includes 2023-02-03 11:39:40 +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
7c0d5666a0 Return string by copy to fix cases when string is constructed on stack 2023-01-01 20:55:43 +02:00
Ivan Savenko
bdb8e0ee5c Introduced string identifiers for H3 texts, still WIP 2023-01-01 14:56:44 +02:00
Ivan Savenko
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
Ivan Savenko
abb553d975 Next step of code refactoring:
- refactoring of CBattleFieldController code (except for 2 arcane
methods)
- introduced class CCanvas for encapsulated rendering surface
- battleint rendering is now partially done with CCanvas
- removed unused includes of CBitmapHandler
2022-11-25 11:46:47 +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
John Bolton
a05ae78e67 Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07: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
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
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
AlexVinS
abb875b400 cleanup 2016-10-16 03:52:11 +03:00
Arseniy Shestakov
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
Ivan Savenko
c3ce4b25df Removed all #include's of CMap.h from headers.
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
AlexVinS
1510f1f14c CQuestLog: boost::bind->std::bind 2015-09-02 20:00:56 +03:00
AlexVinS
c4cbda88ac Fix "reorder" warnings 2015-02-21 12:39:10 +03:00
ArseniyShestakov
536015f1c2 Quest Log: move slider to start when blocked
Partially fixes problem mentioned in issue 2093
2015-02-18 00:07:03 +03:00
ArseniyShestakov
c0b78de6b4 Quest Log: block hide complete button when it useless
We only want to to be checkable when there is actually any complete quests in list.
2015-02-17 06:08:35 +03:00
ArseniyShestakov
ae20499854 Quest Log: implement option to hide complete quests 2015-02-17 05:47:49 +03:00
ArseniyShestakov
df2894b798 Quest Log: implement support Seer names 2015-02-16 00:44:48 +03:00
ArseniyShestakov
9665c50f3f Quest Log: clanup code that is not needed anymore
As far as I understand once object capturing used it's no longer needed to manually call Show.
Currently CIntObject::show and CIntObject::showAll automatically call it for all children.
2015-02-14 21:35:11 +03:00
ArseniyShestakov
8beed60815 Quest Log: cleanup minimap code
Usage of shared_ptr suggested by @alexwins
2015-02-14 21:31:56 +03:00
ArseniyShestakov
5a5c126f0e Quest Log: fix background resource name
Currently it's not PCX, but PNG
2015-02-14 20:39:53 +03:00
ArseniyShestakov
d06bba422a Quest Log: display components under quest description
This commit add CComponentBox under text. If quest have components description height will be changed to avoid conflicts.
Though it's would be much better if VCMI had something like QScrollArea in Qt so both text and components was using shared slider.
2015-02-14 04:21:31 +03:00
ArseniyShestakov
c978bc862d Quest Log: fix position of selection box on labels 2015-02-14 03:47:31 +03:00
ArseniyShestakov
c046f8ddc6 Quest Log: update code for new graphics and fix bugs
This one should fix issues 1988 and 2022
2015-02-14 03:38:28 +03:00
ArseniyShestakov
8648081f0a Quest Log: change minimap level when quest selected
There also no need in own setLevel as one from CMinimap works fine.
2015-02-14 02:13:17 +03:00
Ivan Savenko
6cd3d1b30e Fixed 1889 - removed memory leak that caused multiple identical quest marks 2014-09-18 17:46:35 +03:00
Ivan Savenko
1e5e02c7df Compilation fixes caused by merge, replaced some remaining boost::bind with std's 2014-08-09 15:14:31 +03:00
Ivan Savenko
b1285bc506 Merged GUI refactoring into develop, fixed conflicts 2014-08-09 15:01:55 +03:00
Ivan Savenko
77a73fbaa9 Merge branch 'feature/freegfx' into refactoring/guiClasses
Conflicts:
	client/windows/CHeroWindow.cpp
	client/windows/CQuestLog.cpp
	client/windows/GUIClasses.cpp
2014-08-03 18:50:59 +03:00
Ivan Savenko
7390647cd5 End of buttons refactoring:
- cleanup of slider API
- documentation fixes
2014-08-03 17:31:56 +03:00
Ivan Savenko
10fc1892a8 Large refactoring of button classes:
- renamed CAdventureMapButton to more expectable CButton
- merged CButtonBase into CButton
- created more generic class for clickable elements
- created more generic class for selectable elements
- renamed CHighlightableButton to CToggleButton
- renamed CHighlightableButtonsGrous to CToggleGroup
- minimized differences between API of all these classes
- removed all but one contructors in buttons, with same parameters across all classes
2014-08-03 14:16:19 +03:00
Ivan Savenko
731aedf3a1 Split CIntObjectClasses into multiple smaller files. This should be the last change in files 2014-07-15 10:14:49 +03:00
Ivan Savenko
7f790f9d6a Quest window now uses new background, using same gfx sources as creature window 2014-07-14 18:07:57 +03:00
Ivan Savenko
647b9c683f Reorganized client source tree:
- client/widgets for reusable GUI elements
- client/windows for independent windows
- client/gui for base GUI classes which should remain internal
2014-07-13 20:53:37 +03:00