Skip to content

Commit

Permalink
starting to work on player data pages
Browse files Browse the repository at this point in the history
  • Loading branch information
KoloInDaCrib committed Nov 7, 2024
1 parent f53a4cd commit 0446f42
Show file tree
Hide file tree
Showing 5 changed files with 333 additions and 112 deletions.
2 changes: 1 addition & 1 deletion art
Submodule art updated 98 files
+ Funkin.bmp
+ FunkinAlt.bmp
+0 −5 convertOGGToMP3.sh
+ discord/album-expansion1.jpg
+ discord/album-expansion2.png
+ discord/album-volume1.jpg
+ discord/album-volume1b.jpg
+ discord/album-volume2.jpg
+ discord/album-volume3.jpg
+ discord/album-volume4.jpg
+ discord/icon-bf-old.png
+ discord/icon-bf-pixel.png
+ discord/icon-bf.png
+ discord/icon-dad.png
+ discord/icon-darnell-blazin.png
+ discord/icon-darnell.png
+ discord/icon-face.png
+ discord/icon-gf.png
+ discord/icon-mom-car.png
+ discord/icon-mom.png
+ discord/icon-monster-christmas.png
+ discord/icon-monster.png
+ discord/icon-parents-christmas.png
+ discord/icon-pico.png
+ discord/icon-senpai-angry.png
+ discord/icon-senpai.png
+ discord/icon-spirit.png
+ discord/icon-spooky-dark.png
+ discord/icon-spooky.png
+ discord/icon-tankman-atlas.png
+ discord/icon-tankman.png
+ flashFiles/CLICK HERE TO PLAY asset.fla
+ flashFiles/Campaign_Menu_UI_Weekend1.fla
+ flashFiles/Can Arc NEWER.fla
+ flashFiles/Christmas Erect Background Assets V3(1).fla
+ flashFiles/Darnell Fighting Animations V2.fla
+ flashFiles/Freeplay redesign assets VER2 compact.fla
+ flashFiles/GF character select.fla
+ flashFiles/GF_character_select.fla
+ flashFiles/NOTE assets UPDATED.fla
+ flashFiles/Nene character select v2.fla
+ flashFiles/Nene christmas assets.fla
+ flashFiles/Nene_character_select_v2.fla
+ flashFiles/PICO bg ERECT.fla
+ flashFiles/Pico Can Explosion Death.fla
+ flashFiles/Pico Christmas assetss.fla
+ flashFiles/Pico Fighting Animations V3.fla
+ flashFiles/Pico Gut Punch Death Assets.fla
+ flashFiles/RESULTS BOYFRIEND EXCELLENT RANK final v2.fla
+ flashFiles/RESULTS BOYFRIEND GREAT RANK final.fla
+ flashFiles/RESULTS BOYFRIEND LOSS RANK final v2.fla
+ flashFiles/RESULTS BOYFRIEND PERFECT RANK final.fla
+ flashFiles/RESULTS_BOYFRIEND_EXCELLENT_RANK_FINAL.fla
+ flashFiles/RESULTS_BOYFRIEND_LOSS_RANK_final.fla
+ flashFiles/RESULTS_BOYFRIEND_PERFECT_RANK_semi_final.fla
+ flashFiles/Week 4 Erect.fla
+ flashFiles/Weekend1 BG no puddles.fla
+ flashFiles/Weekend1 ERECT BG.fla
+ flashFiles/bf_pico_slides_packaged_v2.fla
+ flashFiles/boyfriend character select v2.fla
+ flashFiles/boyfriend freeplay animations v5.fla
+ flashFiles/boyfriend_character_select_v2.fla
+ flashFiles/campaign_menu_UI_assets.fla
+ flashFiles/character select assets for cam.fla
+ flashFiles/character unlock backing card v2.fla
+ flashFiles/digital numbers results.fla
+ flashFiles/dipshit lights.fla
+ flashFiles/fake out death final alt.fla
+ flashFiles/freeplay album credits assets v4(1).fla
+ flashFiles/freeplay capsule text.fla
+ flashFiles/freeplay rank badges v2.fla
+ flashFiles/freeplay sparks.fla
+ flashFiles/lightning effect.fla
+ flashFiles/loadng stickers set 1.fla
+ flashFiles/lock unlocking v2.fla
+ flashFiles/locked character assets v2.fla
+ flashFiles/pico backing card v2.fla
+ flashFiles/pico burp assets.fla
+ flashFiles/pico character select v2.fla
+ flashFiles/pico confirm card.fla
+ flashFiles/pico doppleganger assets v2.fla
+ flashFiles/pico freeplay assets v7.fla
+ flashFiles/pico good rank final for now(1).fla
+ flashFiles/pico great rank final(1).fla
+ flashFiles/pico loss final.fla
+ flashFiles/pico perfect rank final v2(1).fla
+ flashFiles/pico_character_select_v2.fla
+ flashFiles/results numbers small.fla
+ flashFiles/results ranking assets v2.fla
+ flashFiles/santa speaks assets.fla
+ flashFiles/tankman beat it.fla
+ flashFiles/traffic light animation and cars.fla
+ flashFiles/week 1 erect v3.fla
+ flashFiles/weekend1_fighting_rough_assets.fla
+0 −99 funScripts/chartingSheets/sheetsToCharts.py
+9 −55 funScripts/jsfl/frames.jsfl
+0 −4 optimizePNG.sh
+0 −4 resizeHealthIcons.sh
4 changes: 3 additions & 1 deletion source/funkin/ui/debug/char/CharCreatorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class CharCreatorState extends UIState
function setupUICallbacks()
{
menubarOptionGameplay.onChange = function(_) switchToPage(Gameplay);
menubarOptionCharSelect.onChange = function(_) switchToPage(CharacterSelect);
menubarItemExport.onClick = _ -> this.exportCharacter();
}

Expand All @@ -126,6 +127,7 @@ class CharCreatorState extends UIState
pages.clear();

if (params.generateCharacter) pages.set(Gameplay, new CharCreatorGameplayPage(this, params));
if (params.generatePlayerData) pages.set(CharacterSelect, new CharCreatorSelectPage(this, params));

menubarOptionGameplay.disabled = !params.generateCharacter;
menubarOptionCharSelect.disabled = menubarOptionFreeplay.disabled = menubarOptionResults.disabled = !params.generatePlayerData;
Expand All @@ -150,7 +152,7 @@ class CharCreatorState extends UIState
for (box in [bottomBarLeftBox, bottomBarMiddleBox, bottomBarRightBox, menubarMenuSettings])
{
while (box.childComponents.length > 0)
box.removeComponent(box.childComponents[0]);
box.removeComponent(box.childComponents[0], false);
}

remove(selectedPage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class CharCreatorStartupWizard
generatePlayerData: false,
renderType: CharacterRenderType.Sparrow,
files: [],
charSelectFile: null,
freeplayFile: null,
importedCharacter: null
}

Expand Down Expand Up @@ -63,6 +65,8 @@ typedef WizardGenerateParams =
var generatePlayerData:Bool;
var renderType:CharacterRenderType;
var files:Array<WizardFile>;
var charSelectFile:WizardFile;
var freeplayFile:WizardFile;
@:optional
var importedCharacter:String;
}
Expand Down
207 changes: 103 additions & 104 deletions source/funkin/ui/debug/char/pages/CharCreatorGameplayPage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,9 @@ class CharCreatorGameplayPage extends CharCreatorDefaultPage
dialogMap.set(Ghost, new GhostSettingsDialog(this));
dialogMap.set(Health, new HealthIconDialog(this, currentCharacter));

// defaults for UI
labelAnimName.text = "None";
labelAnimOffsetX.text = labelAnimOffsetY.text = "0";
labelCharType.text = "BF";

var animDialog = cast(dialogMap[Animation], AddAnimDialog);
animDialog.updateDropdown();
generateUI();
}

override public function onDialogUpdate(dialog:DefaultPageDialog)
Expand Down Expand Up @@ -97,104 +93,33 @@ class CharCreatorGameplayPage extends CharCreatorDefaultPage
var labelAnimOffsetX:Label = new Label();
var labelAnimOffsetY:Label = new Label();
var labelCharType:Label = new Label();
var stageDropdown:DropDown = new DropDown();

final RULE_HEIGHT:Int = 80;

