1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Replaced CIntObject::type bitfield with bool's. Added input blocking.

This commit is contained in:
Ivan Savenko
2023-07-03 19:24:12 +03:00
parent 48eb8ab54f
commit 8b61c0d59b
20 changed files with 77 additions and 54 deletions

View File

@@ -47,7 +47,7 @@ void CLabel::showAll(Canvas & to)
CLabel::CLabel(int x, int y, EFonts Font, ETextAlignment Align, const SDL_Color & Color, const std::string & Text)
: CTextContainer(Align, Font, Color), text(Text)
{
type |= REDRAW_PARENT;
setRedrawParent(true);
autoRedraw = true;
pos.x += x;
pos.y += y;
@@ -299,7 +299,7 @@ CTextBox::CTextBox(std::string Text, const Rect & rect, int SliderStyle, EFonts
OBJECT_CONSTRUCTION_CAPTURING(255 - DISPOSE);
label = std::make_shared<CMultiLineLabel>(rect, Font, Align, Color);
type |= REDRAW_PARENT;
setRedrawParent(true);
pos.x += rect.x;
pos.y += rect.y;
pos.h = rect.h;
@@ -492,7 +492,7 @@ CTextInput::CTextInput(const Rect & Pos, EFonts font, const CFunctionList<void(c
cb(CB),
CFocusable(std::make_shared<CKeyboardFocusListener>(this))
{
type |= REDRAW_PARENT;
setRedrawParent(true);
pos.h = Pos.h;
pos.w = Pos.w;
captureAllKeys = true;