This commit is contained in:
Yoshman29
2023-01-31 23:06:53 +01:00
4 changed files with 44 additions and 11 deletions
+5 -1
View File
@@ -11,6 +11,10 @@ Build instructions are below. Press TAB on the main menu to switch mods (make su
Also, `lime test windows` uses the source assets folder instead of the export one for easier development.
## How to download
Latest builds for the engine can be found in the [Actions](https://github.com/YoshiCrafter29/CodenameEngine/actions) tab.
<details>
<summary><h2>Credits</h2></summary>
@@ -73,4 +77,4 @@ Also, `lime test windows` uses the source assets folder instead of the export on
</details>
</details>
</details>
+1 -1
View File
@@ -1 +1 @@
2204
2207
+3
View File
@@ -94,6 +94,9 @@ class DesktopMain extends MusicBeatState {
windows.add(new Window(new EditorPlayState()));
FlxG.sound.enableVolumeChanges = !(currentFocus is IDesktopInputObject);
// TEMPORARY ESCAPE KEY UNTIL TASKBAR IS ADDED
if (FlxG.keys.justPressed.ESCAPE) FlxG.switchState(new funkin.menus.MainMenuState());
}
public function openWindow(content:WindowContent) {
@@ -27,6 +27,13 @@ class CharacterEditor extends WindowContent {
public var menuBar:MenuBar;
/**
* SILHOUETTES
*/
public var silhouetteDad:Character;
public var silhouetteGf:Character;
public var silhouetteBf:Character;
/**
* ANIMATION TAB
*/
@@ -65,15 +72,24 @@ class CharacterEditor extends WindowContent {
// stage
var bg = new FlxSprite(-600, -200).loadAnimatedGraphic(Paths.image('stages/default/stageback'));
bg.scrollFactor.set(0.9, 0.9);
var stageFront = new FlxSprite(-600, 600).loadAnimatedGraphic(Paths.image('stages/default/stagefront'));
silhouetteDad = new Character(100, 100, "dad", false);
silhouetteGf = new Character(400, 130, "gf", false);
silhouetteGf.scrollFactor.set(0.95, 0.95);
silhouetteBf = new Character(770, 100, "bf", true);
for (e in [silhouetteDad, silhouetteGf, silhouetteBf]) {
e.color = 0xFF000000;
e.visible = false;
e.alpha = 0.25;
}
for (e in [bg, stageFront, silhouetteDad, silhouetteGf, silhouetteBf]) {
e.antialiasing = true;
add(e);
}
char = new Character(100, 100, curCharacter, false, false);
for(e in [bg, stageFront])
e.antialiasing = true;
add(bg);
add(stageFront);
add(char);
title = 'Character Editor - ${char.curCharacter}.xml';
@@ -143,13 +159,16 @@ class CharacterEditor extends WindowContent {
callback: resetCamZoom
},
{
name: "Show a Boyfriend Silhouette"
name: "Toggle Boyfriend Silhouette",
callback: toggleSilBF
},
{
name: "Show a Dad Silhouette"
name: "Toggle Dad Silhouette",
callback: toggleSilDad
},
{
name: "Show a Girlfriend Silhouette"
name: "Toggle Girlfriend Silhouette",
callback: toggleSilGF
}
]
},
@@ -317,4 +336,11 @@ class CharacterEditor extends WindowContent {
public function resetCamZoom() {
windowCamera.zoom = 1;
}
/**
* Silhouettes
*/
public function toggleSilBF() silhouetteBf.visible = !silhouetteBf.visible;
public function toggleSilDad() silhouetteDad.visible = !silhouetteDad.visible;
public function toggleSilGF() silhouetteGf.visible = !silhouetteGf.visible;
}