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

Fixing guidebook not resizable from left and right #5618

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

Conversation

PROG-MohamedDwidar
Copy link

@PROG-MohamedDwidar PROG-MohamedDwidar commented Jan 18, 2025

issue 34504 in space-wizards/space-station-14 needs this fix

It happens that the value DragMode.Move prevents the switch case from catching left and right because the code in ss14 looks like this

var mode = DragMode.Move; ##note that removing this line from ss14 will leave the window unmovable##

if (Resizable)
{
    if (relativeMousePos.Y < DRAG_MARGIN_SIZE)
    {
        mode = DragMode.Top;
    }
    else if (relativeMousePos.Y > Size.Y - DRAG_MARGIN_SIZE)
    {
        mode = DragMode.Bottom;
    }

    if (relativeMousePos.X < DRAG_MARGIN_SIZE)
    {
        mode |= DragMode.Left;
    }
    else if (relativeMousePos.X > Size.X - DRAG_MARGIN_SIZE)
    {
        mode |= DragMode.Right;
    }
}

return mode;

so basically the equal sign removes the Move value in every other case leaving the guidebook window cursor not changing on left and right and here is a video of working solution

https://drive.google.com/file/d/1UTgJGoV_96P2-TyJa1No1gHP9FXIL7Kd/view?usp=sharing

and i also fixed the corresponding code on ss14 repo and will make another pull request there

issue 34504 in space-wizards/space-station-14 needs this fix
@lzk228
Copy link
Contributor

lzk228 commented Jan 18, 2025

i also discovered that silicon laws menu also couldn't be resized on sides
can you add it to this pr so i shouldn't create a new issue?

@lzk228
Copy link
Contributor

lzk228 commented Jan 18, 2025

oh wait, this change should apply to all windows, sorry

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