Pryme8
February 22, 2024, 7:10pm
1
Was looking at adding a CornerRadius to the scrollbar. It would be nice for certain styled elements. Would this be something others would like?
Was thinking just duplicate the behavior for drawing a _drawRoundedRect from the Rectangle class and making sure the ScrollBar has all the supporting properties for it.
import type { Vector2 } from "core/Maths/math.vector";
import { BaseSlider } from "./baseSlider";
import type { Control } from "../control";
import { Measure } from "../../measure";
import type { PointerInfoBase } from "core/Events/pointerEvents";
import { serialize } from "core/Misc/decorators";
import type { ICanvasRenderingContext } from "core/Engines/ICanvas";
import type { Nullable } from "core/types";
import type { BaseGradient } from "../gradient/BaseGradient";
import type { AdvancedDynamicTexture } from "gui/2D/advancedDynamicTexture";
import { Tools } from "core/Misc/tools";
import { RegisterClass } from "core/Misc/typeStore";
/**
* Class used to create slider controls
*/
export class ScrollBar extends BaseSlider {
private _background = "black";
private _borderColor = "white";
private _tempMeasure = new Measure(0, 0, 0, 0);
This file has been truncated. show original
sebavan
February 27, 2024, 10:13pm
2
Do you want to make a PR for it ?
Pryme8
February 29, 2024, 6:07pm
3
For sure, will do when I get some free time!