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

Resize the debug watch window whenever something gets added / removed #3251

Merged
merged 5 commits into from
Sep 24, 2024

Conversation

ninjamuffin99
Copy link
Member

@ninjamuffin99 ninjamuffin99 commented Sep 16, 2024

The debugger Watch window would overflow the contents and show offscreen until the user clicks+drags the window around (which then automatically resizes it properly)

This PR makes it so that whenever something is added to the watch window, it will resize itself.

Using FNF (apologies for the .mov files!)
Before

Screen.Recording.2024-09-16.at.6.29.53.PM.mov

After

Screen.Recording.2024-09-16.at.6.32.52.PM.mov

@Geokureli
Copy link
Member

Geokureli commented Sep 17, 2024

I was ready to merge this but, ngl, these seg faults on unit tests are worrying me, dev branch doesn't have this issue, so it's possibly a related to the change

Edit: confirmed, happens on hl tests locally, too:

Class: flixel.system.frontEnds.CameraFrontEndTest .Uncaught exception: Null access
Called from flixel.system.debug.watch.Watch.updateSize(flixel/system/debug/watch/Watch.hx:129)
Called from flixel.system.debug.watch.Watch.removeAll(flixel/system/debug/watch/Watch.hx:117)
Called from flixel.util._FlxSignal.FlxSignal0.dispatch0(flixel/util/FlxSignal.hx:297)
Called from flixel.FlxGame.switchState(flixel/FlxGame.hx:617)
Called from flixel.FlxGame.update(flixel/FlxGame.hx:727)
Called from flixel.FlxGame.step(flixel/FlxGame.hx:680)
Called from FlxTest.step(FlxTest.hx:39)
Called from FlxTest.resetGame(FlxTest.hx:49)
Called from FlxTest.after(FlxTest.hx:31)
Called from $Reflect.callMethod(/usr/local/lib/haxe/std/hl/_std/Reflect.hx:83)
Called from massive.munit.TestRunner.executeTestCases(massive/munit/TestRunner.hx:278)
Called from massive.munit.TestRunner.execute(massive/munit/TestRunner.hx:227)
Called from massive.munit.TestRunner.~run.1(massive/munit/TestRunner.hx:200)
Called from sys.thread._Thread.$HaxeThread.~create.0(/usr/local/lib/haxe/std/hl/_std/sys/thread/Thread.hx:152)

@Geokureli
Copy link
Member

gonna merge later today, lmk if you have issues which my changes, otherwise we can fix in post

@ninjamuffin99
Copy link
Member Author

here was the demo WITHOUT reposition(), as I add more things to the watch window, it doesn't move up until I begin dragging the window with my mouse

noreposition.mp4

this one is WITH reposition(), as I add things to it, it will move itself up when it would otherwise potentially become offscreen.

withreposition.mp4

@Geokureli
Copy link
Member

maybe it's becuase i tested on html5, but i saw no difference. will try again, what target is that?

@Geokureli
Copy link
Member

Yup, my mistake, added back

@Geokureli Geokureli merged commit a7b8d9c into dev Sep 24, 2024
21 checks passed
@Geokureli
Copy link
Member

Thanks!

@Geokureli Geokureli deleted the watch-window-resize branch September 24, 2024 18:20
@ninjamuffin99
Copy link
Member Author

ninjamuffin99 commented Sep 24, 2024 via email

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