Skip to content
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

feat: UI optimization #48

Merged
merged 2 commits into from
Apr 20, 2024
Merged

Conversation

Alex-DMC
Copy link

@Alex-DMC Alex-DMC commented Apr 8, 2024

  1. Select the displayed name for the beautification process;
  2. UI optimization: unable to scroll to the bottom;
pull_2

1. Select the displayed name for the beautification process;
2. UI optimization: unable to scroll to the bottom;
1. Loop to lock values (5s), very useful for certain consumption items.
@Alex-DMC Alex-DMC changed the title Update index.tsx feat: UI optimization Apr 8, 2024
@HeyItsWaters
Copy link
Collaborator

HeyItsWaters commented Apr 17, 2024

@Alex-DMC These are great changes, thank you!

I finally got a chance to sit down and test these. At first glance they look really good, the only issue I have is that it looks like every time the "timer" activates, there's an audible "ding" noise ever 5 seconds. I barely noticed it, but if I toggle the lock off, the dinging goes away.

I'm looking into if there's a way to silence it.

@HeyItsWaters
Copy link
Collaborator

AH, the setValue() function literally has a playSound function in the first line.

I think if we change the setValue function to something like this:
const setValue = async (address: string, match_index: number, silence: boolean = false) => {

And then wrap the playSound in a silence check:

    if ( !silence ) {
      playSound("https://steamloopback.host/sounds/deck_ui_default_activation.wav");
    }

And update your code to include a "true" parameter, it should disable that activation sound every 5 seconds...

  const onAutoChange = async () => {
    if (locked) onCancelAutoChange();
    else {
      setValue("0x00000", 999, true);
      const timer: any = setInterval(() => {
        setValue("0x00000", 999, true);
      }, 5000);
      setLocked(timer);
    }
  }

HeyItsWaters
HeyItsWaters previously approved these changes Apr 17, 2024
Copy link
Collaborator

@HeyItsWaters HeyItsWaters left a comment

Choose a reason for hiding this comment

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

i tested this with a couple of games and it looks good.

the main reason i never cleaned up the process list was because folks seem to be using this plugin for non-steam games as well (but launching through steam), and it gets weird. i think your proposed changes should still be fine in those cases though.

@HeyItsWaters HeyItsWaters self-requested a review April 17, 2024 02:27
@HeyItsWaters HeyItsWaters dismissed their stale review April 17, 2024 02:27

accidentally clicked review/approve

@HeyItsWaters HeyItsWaters added enhancement New feature or request question Further information is requested labels Apr 17, 2024
@HeyItsWaters
Copy link
Collaborator

okay i'm done reviewing this. i think if you make those slight adjustments i mentioned, i'm good with merging this.

sorry for all the notifications!

@HeyItsWaters HeyItsWaters changed the base branch from main to ui-updates April 20, 2024 02:01
@HeyItsWaters HeyItsWaters merged commit 878f5eb into CameronRedmore:ui-updates Apr 20, 2024
@HeyItsWaters
Copy link
Collaborator

This resolves issue #22

@Alex-DMC
Copy link
Author

@Alex-DMC These a great changes, thank you!

I finally got a chance to sit down and test these. At first glance they look really good, the only issue I have is that it looks like every time the "timer" activates, there's an audible "ding" noise ever 5 seconds. I barely noticed it, but if I toggle the lock off, the dinging goes away.

I'm looking into if there's a way to silence it.

LOL

Yes, To verify that the function is running properly, I kept a prompt sound.
Because I found that if running in the background for a long time, the process will be killed by Steam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants