mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-22 13:13:47 +00:00
checkbox thingie hehe
This commit is contained in:
parent
5408781804
commit
f1325d31e5
BIN
art/flashFiles/options-screen-cs3.fla
Normal file
BIN
art/flashFiles/options-screen-cs3.fla
Normal file
Binary file not shown.
BIN
art/flashFiles/options-screen-cs3.png
Normal file
BIN
art/flashFiles/options-screen-cs3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
19
art/flashFiles/options-screen-cs3.xml
Normal file
19
art/flashFiles/options-screen-cs3.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextureAtlas imagePath="options-screen-cs3.png">
|
||||||
|
<!-- Created with Adobe Animate version 21.0.4.39603 -->
|
||||||
|
<!-- http://www.adobe.com/products/animate.html -->
|
||||||
|
<SubTexture name="Check Box Selected Static0000" x="0" y="198" width="120" height="174" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box Selected Static0001" x="0" y="198" width="120" height="174" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0000" x="371" y="0" width="121" height="82" frameX="-15" frameY="-133" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0001" x="371" y="0" width="121" height="82" frameX="-15" frameY="-133" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0002" x="132" y="0" width="127" height="180" frameX="-4" frameY="-45" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0003" x="0" y="0" width="127" height="193" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0004" x="0" y="0" width="127" height="193" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0005" x="257" y="185" width="138" height="146" frameX="-2" frameY="-62" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0006" x="257" y="185" width="138" height="146" frameX="-2" frameY="-62" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0007" x="132" y="185" width="120" height="176" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0008" x="132" y="185" width="120" height="176" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0009" x="0" y="198" width="120" height="174" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0010" x="0" y="198" width="120" height="174" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box unselected0000" x="264" y="0" width="102" height="103"/>
|
||||||
|
</TextureAtlas>
|
||||||
BIN
assets/preload/images/checkboxThingie.png
Normal file
BIN
assets/preload/images/checkboxThingie.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
19
assets/preload/images/checkboxThingie.xml
Normal file
19
assets/preload/images/checkboxThingie.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextureAtlas imagePath="checkboxThingie.png">
|
||||||
|
<!-- Created with Adobe Animate version 21.0.4.39603 -->
|
||||||
|
<!-- http://www.adobe.com/products/animate.html -->
|
||||||
|
<SubTexture name="Check Box Selected Static0000" x="0" y="198" width="120" height="174" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box Selected Static0001" x="0" y="198" width="120" height="174" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0000" x="371" y="0" width="121" height="82" frameX="-15" frameY="-133" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0001" x="371" y="0" width="121" height="82" frameX="-15" frameY="-133" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0002" x="132" y="0" width="127" height="180" frameX="-4" frameY="-45" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0003" x="0" y="0" width="127" height="193" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0004" x="0" y="0" width="127" height="193" frameX="0" frameY="0" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0005" x="257" y="185" width="138" height="146" frameX="-2" frameY="-62" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0006" x="257" y="185" width="138" height="146" frameX="-2" frameY="-62" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0007" x="132" y="185" width="120" height="176" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0008" x="132" y="185" width="120" height="176" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0009" x="0" y="198" width="120" height="174" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box selecting animation0010" x="0" y="198" width="120" height="174" frameX="-12" frameY="-29" frameWidth="140" frameHeight="225"/>
|
||||||
|
<SubTexture name="Check Box unselected0000" x="264" y="0" width="102" height="103"/>
|
||||||
|
</TextureAtlas>
|
||||||
|
|
@ -107,27 +107,43 @@ class PreferencesMenu extends ui.OptionsState.Page
|
||||||
|
|
||||||
class CheckboxThingie extends FlxSprite
|
class CheckboxThingie extends FlxSprite
|
||||||
{
|
{
|
||||||
public var daValue(default, set):Bool = false;
|
public var daValue(default, set):Bool;
|
||||||
|
|
||||||
public function new(x:Float, y:Float, daValue:Bool = false)
|
public function new(x:Float, y:Float, daValue:Bool = false)
|
||||||
{
|
{
|
||||||
super(x, y);
|
super(x, y);
|
||||||
|
|
||||||
|
frames = Paths.getSparrowAtlas('checkboxThingie');
|
||||||
|
animation.addByPrefix('static', 'Check Box unselected', 24, false);
|
||||||
|
animation.addByPrefix('checked', 'Check Box selecting animation', 24, false);
|
||||||
|
|
||||||
|
antialiasing = true;
|
||||||
|
|
||||||
|
setGraphicSize(Std.int(width * 0.7));
|
||||||
|
updateHitbox();
|
||||||
|
|
||||||
this.daValue = daValue;
|
this.daValue = daValue;
|
||||||
makeGraphic(50, 50, FlxColor.WHITE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
|
|
||||||
|
switch (animation.curAnim.name)
|
||||||
|
{
|
||||||
|
case 'static':
|
||||||
|
offset.set();
|
||||||
|
case 'checked':
|
||||||
|
offset.set(17, 70);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_daValue(value:Bool):Bool
|
function set_daValue(value:Bool):Bool
|
||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
color = FlxColor.GREEN;
|
animation.play('checked', true);
|
||||||
else
|
else
|
||||||
color = FlxColor.RED;
|
animation.play('static');
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue