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

35 Commits

Author SHA1 Message Date
aab082fd2e Remove remaining access to SDL_Events 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
860fe43131 Merged two mouse button enums 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
9be38780cd Removed remaining parts of Geomeotries.h/cpp 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
d40d5250b7 changes to status bar according to review comments:
- renamed IStatusBar API to more clear names
- removed "locking" of status bar
- added comments for IStatusBar API
- removed dynamic_casts to CGStatusBar, now IStatusBar API is fully
sufficient
2022-12-12 18:23:41 +02:00
ac839ad26a Changes to rest of the code according to review:
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43: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
411038195c Add clickeable area on top of creature picture
A class that wraps an instance of `CIntObject` creates an area
that users can right click to view information about the creature
they're buying.

The constants were based off the existing ones in the code and were
refined by guessing and checking where clicking falls inside/outside
the border of the rectangle.
2022-09-18 22:53:11 -07:00
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28: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
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03: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
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
055c84bc7a cleanup 2016-10-16 04:23:38 +03:00
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
cc669b0ae7 Move gui locking to GUIHandler 2015-06-22 21:53:47 +03:00
b6a2323e01 SDL1 wipe, part 2. Untested. 2015-06-21 01:59:31 +03:00
c46999bcb8 Conurrency related tweaks. Crashes in renderFrame should be fixed, but synchronization is still not perfect 2015-02-15 04:53:01 +03:00
b71d985d49 cleanup 2015-02-15 01:46:47 +03:00
Fay
4b248c2762 World view impl -- initial; 2015-01-13 20:57:41 +01:00
b22973e717 Fixed crash, "pure virtual method called", when calling doUpdate lambda from CGPreGame. 2014-11-10 20:21:39 +03:00
1e5e02c7df Compilation fixes caused by merge, replaced some remaining boost::bind with std's 2014-08-09 15:14:31 +03:00
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
731aedf3a1 Split CIntObjectClasses into multiple smaller files. This should be the last change in files 2014-07-15 10:14:49 +03:00
74d3effa98 More safe way of update locking 2014-07-03 22:30:56 +04:00
9b8ad51cd3 Run all rendering with pim lock if possible 2014-07-03 22:05:59 +04:00
ac2896da42 Implemented SDL2 unicode input. Hotkeys are sill broken. 2014-06-13 07:55:42 +04:00
30bcec42c6 - Renamed client/BattleInterface to client/battle and client/UIFramework to client/gui 2013-04-07 11:52:07 +00:00