Fix bug with shader

This commit is contained in:
NeeEoo
2023-08-12 13:47:33 +02:00
parent 4985ffbd86
commit f59d081804
4 changed files with 12 additions and 3 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ float uBlur = 0.015;
float uBrightness = 0.6;
vec4 getColor(vec2 pos) {
vec2 ps = camToOg(pos);
vec2 ps = (pos);
if (ps.x < 0) ps.x = 0;
//else if (ps.x > 1.0 - (1.0 / iResolution.x)) ps.x = 1.0 - (1.0 / iResolution.x);
else if (ps.x > 1.0) return vec4(0.0);
@@ -40,7 +40,7 @@ vec2 random(vec2 p) {
}
void main() {
vec2 camPos = getCamPos(openfl_TextureCoordv);
vec2 camPos = (openfl_TextureCoordv);
//vec2 camPos = openfl_TextureCoordv;
if (camPos.x < 0 || camPos.x > 1 || camPos.y < 0 || camPos.y > 1)
return;
@@ -19,6 +19,7 @@ class CharterStrumlineExtraButton extends UISprite {
button.scale.set(0.75,0.75);
button.updateHitbox();
button.antialiasing = false;
button.cursor = BUTTON;
members.push(button);
this.text = new UIText(0,0, 160, text);
@@ -49,4 +50,10 @@ class CharterStrumlineExtraButton extends UISprite {
FlxMath.lerp(button.scale.y, buttonScale.y, 1/6)
);
}
public override function destroy() {
super.destroy();
buttonScale.put();
}
}
+2 -1
View File
@@ -17,6 +17,8 @@ class UIDropDown extends UISliceSprite {
this.options = options;
this.index = index;
cursor = BUTTON;
label = new UIText(0, 0, width - height, options[index]);
members.push(label);
@@ -33,7 +35,6 @@ class UIDropDown extends UISliceSprite {
}
public override function update(elapsed:Float) {
var opened = curMenu.contextMenuOpened();
framesOffset = (opened || (hovered && FlxG.mouse.pressed)) ? 18 : (hovered ? 9 : 0);
if (FlxG.mouse.justReleased && (hovered || dropButton.hovered)) {
+1
View File
@@ -24,6 +24,7 @@ class UIScrollBar extends UISprite {
this.length = length;
thumb = new UISliceSprite(0, 0, w, h, 'editors/ui/scrollbar');
thumb.cursor = BUTTON;
members.push(thumb);
thumbIcon = new FlxSprite(0, 0, Paths.image('editors/ui/scrollbar-icon'));