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

Search box improvements #3576

Merged
merged 7 commits into from Jul 8, 2018

Conversation

Projects
None yet
4 participants
@fscan
Member

fscan commented Jun 29, 2018

When the search box has the focus, tell forge to not send any other events.
Pressing TAB toggles the focus.
Improve visual indication if box is focused or not.

@Override
public void drawSelectionBox( int startX, int startY, int endX, int endY )
{
if( !this.isFocused() )

This comment has been minimized.

@orod-org

orod-org Jun 29, 2018

MINOR Missing curly brace. rule

@@ -43,6 +43,7 @@
private final int _yPos;
private final int _width;
private final int _height;
private final int _fontPad;

This comment has been minimized.

@orod-org

orod-org Jun 29, 2018

MINOR Rename this field "_fontPad" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

@fscan fscan changed the title from Dont send events when terminal searchbox has handled it to Search box improvements Jun 29, 2018

@yueh yueh added this to the rv6.alpha - 1.12 milestone Jul 1, 2018

@fscan fscan force-pushed the fix-searchbox branch from e39914e to f1dc053 Jul 4, 2018

@@ -290,8 +295,10 @@ public void initGui()
offset += 20;
this.buttonList.add(
this.searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance().getConfigManager().getSetting(
Settings.SEARCH_MODE ) ) );
this.searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance()

This comment has been minimized.

@orod-org

orod-org Jul 7, 2018

MAJOR Extract the assignment out of this expression. rule

@@ -470,18 +478,40 @@ protected void repositionSlot( final AppEngSlot s )
@Override
protected void keyTyped( final char character, final int key ) throws IOException

This comment has been minimized.

@orod-org

orod-org Jul 7, 2018

CRITICAL The Cyclomatic Complexity of this method "keyTyped" is 12 which is greater than 10 authorized. rule

@orod-org

This comment has been minimized.

orod-org commented Jul 7, 2018

SonarQube analysis reported 13 issues

  • CRITICAL 4 critical
  • MAJOR 7 major
  • MINOR 2 minor

Watch the comments in this conversation to review them.

9 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL GuiMEMonitorable.java#L336: Make the enclosing method "static" or remove this set. rule
  2. CRITICAL GuiMEMonitorable.java#L366: Make the enclosing method "static" or remove this set. rule
  3. CRITICAL GuiMEMonitorable.java#L367: Make the enclosing method "static" or remove this set. rule
  4. MAJOR GuiMEMonitorable.java#L282: Extract the assignment out of this expression. rule
  5. MAJOR GuiMEMonitorable.java#L289: Extract the assignment out of this expression. rule
  6. MAJOR GuiMEMonitorable.java#L293: Extract the assignment out of this expression. rule
  7. MAJOR GuiMEMonitorable.java#L307: Extract the assignment out of this expression. rule
  8. MAJOR GuiMEMonitorable.java#L321: Extract the assignment out of this expression. rule
  9. MAJOR GuiMEMonitorable.java#L355: Merge this if statement with the enclosing one. rule

@fscan fscan merged commit bde76d1 into rv6-1.12 Jul 8, 2018

3 of 4 checks passed

sonarqube SonarQube reported 13 issues, with 4 critical
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jenkins Success
Details

@fscan fscan deleted the fix-searchbox branch Jul 14, 2018

@pkmnfrk

This comment has been minimized.

pkmnfrk commented Jul 22, 2018

Can this be disabled or configured in any way? I use tab as my inventory key...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment