From 7bc262cbfa173fb0a31fb58d6f1d55fa0cac3b08 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 4 Feb 2023 18:39:59 +0900 Subject: - cursors - move guiv2 to launcher - add force letsencrypt support (without modifying keystore directly) ^ very cool Signed-off-by: syeyoung --- .../dungeons_guide_loader/cursors/IBeamCursor.cur | Bin 0 -> 8774 bytes .../dungeons_guide_loader/cursors/arrowCursor.cur | Bin 0 -> 136606 bytes .../cursors/closedHandCursor.cur | Bin 0 -> 136606 bytes .../cursors/crosshairCursor.cur | Bin 0 -> 8774 bytes .../cursors/openHandCursor.cur | Bin 0 -> 136606 bytes .../cursors/operationNotAllowedCursor.cur | Bin 0 -> 136606 bytes .../cursors/pointingHandCursor.cur | Bin 0 -> 136606 bytes .../cursors/resizeDownCursor.cur | Bin 0 -> 136606 bytes .../cursors/resizeLeftCursor.cur | Bin 0 -> 136606 bytes .../cursors/resizeLeftRightCursor.cur | Bin 0 -> 136606 bytes .../dungeons_guide_loader/cursors/resizeNE.cur | Bin 0 -> 136606 bytes .../dungeons_guide_loader/cursors/resizeNESW.cur | Bin 0 -> 136606 bytes .../dungeons_guide_loader/cursors/resizeNW.cur | Bin 0 -> 136606 bytes .../dungeons_guide_loader/cursors/resizeNWSE.cur | Bin 0 -> 136606 bytes .../cursors/resizeRightCursor.cur | Bin 0 -> 136606 bytes .../dungeons_guide_loader/cursors/resizeSE.cur | Bin 0 -> 136606 bytes .../dungeons_guide_loader/cursors/resizeSW.cur | Bin 0 -> 136606 bytes .../cursors/resizeUpCursor.cur | Bin 0 -> 136606 bytes .../cursors/resizeUpDownCursor.cur | Bin 0 -> 136606 bytes .../main/resources/assets/dungeons_guide_loader/fi | 0 .../shaders/chromacircle.frag | 27 +++++++++++++++++++++ .../shaders/chromaroundrect.frag | 23 ++++++++++++++++++ .../shaders/chromaroundrect.vert | 19 +++++++++++++++ .../dungeons_guide_loader/shaders/donut.frag | 17 +++++++++++++ .../dungeons_guide_loader/shaders/roundrect.frag | 17 +++++++++++++ .../dungeons_guide_loader/shaders/roundrect.vert | 8 ++++++ 26 files changed, 111 insertions(+) create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/IBeamCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/arrowCursor.cur create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/cursors/closedHandCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/crosshairCursor.cur create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/cursors/openHandCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/operationNotAllowedCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/pointingHandCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeDownCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftRightCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNE.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNESW.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNW.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNWSE.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeRightCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSE.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSW.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpCursor.cur create mode 100755 loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpDownCursor.cur delete mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/fi create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag create mode 100644 loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert (limited to 'loader/src/main/resources/assets') diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/IBeamCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/IBeamCursor.cur new file mode 100755 index 00000000..19f162df Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/IBeamCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/arrowCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/arrowCursor.cur new file mode 100755 index 00000000..7d58eec1 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/arrowCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/closedHandCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/closedHandCursor.cur new file mode 100644 index 00000000..26d6ba9f Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/closedHandCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/crosshairCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/crosshairCursor.cur new file mode 100755 index 00000000..7d4589af Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/crosshairCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/openHandCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/openHandCursor.cur new file mode 100644 index 00000000..26d6ba9f Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/openHandCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/operationNotAllowedCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/operationNotAllowedCursor.cur new file mode 100755 index 00000000..1bb62ed5 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/operationNotAllowedCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/pointingHandCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/pointingHandCursor.cur new file mode 100755 index 00000000..77313176 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/pointingHandCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeDownCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeDownCursor.cur new file mode 100755 index 00000000..bae2c237 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeDownCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftCursor.cur new file mode 100755 index 00000000..b904bc5c Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftRightCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftRightCursor.cur new file mode 100755 index 00000000..b904bc5c Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeLeftRightCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNE.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNE.cur new file mode 100755 index 00000000..ccaac220 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNE.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNESW.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNESW.cur new file mode 100755 index 00000000..ccaac220 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNESW.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNW.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNW.cur new file mode 100755 index 00000000..f67aa78d Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNW.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNWSE.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNWSE.cur new file mode 100755 index 00000000..f67aa78d Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeNWSE.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeRightCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeRightCursor.cur new file mode 100755 index 00000000..b904bc5c Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeRightCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSE.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSE.cur new file mode 100755 index 00000000..f67aa78d Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSE.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSW.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSW.cur new file mode 100755 index 00000000..ccaac220 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeSW.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpCursor.cur new file mode 100755 index 00000000..bae2c237 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpDownCursor.cur b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpDownCursor.cur new file mode 100755 index 00000000..bae2c237 Binary files /dev/null and b/loader/src/main/resources/assets/dungeons_guide_loader/cursors/resizeUpDownCursor.cur differ diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/fi b/loader/src/main/resources/assets/dungeons_guide_loader/fi deleted file mode 100644 index e69de29b..00000000 diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag new file mode 100644 index 00000000..25354550 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag @@ -0,0 +1,27 @@ +#version 120 + +#define TWO_PI 6.28318530718 + +uniform float radius; +uniform vec2 centerPos; +uniform float smoothness; +uniform float value; + + +vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +void main() { + vec2 stuff = gl_FragCoord.xy - centerPos; + float sdf = length(stuff)-radius; + float saturation = 1.0+(sdf / radius); + float clampd = 1.0 - smoothstep(-smoothness, smoothness, sdf); + float angle = atan(-stuff.x, -stuff.y) / TWO_PI + 0.5; + + vec3 col = hsv2rgb(vec3(angle, saturation, value)); + + gl_FragColor = vec4(col,clampd); +} \ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag new file mode 100644 index 00000000..7ddf2db8 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag @@ -0,0 +1,23 @@ +#version 120 +uniform float radius; +uniform vec2 halfSize; +uniform vec2 centerPos; +uniform float smoothness; +varying vec4 color; + +vec3 hsv2rgb(vec3 c) +{ + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +float roundedBoxSDF(vec2 CenterPosition, vec2 Size, float Radius) { + return length(max(abs(CenterPosition)-Size+Radius,0.0))-Radius; +} + +void main() { + float distance = roundedBoxSDF(gl_FragCoord.xy - centerPos, halfSize, radius); + float smoothedAlpha = smoothstep(-smoothness,0.0, -distance); + gl_FragColor = vec4(hsv2rgb(color.rgb), color.a) * vec4(1.0, 1.0, 1.0, smoothedAlpha); +} \ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert new file mode 100644 index 00000000..377182c5 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert @@ -0,0 +1,19 @@ +#version 120 + +varying vec4 color; + +vec3 rgb2hsv(vec3 c) +{ + vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); + vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); + vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); + + float d = q.x - min(q.w, q.y); + float e = 1.0e-10; + return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); +} + +void main() { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + color = vec4(rgb2hsv(gl_Color.rgb), gl_Color.a); +} \ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag new file mode 100644 index 00000000..cca6bc39 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag @@ -0,0 +1,17 @@ +#version 120 + + +uniform float radius; +uniform float thickness; +uniform vec2 centerPos; +uniform float smoothness; + + + +void main() { + vec2 stuff = gl_FragCoord.xy - centerPos; + float sdf = abs(length(stuff)-radius); + float clampd = 1.0 - smoothstep(thickness, thickness+smoothness, sdf); + + gl_FragColor = gl_Color * vec4(1.0, 1.0, 1.0, clampd); +} \ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag new file mode 100644 index 00000000..95649cf4 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag @@ -0,0 +1,17 @@ +#version 120 +uniform float radius; +uniform vec2 halfSize; +uniform vec2 centerPos; +uniform float smoothness; +varying vec4 color; + + +float roundedBoxSDF(vec2 CenterPosition, vec2 Size, float Radius) { + return length(max(abs(CenterPosition)-Size+Radius,0.0))-Radius; +} + +void main() { + float distance = roundedBoxSDF(gl_FragCoord.xy - centerPos, halfSize, radius); + float smoothedAlpha = smoothstep(-smoothness,0.0, -distance); + gl_FragColor = color * vec4(1.0, 1.0, 1.0, smoothedAlpha); +} \ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert new file mode 100644 index 00000000..7a2ec153 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert @@ -0,0 +1,8 @@ +#version 120 + +varying vec4 color; + +void main() { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + color = gl_Color; +} \ No newline at end of file -- cgit