CameronRedmore / memory-deck

A Decky Loader plugin that allows scanning and editing of memory values.
GNU General Public License v3.0
38 stars 11 forks source link

feat: UI optimization #48

Closed Alex-DMC closed 6 months ago

Alex-DMC commented 6 months ago
  1. Select the displayed name for the beautification process;
  2. UI optimization: unable to scroll to the bottom;
pull_2
HeyItsWaters commented 6 months ago

@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 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

This resolves issue #22

Alex-DMC commented 6 months ago

@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.