Skip to content

enlarge ui and add suggestions #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Abab-bk
Copy link

@Abab-bk Abab-bk commented Apr 21, 2024

enlarge ui and add suggestions.
edit: add paused when open console.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be removed if the project works properly.


LoadCommands();

Print("[SofiaConsole] Version 1.2.0", PrintType.Success);
Space();

GD.Print("[SofiaConsole] Done");

// _commandInput.TextChanged += _ => UpdateUi();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed if unused.

@@ -65,20 +75,56 @@ public override void _Input(InputEvent @event)
}

// Press Up to toggle between previous commands
if (eventKey.Keycode == Key.Up && _commandInput.HasFocus() && _commandHistory.Count > 0)
// TODO
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed if unused.

{
historyIndex = _commandHistory.Count;
// _commandInput.Text = _suggestions[_currentSuggestionIndex];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed if unused.


if (_currentSuggestionIndex >= 0 && _suggestions.Count > 0 && _currentSuggestionIndex < _suggestions.Count && _suggestions[_currentSuggestionIndex] == text)
{
newLabel.AddThemeStyleboxOverride("normal", GD.Load<StyleBoxFlat>("res://addons/sofiaconsole/StyleBox.tres"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably give this asset a proper name, StyleBox does not indicate what it is used for.

@Abab-bk
Copy link
Author

Abab-bk commented Apr 22, 2024

@LauraWebdev
Updated, check plz.
I have reworked the messy UpdateUi() method and now it has become much better.
If there are any shortcomings, please point them out as I am a beginner in C#.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants