diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-25 22:01:01 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 14:01:01 +0100 |
commit | 045ca00486e62c89a4da5f880f6f52016e4dd14a (patch) | |
tree | f77f40fbaed328b0d6b54a98adb49d7dd9b38229 /src/main/kotlin/cc/polyfrost | |
parent | 8a01f36d1021159f2c49ae8083febc046a4a8502 (diff) | |
download | OneConfig-045ca00486e62c89a4da5f880f6f52016e4dd14a.tar.gz OneConfig-045ca00486e62c89a4da5f880f6f52016e4dd14a.tar.bz2 OneConfig-045ca00486e62c89a4da5f880f6f52016e4dd14a.zip |
fix: stop using internal asset classes everywhere (#69)
* fix: stop using internal asset classes everywhere
new: add wrapper classes for NanoVG rendering and rename original Image wrapper to OneImage
* I love regex
Co-authored-by: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>
Diffstat (limited to 'src/main/kotlin/cc/polyfrost')
-rw-r--r-- | src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/RenderManagerDSL.kt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/RenderManagerDSL.kt b/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/RenderManagerDSL.kt index 21c33f0..2665c7f 100644 --- a/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/RenderManagerDSL.kt +++ b/src/main/kotlin/cc/polyfrost/oneconfig/utils/dsl/RenderManagerDSL.kt @@ -3,8 +3,8 @@ package cc.polyfrost.oneconfig.utils.dsl import cc.polyfrost.oneconfig.config.data.InfoType import cc.polyfrost.oneconfig.renderer.RenderManager import cc.polyfrost.oneconfig.renderer.font.Font -import cc.polyfrost.oneconfig.internal.assets.Images -import cc.polyfrost.oneconfig.internal.assets.SVGs +import cc.polyfrost.oneconfig.renderer.Image +import cc.polyfrost.oneconfig.renderer.SVG import cc.polyfrost.oneconfig.utils.color.ColorUtils import org.lwjgl.nanovg.NVGColor @@ -161,16 +161,16 @@ fun Long.drawImage(filePath: String, x: Number, y: Number, width: Number, height fun VG.drawImage(filePath: String, x: Number, y: Number, width: Number, height: Number, color: Int) = instance.drawImage(filePath, x, y, width, height, color) -fun Long.drawImage(image: Images, x: Number, y: Number, width: Number, height: Number) = +fun Long.drawImage(image: Image, x: Number, y: Number, width: Number, height: Number) = RenderManager.drawImage(this, image, x.toFloat(), y.toFloat(), width.toFloat(), height.toFloat()) -fun VG.drawImage(image: Images, x: Number, y: Number, width: Number, height: Number) = +fun VG.drawImage(image: Image, x: Number, y: Number, width: Number, height: Number) = instance.drawImage(image, x, y, width, height) -fun Long.drawImage(image: Images, x: Number, y: Number, width: Number, height: Number, color: Int) = +fun Long.drawImage(image: Image, x: Number, y: Number, width: Number, height: Number, color: Int) = RenderManager.drawImage(this, image, x.toFloat(), y.toFloat(), width.toFloat(), height.toFloat(), color) -fun VG.drawImage(image: Images, x: Number, y: Number, width: Number, height: Number, color: Int) = +fun VG.drawImage(image: Image, x: Number, y: Number, width: Number, height: Number, color: Int) = instance.drawImage(image, x, y, width, height, color) @@ -182,12 +182,12 @@ fun Long.drawRoundedImage(filePath: String, x: Number, y: Number, width: Number, fun VG.drawRoundedImage(filePath: String, x: Number, y: Number, width: Number, height: Number, radius: Number) = instance.drawRoundedImage(filePath, x, y, width, height, radius) -fun Long.drawRoundedImage(image: Images, x: Number, y: Number, width: Number, height: Number, radius: Number) = +fun Long.drawRoundedImage(image: Image, x: Number, y: Number, width: Number, height: Number, radius: Number) = RenderManager.drawRoundImage( this, image, x.toFloat(), y.toFloat(), width.toFloat(), height.toFloat(), radius.toFloat() ) -fun VG.drawRoundedImage(image: Images, x: Number, y: Number, width: Number, height: Number, radius: Number) = +fun VG.drawRoundedImage(image: Image, x: Number, y: Number, width: Number, height: Number, radius: Number) = instance.drawRoundedImage(image, x, y, width, height, radius) @@ -248,16 +248,16 @@ fun Long.drawSVG(filePath: String, x: Number, y: Number, width: Number, height: fun VG.drawSVG(filePath: String, x: Number, y: Number, width: Number, height: Number, color: Int) = instance.drawSVG(filePath, x, y, width, height, color) -fun Long.drawSVG(svg: SVGs, x: Number, y: Number, width: Number, height: Number) = +fun Long.drawSVG(svg: SVG, x: Number, y: Number, width: Number, height: Number) = RenderManager.drawSvg(this, svg, x.toFloat(), y.toFloat(), width.toFloat(), height.toFloat()) -fun VG.drawSVG(svg: SVGs, x: Number, y: Number, width: Number, height: Number) = +fun VG.drawSVG(svg: SVG, x: Number, y: Number, width: Number, height: Number) = instance.drawSVG(svg, x, y, width, height) -fun Long.drawSVG(svg: SVGs, x: Number, y: Number, width: Number, height: Number, color: Int) = +fun Long.drawSVG(svg: SVG, x: Number, y: Number, width: Number, height: Number, color: Int) = RenderManager.drawSvg(this, svg, x.toFloat(), y.toFloat(), width.toFloat(), height.toFloat(), color) -fun VG.drawSVG(svg: SVGs, x: Number, y: Number, width: Number, height: Number, color: Int) = +fun VG.drawSVG(svg: SVG, x: Number, y: Number, width: Number, height: Number, color: Int) = instance.drawSVG(svg, x, y, width, height, color) |