Skip to content

Commit

Permalink
Merge pull request #3877 from WarpABoi/textbox-cursor
Browse files Browse the repository at this point in the history
add textbox cursor controlled by arrow keys
  • Loading branch information
Swan committed Aug 26, 2023
2 parents 2289748 + caa8452 commit 5186bb1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public DownloadFilterTextbox(WobbleFontStore font, int fontSize, string initialT
: base(new ScalableVector2(122, 32), font, fontSize, initialText, placeHolderText, onSubmit, onStoppedTyping)
{
AllowSubmission = false;
AllowCursorMovement = false;

Tint = ColorHelper.HexToColor("#2F2F2F");
AddBorder(ColorHelper.HexToColor("#5B5B5B"), 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ private void CreateMode()
/// </summary>
private void CreateSearchBar()
{
SearchBox = new DownloadSearchBox(SearchQuery, new ScalableVector2(280, 40));
SearchBox = new DownloadSearchBox(SearchQuery, new ScalableVector2(280, 40))
{
AllowCursorMovement = false
};
RightItems.Add(SearchBox);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ private void CreateSearchBox()
SearchBox = new FilterPanelSearchBox(CurrentSearchQuery, AvailableMapsets, IsPlayTesting, ActiveLeftPanel,
"Type to search...")
{
Parent = this
Parent = this,
AllowCursorMovement = false,
};

RightItems.Add(SearchBox);
Expand Down
2 changes: 1 addition & 1 deletion Wobble

0 comments on commit 5186bb1

Please sign in to comment.