Add dropdowns and a popup color picker
Popup draws one element above the rest of the screen and gets mouse events first; clicking or scrolling outside closes it. ElementContext now carries each element's position on screen so an input inside a scroll can open a popup beside itself. Select is a dropdown: the current value opens an OptionList with the current option ticked, scrolling for long lists and opening upward when there's no room below. The color picker moved out of ColorInput into a ColorPicker popup, so scroll areas no longer clip it and later rows no longer draw over it, and all three of its parts can be dragged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -41,7 +41,9 @@ public class AnimationStagger extends Element {
|
||||
public void render(RenderScope renderScope, ElementContext ctx) {
|
||||
ElementRenderer.render(children, ctx.elapsed, renderScope,
|
||||
ctx.mouseX,
|
||||
ctx.mouseY);
|
||||
ctx.mouseY,
|
||||
ctx.originX,
|
||||
ctx.originY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -80,7 +80,9 @@ public class Scroll extends Element {
|
||||
|
||||
ElementRenderer.render(children, ctx.elapsed, renderScope,
|
||||
ctx.mouseX - padding,
|
||||
ctx.mouseY - padding + offset);
|
||||
ctx.mouseY - padding + offset,
|
||||
ctx.originX + padding,
|
||||
ctx.originY + padding - offset);
|
||||
|
||||
renderScope.getMatrixStack().pop();
|
||||
renderScope.disableScissor();
|
||||
|
||||
Reference in New Issue
Block a user