Skip to content

Commit

Permalink
wowowowowo bsky link
Browse files Browse the repository at this point in the history
  • Loading branch information
Snirozu committed Dec 5, 2024
1 parent bb37343 commit e36315e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
Binary file modified art/flashFiles/onlineDiscord.fla
Binary file not shown.
Binary file added assets/preload/images/online_bsky.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions assets/preload/images/online_bsky.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="online_bsky.png">
<!-- Created with Adobe Animate version 23.0.2.103 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="active0000" x="0" y="0" width="82" height="78"/>
<SubTexture name="active0001" x="0" y="0" width="82" height="78"/>
<SubTexture name="active0002" x="82" y="0" width="82" height="78"/>
<SubTexture name="active0003" x="82" y="0" width="82" height="78"/>
<SubTexture name="active0004" x="164" y="0" width="82" height="78"/>
<SubTexture name="active0005" x="164" y="0" width="82" height="78"/>
<SubTexture name="active0006" x="82" y="0" width="82" height="78"/>
<SubTexture name="active0007" x="82" y="0" width="82" height="78"/>
<SubTexture name="idle0000" x="0" y="78" width="73" height="71"/>
<SubTexture name="idle0001" x="0" y="78" width="73" height="71"/>
<SubTexture name="idle0002" x="73" y="78" width="73" height="71"/>
<SubTexture name="idle0003" x="73" y="78" width="73" height="71"/>
<SubTexture name="idle0004" x="146" y="78" width="73" height="71"/>
<SubTexture name="idle0005" x="146" y="78" width="73" height="71"/>
<SubTexture name="idle0006" x="73" y="78" width="73" height="71"/>
<SubTexture name="idle0007" x="73" y="78" width="73" height="71"/>
</TextureAtlas>
33 changes: 31 additions & 2 deletions source/online/states/OnlineState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class OnlineState extends MusicBeatState {

var discord:FlxSprite;
var github:FlxSprite;
var bsky:FlxSprite;

function onRoomJoin(err:Dynamic) {
if (err != null) {
Expand Down Expand Up @@ -167,7 +168,19 @@ class OnlineState extends MusicBeatState {
github.alpha = 0.8;
add(github);

itemDesc = new FlxText(0, FlxG.height - 125);
bsky = new FlxSprite();
bsky.antialiasing = ClientPrefs.data.antialiasing;
bsky.frames = Paths.getSparrowAtlas('online_bsky');
bsky.animation.addByPrefix('idle', "idle", 24);
bsky.animation.addByPrefix('active', "active", 24);
bsky.animation.play('idle');
bsky.updateHitbox();
bsky.x = github.x + github.width + 20;
bsky.y = FlxG.height - bsky.height - 28;
bsky.alpha = 0.8;
add(bsky);

itemDesc = new FlxText(0, FlxG.height - 170);
itemDesc.setFormat("VCR OSD Mono", 25, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
itemDesc.screenCenter(X);
add(itemDesc);
Expand Down Expand Up @@ -363,6 +376,22 @@ class OnlineState extends MusicBeatState {
github.alpha = 0.8;
github.animation.play("idle");
}

if (FlxG.mouse.overlaps(bsky)) {
bsky.alpha = 1;
bsky.animation.play("active");

itemDesc.text = "Follow the official Psych Online Bluesky account!";
itemDesc.screenCenter(X);

if (FlxG.mouse.justPressed) {
RequestSubstate.requestURL("https://bsky.app/profile/funkin.sniro.boo", true);
}
}
else {
bsky.alpha = 0.8;
bsky.animation.play("idle");
}
}
}
}
Expand Down Expand Up @@ -394,7 +423,7 @@ class OnlineState extends MusicBeatState {
itemDesc.screenCenter(X);

descBox.scale.set(FlxG.width - 500, (itemDesc.text.split("\n").length + 2) * (itemDesc.size));
descBox.y = (FlxG.height - 125) + descBox.scale.y * 0.5 - itemDesc.size;
descBox.y = itemDesc.y + descBox.scale.y * 0.5 - itemDesc.size;
descBox.screenCenter(X);

selectLine.y = (items.y + 20) + (curSelected) * 40;
Expand Down

0 comments on commit e36315e

Please sign in to comment.