1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-26 15:07:14 +00:00

selection outline

This commit is contained in:
Cameron Taylor 2023-02-08 01:40:27 -05:00
parent b8f9a241f4
commit 501e159797

View file

@ -7,6 +7,7 @@ import funkin.play.PlayState;
import funkin.play.character.BaseCharacter;
import funkin.play.stage.StageData;
import funkin.play.stage.StageProp;
import funkin.shaderslmfao.StrokeShader;
import funkin.ui.haxeui.HaxeUISubState;
import haxe.ui.RuntimeComponentBuilder;
import haxe.ui.containers.ListView;
@ -20,6 +21,8 @@ class StageOffsetSubstate extends HaxeUISubState
{
var uiStuff:Component;
var outlineShader:StrokeShader;
static final STAGE_EDITOR_LAYOUT = Paths.ui('stage-editor/stage-editor-view');
public function new()
@ -50,6 +53,8 @@ class StageOffsetSubstate extends HaxeUISubState
// uiStuff.cameras = [PlayState.instance.camHUD];
// btn.cameras = [PlayState.instance.camHUD];
outlineShader = new StrokeShader(0xFFFFFFFF, 4, 4);
var layerList:ListView = findComponent("prop-layers");
for (thing in PlayState.instance.currentStage)
@ -100,10 +105,14 @@ class StageOffsetSubstate extends HaxeUISubState
function selectProp(propName:String)
{
if (char != null && char.shader == outlineShader) char.shader = null;
char = cast PlayState.instance.currentStage.getNamedProp(propName);
if (char == null) return;
char.shader = outlineShader;
// trace(thing);
// trace(spr);
trace("JUST PRESSED!");