override public function fillUpBottomBar(left:Box, middle:Box, right:Box)
{
// ==================left==================
labelAnimName.styleNames = "infoText";
labelAnimName.verticalAlign = "center";
labelAnimName.tooltip = "Left Click to play the Next Animation";
left.addComponent(labelAnimName);

var leftRule1 = new VerticalRule();
leftRule1.percentHeight = 80;
left.addComponent(leftRule1);
var leftRule2 = new VerticalRule();

labelAnimOffsetX.styleNames = "infoText";
labelAnimOffsetX.verticalAlign = "center";
labelAnimOffsetX.tooltip = "Left/Right Click to Increase/Decrease the Horizontal Offset.";
left.addComponent(labelAnimOffsetX);
leftRule1.percentHeight = leftRule2.percentHeight = RULE_HEIGHT;

var leftRule2 = new VerticalRule();
leftRule2.percentHeight = 80;
left.addComponent(labelAnimName);
left.addComponent(leftRule1);
left.addComponent(labelAnimOffsetX);
left.addComponent(leftRule2);

labelAnimOffsetY.styleNames = "infoText";
labelAnimOffsetY.verticalAlign = "center";
labelAnimOffsetY.tooltip = "Left/Right Click to Increase/Decrease the Vertical Offset.";
left.addComponent(labelAnimOffsetY);

// ==================middle==================

// ==================right==================
var typesArray = [BF, GF, DAD];
var rightRule = new VerticalRule();
rightRule.percentHeight = RULE_HEIGHT;

labelCharType.styleNames = "infoText";
labelCharType.verticalAlign = "center";
labelCharType.tooltip = "Left Click/Right Click to switch to the Next/Previous Character Mode.";
right.addComponent(labelCharType);

var rightRule = new VerticalRule();
rightRule.percentHeight = 80;
right.addComponent(rightRule);

var dropdown = new DropDown();
dropdown.text = "Select Stage";
dropdown.dropdownVerticalPosition = "top";
dropdown.width = 125;
dropdown.selectedItem = curStage;
right.addComponent(dropdown);

var stages = StageRegistry.instance.listEntryIds();
stages.sort(funkin.util.SortUtil.alphabetically);
for (aught in stages)
dropdown.dataSource.add({text: aught});

// ==================callback bs==================

labelAnimName.onClick = function(_) {
var drop = cast(dialogMap[Animation], AddAnimDialog).charAnimDropdown;
if (drop.selectedIndex == -1) return;

var id = drop.selectedIndex + 1;
if (id >= drop.dataSource.size) id = 0;
drop.selectedIndex = id;
currentCharacter.playAnimation(currentCharacter.animations[drop.selectedIndex].name);
}

labelAnimName.onRightClick = function(_) {
var drop = cast(dialogMap[Animation], AddAnimDialog).charAnimDropdown;
if (drop.selectedIndex == -1) return;

var id = drop.selectedIndex - 1;
if (id < 0) id = drop.dataSource.size - 1;
drop.selectedIndex = id;
currentCharacter.playAnimation(currentCharacter.animations[drop.selectedIndex].name);
}

labelAnimOffsetX.onClick = _ -> changeCharAnimOffset(5);
labelAnimOffsetX.onRightClick = _ -> changeCharAnimOffset(-5);
labelAnimOffsetY.onClick = _ -> changeCharAnimOffset(0, 5);
labelAnimOffsetY.onRightClick = _ -> changeCharAnimOffset(0, -5);

labelCharType.onClick = function(_) {
var idx = typesArray.indexOf(currentCharacter.characterType);
idx++;
if (idx >= typesArray.length) idx = 0;
updateCharPerStageData(typesArray[idx]);
labelCharType.text = Std.string(currentCharacter.characterType);
}
labelCharType.onRightClick = function(_) {
var idx = typesArray.indexOf(currentCharacter.characterType);
idx--;
if (idx < 0) idx = typesArray.length - 1;
updateCharPerStageData(typesArray[idx]);
labelCharType.text = Std.string(currentCharacter.characterType);
}
dropdown.onChange = function(_) {
curStage = dropdown.selectedItem?.text ?? curStage;
updateCharPerStageData(currentCharacter.characterType);
}
right.addComponent(stageDropdown);
}

function changeCharAnimOffset(changeX:Int = 0, changeY:Int = 0)
Expand All @@ -217,27 +142,14 @@ class CharCreatorGameplayPage extends CharCreatorDefaultPage
labelAnimOffsetY.text = "" + newOffsets[1];
}

var checkAnim:MenuCheckBox = new MenuCheckBox();
var checkHealth:MenuCheckBox = new MenuCheckBox();
var checkGhost:MenuCheckBox = new MenuCheckBox();

