Skip to content

Commit

Permalink
Dark theme main menu, hair descriptor with Red Panda ears, fix attemp…
Browse files Browse the repository at this point in the history
…t for nightmare

Might should now get cleared properly.

Fixes #571, closes #1021
  • Loading branch information
Kitteh6660 committed Dec 30, 2017
1 parent baf6ee4 commit bb0307d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
24 changes: 20 additions & 4 deletions classes/classes/MainMenu.as
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ package classes
button.disableIf(player.str <= 0, "Please start a new game or load an existing save file."); //Dirty checking, WHYYYYY?
if (player.str > 0) button.hint("Get back to gameplay?");
}
updateMainMenuTextColours();
_mainMenu.visible = true;
}
}
Expand Down Expand Up @@ -82,26 +83,29 @@ package classes
width: 60
});
var revampLogo:TextField = new TextField();
revampLogo.name = "revampLogo";
revampLogo.height = 40;
revampLogo.width = 210;
revampLogo.x = Math.floor(MainView.SCREEN_W / 2) + 145;
revampLogo.y = Math.floor(MainView.SCREEN_H / 2) - 25;
revampLogo.selectable = false;
revampLogo.embedFonts = true;
revampLogo.defaultTextFormat = new TextFormat(CoCButton.ButtonLabelFontName, 20, null, null, null, null, null, null, "center");
revampLogo.defaultTextFormat = new TextFormat(CoCButton.ButtonLabelFontName, 20, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, null, null, null, null, null, "center");
revampLogo.htmlText = "With Revamp Mod!";
var miniCredit:TextField = new TextField();
miniCredit.name = "miniCredit";
miniCredit.multiline = true;
miniCredit.wordWrap = true;
miniCredit.height = 80;
miniCredit.width = 1000;
miniCredit.x = Math.floor(MainView.SCREEN_W / 2) - (miniCredit.width / 2);
miniCredit.y = Math.floor(MainView.SCREEN_H / 2) + 10;
miniCredit.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, null, null, null, null, null, null, "center", null, null, null, -2);
miniCredit.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, null, null, null, null, null, "center", null, null, null, -2);
miniCredit.htmlText = "Created by Fenoxo, Game Mod by Kitteh6660\n";
miniCredit.htmlText += "<b>Edited by:</b> Ashi, SoS, Prisoner416, Zeikfried, et al";
miniCredit.htmlText += "<b>Open-source contributions by:</b> aimozg, Amygdala, Cmacleod42, Enterprise2001, Fake-Name, Gedan, Yoffy, et al";
var disclaimerInfo:TextField = new TextField();
disclaimerInfo.name = "disclaimerInfo";
disclaimerInfo.multiline = true;
disclaimerInfo.wordWrap = true;
disclaimerInfo.height = disclaimerBackground.height;
Expand All @@ -114,22 +118,24 @@ package classes
disclaimerInfo.htmlText += "Please don't play this game if you're under the age of 18 and certainly don't play if strange and exotic fetishes disgust you.\n";
disclaimerInfo.htmlText += "<font color=\"dark red\"><b>You have been warned!</b></font>"
var versionInfo:TextField = new TextField();
versionInfo.name = "versionInfo";
versionInfo.multiline = true;
versionInfo.height = 80;
versionInfo.width = 600;
versionInfo.x = MainView.SCREEN_W - versionInfo.width;
versionInfo.y = MainView.SCREEN_H - 80;
versionInfo.selectable = false;
versionInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, null, true, null, null, null, null, "right");
versionInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, true, null, null, null, null, "right");
versionInfo.htmlText = kGAMECLASS.version + ", " + (CoC_Settings.debugBuild ? "Debug" : "Release") + " Build";
versionInfo.htmlText += "Original Game by Fenoxo\nGame Mod by Kitteh6660";
var websiteInfo:TextField = new TextField();
websiteInfo.name = "websiteInfo";
websiteInfo.height = 40;
websiteInfo.width = 200;
websiteInfo.x = Math.floor(MainView.SCREEN_W / 2) - (websiteInfo.width / 2);
websiteInfo.y = Math.floor(MainView.SCREEN_H / 2) + 260;
websiteInfo.selectable = false;
websiteInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 20, null, true, null, null, "www.fenoxo.com", null, "center");
websiteInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 20, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, true, null, null, "www.fenoxo.com", null, "center");
websiteInfo.htmlText = "<a href=\"http://www.fenoxo.com/\">www.fenoxo.com</a>";
for (var i:int = 0; i < mainMenuButtons.length; i++) {
var button:CoCButton = new CoCButton();
Expand All @@ -155,6 +161,16 @@ package classes
_mainMenu = mainMenuContent;
mainView.addElementAt(_mainMenu, 2);
}
private function updateMainMenuTextColours():void {
var elements:Array = ["revampLogo", "miniCredit", "websiteInfo", "versionInfo"];
for (var i:int = 0; i < elements.length; i++) {
var fmt:TextFormat = new TextFormat();
fmt.color = mainViewManager.isDarkText() ? 0xc0c0c0 : 0;
var tf:TextField = _mainMenu.getElementByName(elements[i]) as TextField;
tf.setTextFormat(fmt);
}

}
public function hideMainMenu():void {
if (_mainMenu !== null)
_mainMenu.visible = false;
Expand Down
2 changes: 1 addition & 1 deletion classes/classes/PlayerAppearance.as
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ package classes
case Ears.ECHIDNA: outputText(" Your [hair] makes it near-impossible to see the small, rounded openings that are your ears."); break;
case Ears.DEER: outputText(" The [hair] on your head parts around a pair of deer-like ears that grow up from your head."); break;
case Ears.WOLF: outputText(" A pair of wolf ears stick out from your head, parting your [hair] and remaining alert to your surroundings."); break;
case Ears.RED_PANDA: outputText(" Big, white furred, red-panda ears lie atop your head, keeping you well aware to your surroundings."); break;
case Ears.RED_PANDA: outputText(" Big, white furred, red-panda ears lie atop your head that part your [hair], keeping you well aware to your surroundings."); break;
//</mod>
default:
}
Expand Down
6 changes: 2 additions & 4 deletions classes/classes/Scenes/Camp.as
Original file line number Diff line number Diff line change
Expand Up @@ -1919,10 +1919,8 @@ public function wakeFromBadEnd():void {
inDungeon = false;
inRoomedDungeon = false;
inRoomedDungeonResume = null;
if (getGame().inCombat) {
combat.clearStatuses();
getGame().inCombat = false;
}
combat.clearStatuses();
getGame().inCombat = false;
//Restore stats
player.HP = player.maxHP();
player.fatigue = 0;
Expand Down

0 comments on commit bb0307d

Please sign in to comment.