-
Notifications
You must be signed in to change notification settings - Fork 30
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
Upgrade inspector with new capabilities and detached window mode. #86
Open
Sk1er
wants to merge
60
commits into
master
Choose a base branch
from
feature/inspector_improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
1fcdef0
Components: Replace direct calls to UResolution with ResolutionManage…
Sk1er 7e8301a
Components: Replace direct calls to UMouse with MousePositionManager …
Sk1er 02b582c
Components: Replace direct calls to UKeyboard with KeyboardManager to…
Sk1er 012beb2
AspectConstraint: Use state to track value
Sk1er 8e27b32
ChildBasedConstraint: Use state to track padding
Sk1er bb8f2ed
StateRegistry: Create state registry for providing additional informa…
Sk1er 893c315
Debug: Allow setting of elementa debug at runtime without requiring t…
Sk1er 3f64066
Inspector: Upgrade inspector with new capabilities and detached windo…
Sk1er 0c240f3
Platform: Create `runOnMinecraftThread` function
Sk1er 7a07184
Inspector: Move external display logic into main project
Sk1er 5690908
Inspector: Delete InspectorManager and manage inspector window inside…
Sk1er 310d21c
Window: Set currentWindow inside try block and unset in finally
Sk1er c0ed8bf
API: Temporarily remove deprecation on guiHint and roundToRealPixels
Sk1er 5ec4812
ScissorEffect: Remove mutability of unroundedScissorBounds and rounde…
Sk1er 01f154f
Extensions: Remove unnecessary this from *Manager utility properties
Sk1er a2af9c3
KeyboardManager: Remove overloads that do not use the argument
Sk1er b271326
KeyboardManager: Adjust code style of isCtrlKeyDown
Sk1er 9f558ad
StateRegistry: Import inspector and cleanup comments
Sk1er 992bb3c
StateRegistry: Migrate managedStates to property
Sk1er 3251bfc
StateRegistry: Rename ManagedColorStateNullable to ManagedNullableCol…
Sk1er 6e9ed17
StateRegistry: Rename managed state objects to avoid repetitive `Mana…
Sk1er 4f140c7
StateRegistry: Remove InspectorDisplay interface and require a displa…
Sk1er e8b3232
StateRegistry: Rename OfObject to OfEnumerable for increased clarity
Sk1er e4f59a6
RainbowColorConstraint: Map constructor states to self to create muta…
Sk1er 9b43b46
RelativeWindowConstraint: Map constructor states to self to create mu…
Sk1er 162dca0
RoundingConstraint: Map constructor states to self to create mutable …
Sk1er b6230d8
ScaledTextConstraint: Map constructor states to self to create mutabl…
Sk1er c8e7628
SiblingConstraint: Map constructor states to self to create mutable copy
Sk1er 1d3a98b
ColumnPositionConstraint: Add documentation and improve variable names
Sk1er ee8bb8d
ColumnPositionConstraint: Return no horizontal padding if the compone…
Sk1er 6540bc6
ColumnPositionConstraint: DRY component.parent
Sk1er 8aee863
ConstraintResolutionGui: Revert now unnecessary constructor changes
Sk1er 3738cda
Inspector: Toggle hotkeys in inspector with F12
Sk1er 3d82fc9
Inspector: Reset Elementa debug state in finally block
Sk1er 8d13007
Inspector: Move ensureLastComponent call to animationFrame
Sk1er 14c9285
Inspector: Rename WindowDrawObserver to WindowOverlay
Sk1er 6b173f5
Inspector: Fix balanced before/after draw call if component is not mo…
Sk1er 35dbd0e
Inspector: Toggle measuring distance with M instead of dedicated off key
Sk1er e08ca3a
Inspector: Round distance measurement rendering to real pixels
Sk1er cb0cf09
Inspector: DRY
Sk1er 84b9714
Inspector: DRY distance drawing text
Sk1er 69a7f19
Inspector: Cleanup distance measurement format
Sk1er 900ef47
MappedTextInput: Rename to StateTextInput
Sk1er 17b05ff
StateTextInput: Clone from Essential
Sk1er cc0d78d
StateRegistry: Update use of StateTextInput
Sk1er 6bb1042
FrameBufferedWindow: Import platform instead of declaring as property
Sk1er 74273d4
FrameBufferedWindow: Rename parameter for increased clarity
Sk1er c327dd2
FrameBufferedWindow: Rename renderDirect to renderFrameBufferTexture
Sk1er da79f0e
FrameBufferedWindow: Simplify render method
Sk1er ee2d861
FrameBufferedWindow: DRY
Sk1er a86df75
StateRegistry: Handle parsing of null color case
Sk1er 65dea1d
StateRegistry: DRY
Sk1er dc71b4c
StateRegistry: Display and allow editing of oppacity byte of color
Sk1er 9f18e2b
Extensions: Remove State<String>.empty
Sk1er 420031b
Extensions: Use mousePositionManger in hoveredState
Sk1er 84482b0
Extensions: Add isInComponentTree
Sk1er c499f13
Extensions: Check if component is in component tree before performing…
Sk1er 92af06d
AwtMousePositionManager: Update mouse position from events to avoid q…
Sk1er 7ed0e6e
Build: Update ABI
Sk1er 6706faf
Merge branch 'master' into feature/inspector_improvements
Sk1er File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import gg.essential.elementa.UIComponent | |
import gg.essential.elementa.constraints.resolution.ConstraintResolutionGui | ||
import gg.essential.elementa.constraints.resolution.ConstraintResolver | ||
import gg.essential.elementa.constraints.resolution.ConstraintResolverV2 | ||
import gg.essential.elementa.debug.InspectorManager | ||
import gg.essential.elementa.effects.ScissorEffect | ||
import gg.essential.elementa.font.FontRenderer | ||
import gg.essential.elementa.impl.Platform.Companion.platform | ||
|
@@ -17,6 +18,7 @@ import gg.essential.elementa.manager.ResolutionManager | |
import gg.essential.elementa.utils.elementaDev | ||
import gg.essential.elementa.utils.requireMainThread | ||
import gg.essential.universal.* | ||
import org.jetbrains.annotations.ApiStatus | ||
import org.lwjgl.opengl.GL11 | ||
import java.util.concurrent.ConcurrentLinkedQueue | ||
import java.util.concurrent.TimeUnit | ||
|
@@ -46,9 +48,12 @@ class Window @JvmOverloads constructor( | |
/** | ||
* State managers to avoid global states | ||
*/ | ||
internal var resolutionManager: ResolutionManager = DefaultResolutionManager | ||
internal var mousePositionManager: MousePositionManager = DefaultMousePositionManager | ||
internal var keyboardManager: KeyboardManager = DefaultKeyboardManager | ||
@ApiStatus.Internal | ||
var resolutionManager: ResolutionManager = DefaultResolutionManager | ||
@ApiStatus.Internal | ||
var mousePositionManager: MousePositionManager = DefaultMousePositionManager | ||
@ApiStatus.Internal | ||
var keyboardManager: KeyboardManager = DefaultKeyboardManager | ||
|
||
@Deprecated("Add ElementaVersion as the first argument to opt-in to improved behavior.") | ||
@JvmOverloads | ||
|
@@ -152,6 +157,7 @@ class Window @JvmOverloads constructor( | |
} | ||
} | ||
currentWindow.set(null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This must be in a |
||
InspectorManager.onDraw(this) | ||
} | ||
|
||
internal fun drawEmbedded(matrixStack: UMatrixStack) { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's nice, but it doesn't really belong in this commit. Please keep at it with trying to separate unrelated things into separate commits. The first few commits were great, but this one has a bunch of stuff that really should have been separate. This doesn't even really belong in this PR.