Skip to content

Commit

Permalink
Added default minimum size for text field
Browse files Browse the repository at this point in the history
  • Loading branch information
Neko-Box-Coder committed May 25, 2023
1 parent ab2f540 commit 86bb08d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Include/ssGUI/GUIObjectClasses/TextField.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace ssGUI
ArrowNavInterval(20)
{
SetBlockInput(true);
SetMinSize(glm::vec2(35, 35));
SetBackgroundColor(glm::ivec4(127, 127, 127, 255));
AddExtension<ssGUI::Extensions::RoundedCorners>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ void SetUp()
TestTextField->SetSize(glm::vec2(200, 200));

assert(TestTextField->GetType() == (ssGUI::Enums::GUIObjectType::WIDGET | ssGUI::Enums::GUIObjectType::TEXT | ssGUI::Enums::GUIObjectType::TEXT_FIELD));
TestTextField->Clone(true)->SetPosition(glm::vec2(250, 250));
auto* clone = TestTextField->Clone(true);
clone->SetPosition(glm::vec2(250, 250));
clone->SetSize(glm::vec2(200, 35));
}

void CleanUp()
Expand Down
1 change: 1 addition & 0 deletions Src/ssGUI/GUIObjectClasses/TextField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,7 @@ namespace ssGUI
ArrowNavInterval(20)
{
SetBlockInput(true);
SetMinSize(glm::vec2(35, 35));
SetTextAlignment(ssGUI::Enums::AlignmentHorizontal::LEFT, ssGUI::Enums::AlignmentVertical::TOP);

SetBackgroundColor(glm::ivec4(127, 127, 127, 255));
Expand Down

0 comments on commit 86bb08d

Please sign in to comment.