override public function fillUpPageSettings(item:haxe.ui.containers.menus.Menu)
{
var checkAnim = new MenuCheckBox();
checkAnim.text = "Animation Data";
checkAnim.onChange = function(_) {
dialogMap[Animation].hidden = !checkAnim.selected;
}
item.addComponent(checkAnim);

var checkHealth = new MenuCheckBox();
checkHealth.text = "Health Icon Data";
checkHealth.onChange = function(_) {
dialogMap[Health].hidden = !checkHealth.selected;
}
item.addComponent(checkHealth);

var checkGhost = new MenuCheckBox();
checkGhost.text = "Ghost Settings";
checkGhost.onChange = function(_) {
dialogMap[Ghost].hidden = !checkGhost.selected;
}
item.addComponent(checkGhost);
}

Expand Down Expand Up @@ -304,6 +216,93 @@ class CharCreatorGameplayPage extends CharCreatorDefaultPage
sortAssets();
}

function generateUI()
{
// defaults for UI
labelAnimName.text = "None";
labelAnimOffsetX.text = labelAnimOffsetY.text = "0";
labelCharType.text = "BF";

labelAnimName.styleNames = labelAnimOffsetX.styleNames = labelAnimOffsetY.styleNames = labelCharType.styleNames = "infoText";
labelAnimName.verticalAlign = labelAnimOffsetX.verticalAlign = labelAnimOffsetY.verticalAlign = labelCharType.verticalAlign = "center";

labelAnimName.tooltip = "Left Click to play the Next Animation";
labelAnimOffsetX.tooltip = "Left/Right Click to Increase/Decrease the Horizontal Offset.";
labelAnimOffsetY.tooltip = "Left/Right Click to Increase/Decrease the Vertical Offset.";
labelCharType.tooltip = "Left Click/Right Click to switch to the Next/Previous Character Mode.";

stageDropdown.text = "Select Stage";
stageDropdown.dropdownVerticalPosition = "top";
stageDropdown.width = 125;
stageDropdown.selectedItem = curStage;

var stages = StageRegistry.instance.listEntryIds();
stages.sort(funkin.util.SortUtil.alphabetically);
for (aught in stages)
stageDropdown.dataSource.add({text: aught});

checkAnim.text = "Animation Data";
checkHealth.text = "Health Icon Data";
checkGhost.text = "Ghost Settings";

// ==================callback bs==================

labelAnimName.onClick = function(_) {
var drop = cast(dialogMap[Animation], AddAnimDialog).charAnimDropdown;
if (drop.selectedIndex == -1) return;

var id = drop.selectedIndex + 1;
if (id >= drop.dataSource.size) id = 0;
drop.selectedIndex = id;
currentCharacter.playAnimation(currentCharacter.animations[drop.selectedIndex].name);
}

labelAnimName.onRightClick = function(_) {
var drop = cast(dialogMap[Animation], AddAnimDialog).charAnimDropdown;
if (drop.selectedIndex == -1) return;

var id = drop.selectedIndex - 1;
if (id < 0) id = drop.dataSource.size - 1;
drop.selectedIndex = id;
currentCharacter.playAnimation(currentCharacter.animations[drop.selectedIndex].name);
}

labelAnimOffsetX.onClick = _ -> changeCharAnimOffset(5);
labelAnimOffsetX.onRightClick = _ -> changeCharAnimOffset(-5);
labelAnimOffsetY.onClick = _ -> changeCharAnimOffset(0, 5);
labelAnimOffsetY.onRightClick = _ -> changeCharAnimOffset(0, -5);

var typesArray = [BF, GF, DAD];
labelCharType.onClick = function(_) {
var idx = typesArray.indexOf(currentCharacter.characterType);
idx++;
if (idx >= typesArray.length) idx = 0;
updateCharPerStageData(typesArray[idx]);
labelCharType.text = Std.string(currentCharacter.characterType);
}
labelCharType.onRightClick = function(_) {
var idx = typesArray.indexOf(currentCharacter.characterType);
idx--;
if (idx < 0) idx = typesArray.length - 1;
updateCharPerStageData(typesArray[idx]);
labelCharType.text = Std.string(currentCharacter.characterType);
}
stageDropdown.onChange = function(_) {
curStage = stageDropdown.selectedItem?.text ?? curStage;
updateCharPerStageData(currentCharacter.characterType);
}

checkAnim.onChange = function(_) {
dialogMap[Animation].hidden = !checkAnim.selected;
}
checkHealth.onChange = function(_) {
dialogMap[Health].hidden = !checkHealth.selected;
}
checkGhost.onChange = function(_) {
dialogMap[Ghost].hidden = !checkGhost.selected;
}
}

function sortAssets()
{
sort(funkin.util.SortUtil.byZIndex, flixel.util.FlxSort.ASCENDING);
Expand Down
Loading

0 comments on commit 0446f42

Please sign in to comment.