skyline icon indicating copy to clipboard operation
skyline copied to clipboard

Add OSC opacity adjustment

Open KikiManjaro opened this issue 3 years ago • 12 comments

Related to #1580

It is my first contribution ever to this project, I was thinking it was a good one to start, Tell me if i made any mistake 😊

KikiManjaro avatar Jul 31 '22 15:07 KikiManjaro

Hi there! Do you have a screenshot of this?

bylaws avatar Jul 31 '22 15:07 bylaws

The contribution looks fine (good job!) but I'd recommend rebasing the commit atop ftx1 rather than master and following our naming convention for commits a bit more closely, a better name might be "Add OSC opacity adjustment".

I'd also recommend joining our Discord server, that's generally where we coordinate development.

PixelyIon avatar Jul 31 '22 15:07 PixelyIon

Thanks :)

I'm already on the discord server by the way, i'll spend more time on it next time Are branch's rules written somewhere ? I'did not find anything about that, is ftx1 the still in dev branch ?

KikiManjaro avatar Jul 31 '22 16:07 KikiManjaro

Basically GPU is awkward and it kinda introduced so much code that's constantly in flux and not up to master quality we haven't merged it, but issue is ftx1 is now miles ahead master so we're just gonna do all prs to that, then when we CR ftx1 we'll just ignore these changes

bylaws avatar Jul 31 '22 17:07 bylaws

The contribution looks fine (good job!) but I'd recommend rebasing the commit atop ftx1 rather than master and following our naming convention for commits a bit more closely, a better name might be "Add OSC opacity adjustment".

I'd also recommend joining our Discord server, that's generally where we coordinate development.

I've just rebase from ftx1, hope i didn't make any mistake :)

KikiManjaro avatar Jul 31 '22 20:07 KikiManjaro

You did what was asked in the literal sense, but it wasn't the result you were meant to have.

git remote add upstream [email protected]:skyline-emu/skyline.git -f (skip this step if already using "upstream" or replace "upstream" with the remote name for THIS official repository below)

git reset --hard upstream/ftx1 git cherry-pick 0286ece7e332d3e0512fe9f035535254a70f0a1b git push -f

If you use that series of commands, it will reset the branch to match ftx1, pick your change onto it, and push the fixed branch to your remote (also fixing the PR)

AbandonedCart avatar Aug 01 '22 03:08 AbandonedCart

Oooh ok my bad, it should be ok right now

KikiManjaro avatar Aug 01 '22 18:08 KikiManjaro

A couple of things more:

  • Alpha should be applied on the button's text too
  • You still didn't fix the commit title, just removing the [OSC] part is good

In fact it is already applied to text since alpha is changed in renderCenteredText of OnScreenButton.kt

Exemple of text being opacified

Screenshot_2022-08-07-16-14-26-521_skyline emu

KikiManjaro avatar Aug 07 '22 14:08 KikiManjaro

If you write "fix or fixes" #0000 instead of related it will link and close the issue when the PR is merged.

marcoluc97 avatar Aug 07 '22 16:08 marcoluc97

Oh my bad then, I looked at #1754 screnshots and it looked like it didn't apply opacity to text.

nickbeth avatar Aug 07 '22 17:08 nickbeth

Looking good now!

Yeah thats way better :) really like this reviews i'm learning new things

KikiManjaro avatar Aug 09 '22 15:08 KikiManjaro

LGTM, good job!

Thanks :D

KikiManjaro avatar Aug 09 '22 17:08 KikiManjaro

@lynxnb Feel free to rebase this PR if it's good to go. I'm leaving these OSC PRs to you.

PixelyIon avatar Aug 16 '22 10:08 PixelyIon

//emu.skyline.input.onscreen.OnScreenControllerView
    fun resetControls() {
        controls.allButtons.forEach {
            it.resetRelativeValues()
            it.config.enabled = true
        }
        controls.globalScale = 1.15f
        controls.alpha = 255 //you probably forgot to reset the alpha here
        invalidate()
    }

@KikiManjaro @lynxnb

android-1995 avatar Aug 29 '22 01:08 android-1995

You are actually right, thanks!

nickbeth avatar Aug 29 '22 13:08 nickbeth

Oups, i did not see that, maybe i could make the change in #1754 ? @lynxnb

KikiManjaro avatar Aug 29 '22 21:08 KikiManjaro

Yes, go ahead and add a commit to address this there.

nickbeth avatar Aug 29 '22 21:08 nickbeth