mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 23:46:45 +00:00
selection outline
This commit is contained in:
parent
b8f9a241f4
commit
501e159797
|
@ -7,6 +7,7 @@ import funkin.play.PlayState;
|
||||||
import funkin.play.character.BaseCharacter;
|
import funkin.play.character.BaseCharacter;
|
||||||
import funkin.play.stage.StageData;
|
import funkin.play.stage.StageData;
|
||||||
import funkin.play.stage.StageProp;
|
import funkin.play.stage.StageProp;
|
||||||
|
import funkin.shaderslmfao.StrokeShader;
|
||||||
import funkin.ui.haxeui.HaxeUISubState;
|
import funkin.ui.haxeui.HaxeUISubState;
|
||||||
import haxe.ui.RuntimeComponentBuilder;
|
import haxe.ui.RuntimeComponentBuilder;
|
||||||
import haxe.ui.containers.ListView;
|
import haxe.ui.containers.ListView;
|
||||||
|
@ -20,6 +21,8 @@ class StageOffsetSubstate extends HaxeUISubState
|
||||||
{
|
{
|
||||||
var uiStuff:Component;
|
var uiStuff:Component;
|
||||||
|
|
||||||
|
var outlineShader:StrokeShader;
|
||||||
|
|
||||||
static final STAGE_EDITOR_LAYOUT = Paths.ui('stage-editor/stage-editor-view');
|
static final STAGE_EDITOR_LAYOUT = Paths.ui('stage-editor/stage-editor-view');
|
||||||
|
|
||||||
public function new()
|
public function new()
|
||||||
|
@ -50,6 +53,8 @@ class StageOffsetSubstate extends HaxeUISubState
|
||||||
// uiStuff.cameras = [PlayState.instance.camHUD];
|
// uiStuff.cameras = [PlayState.instance.camHUD];
|
||||||
// btn.cameras = [PlayState.instance.camHUD];
|
// btn.cameras = [PlayState.instance.camHUD];
|
||||||
|
|
||||||
|
outlineShader = new StrokeShader(0xFFFFFFFF, 4, 4);
|
||||||
|
|
||||||
var layerList:ListView = findComponent("prop-layers");
|
var layerList:ListView = findComponent("prop-layers");
|
||||||
|
|
||||||
for (thing in PlayState.instance.currentStage)
|
for (thing in PlayState.instance.currentStage)
|
||||||
|
@ -100,10 +105,14 @@ class StageOffsetSubstate extends HaxeUISubState
|
||||||
|
|
||||||
function selectProp(propName:String)
|
function selectProp(propName:String)
|
||||||
{
|
{
|
||||||
|
if (char != null && char.shader == outlineShader) char.shader = null;
|
||||||
|
|
||||||
char = cast PlayState.instance.currentStage.getNamedProp(propName);
|
char = cast PlayState.instance.currentStage.getNamedProp(propName);
|
||||||
|
|
||||||
if (char == null) return;
|
if (char == null) return;
|
||||||
|
|
||||||
|
char.shader = outlineShader;
|
||||||
|
|
||||||
// trace(thing);
|
// trace(thing);
|
||||||
// trace(spr);
|
// trace(spr);
|
||||||
trace("JUST PRESSED!");
|
trace("JUST PRESSED!");
|
||||||
|
|
Loading…
Reference in a new issue