Skip to content

Commit bb0307d

Browse files
committed
Dark theme main menu, hair descriptor with Red Panda ears, fix attempt for nightmare
Might should now get cleared properly. Fixes #571, closes #1021
1 parent baf6ee4 commit bb0307d

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

classes/classes/MainMenu.as

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ package classes
3333
button.disableIf(player.str <= 0, "Please start a new game or load an existing save file."); //Dirty checking, WHYYYYY?
3434
if (player.str > 0) button.hint("Get back to gameplay?");
3535
}
36+
updateMainMenuTextColours();
3637
_mainMenu.visible = true;
3738
}
3839
}
@@ -82,26 +83,29 @@ package classes
8283
width: 60
8384
});
8485
var revampLogo:TextField = new TextField();
86+
revampLogo.name = "revampLogo";
8587
revampLogo.height = 40;
8688
revampLogo.width = 210;
8789
revampLogo.x = Math.floor(MainView.SCREEN_W / 2) + 145;
8890
revampLogo.y = Math.floor(MainView.SCREEN_H / 2) - 25;
8991
revampLogo.selectable = false;
9092
revampLogo.embedFonts = true;
91-
revampLogo.defaultTextFormat = new TextFormat(CoCButton.ButtonLabelFontName, 20, null, null, null, null, null, null, "center");
93+
revampLogo.defaultTextFormat = new TextFormat(CoCButton.ButtonLabelFontName, 20, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, null, null, null, null, null, "center");
9294
revampLogo.htmlText = "With Revamp Mod!";
9395
var miniCredit:TextField = new TextField();
96+
miniCredit.name = "miniCredit";
9497
miniCredit.multiline = true;
9598
miniCredit.wordWrap = true;
9699
miniCredit.height = 80;
97100
miniCredit.width = 1000;
98101
miniCredit.x = Math.floor(MainView.SCREEN_W / 2) - (miniCredit.width / 2);
99102
miniCredit.y = Math.floor(MainView.SCREEN_H / 2) + 10;
100-
miniCredit.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, null, null, null, null, null, null, "center", null, null, null, -2);
103+
miniCredit.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, null, null, null, null, null, "center", null, null, null, -2);
101104
miniCredit.htmlText = "Created by Fenoxo, Game Mod by Kitteh6660\n";
102105
miniCredit.htmlText += "<b>Edited by:</b> Ashi, SoS, Prisoner416, Zeikfried, et al";
103106
miniCredit.htmlText += "<b>Open-source contributions by:</b> aimozg, Amygdala, Cmacleod42, Enterprise2001, Fake-Name, Gedan, Yoffy, et al";
104107
var disclaimerInfo:TextField = new TextField();
108+
disclaimerInfo.name = "disclaimerInfo";
105109
disclaimerInfo.multiline = true;
106110
disclaimerInfo.wordWrap = true;
107111
disclaimerInfo.height = disclaimerBackground.height;
@@ -114,22 +118,24 @@ package classes
114118
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";
115119
disclaimerInfo.htmlText += "<font color=\"dark red\"><b>You have been warned!</b></font>"
116120
var versionInfo:TextField = new TextField();
121+
versionInfo.name = "versionInfo";
117122
versionInfo.multiline = true;
118123
versionInfo.height = 80;
119124
versionInfo.width = 600;
120125
versionInfo.x = MainView.SCREEN_W - versionInfo.width;
121126
versionInfo.y = MainView.SCREEN_H - 80;
122127
versionInfo.selectable = false;
123-
versionInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, null, true, null, null, null, null, "right");
128+
versionInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 16, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, true, null, null, null, null, "right");
124129
versionInfo.htmlText = kGAMECLASS.version + ", " + (CoC_Settings.debugBuild ? "Debug" : "Release") + " Build";
125130
versionInfo.htmlText += "Original Game by Fenoxo\nGame Mod by Kitteh6660";
126131
var websiteInfo:TextField = new TextField();
132+
websiteInfo.name = "websiteInfo";
127133
websiteInfo.height = 40;
128134
websiteInfo.width = 200;
129135
websiteInfo.x = Math.floor(MainView.SCREEN_W / 2) - (websiteInfo.width / 2);
130136
websiteInfo.y = Math.floor(MainView.SCREEN_H / 2) + 260;
131137
websiteInfo.selectable = false;
132-
websiteInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 20, null, true, null, null, "www.fenoxo.com", null, "center");
138+
websiteInfo.defaultTextFormat = new TextFormat("Palatino Linotype, serif", 20, mainViewManager.isDarkText() ? 0xc0c0c0 : 0, true, null, null, "www.fenoxo.com", null, "center");
133139
websiteInfo.htmlText = "<a href=\"http://www.fenoxo.com/\">www.fenoxo.com</a>";
134140
for (var i:int = 0; i < mainMenuButtons.length; i++) {
135141
var button:CoCButton = new CoCButton();
@@ -155,6 +161,16 @@ package classes
155161
_mainMenu = mainMenuContent;
156162
mainView.addElementAt(_mainMenu, 2);
157163
}
164+
private function updateMainMenuTextColours():void {
165+
var elements:Array = ["revampLogo", "miniCredit", "websiteInfo", "versionInfo"];
166+
for (var i:int = 0; i < elements.length; i++) {
167+
var fmt:TextFormat = new TextFormat();
168+
fmt.color = mainViewManager.isDarkText() ? 0xc0c0c0 : 0;
169+
var tf:TextField = _mainMenu.getElementByName(elements[i]) as TextField;
170+
tf.setTextFormat(fmt);
171+
}
172+
173+
}
158174
public function hideMainMenu():void {
159175
if (_mainMenu !== null)
160176
_mainMenu.visible = false;

classes/classes/PlayerAppearance.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ package classes
366366
case Ears.ECHIDNA: outputText(" Your [hair] makes it near-impossible to see the small, rounded openings that are your ears."); break;
367367
case Ears.DEER: outputText(" The [hair] on your head parts around a pair of deer-like ears that grow up from your head."); break;
368368
case Ears.WOLF: outputText(" A pair of wolf ears stick out from your head, parting your [hair] and remaining alert to your surroundings."); break;
369-
case Ears.RED_PANDA: outputText(" Big, white furred, red-panda ears lie atop your head, keeping you well aware to your surroundings."); break;
369+
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;
370370
//</mod>
371371
default:
372372
}

classes/classes/Scenes/Camp.as

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,10 +1919,8 @@ public function wakeFromBadEnd():void {
19191919
inDungeon = false;
19201920
inRoomedDungeon = false;
19211921
inRoomedDungeonResume = null;
1922-
if (getGame().inCombat) {
1923-
combat.clearStatuses();
1924-
getGame().inCombat = false;
1925-
}
1922+
combat.clearStatuses();
1923+
getGame().inCombat = false;
19261924
//Restore stats
19271925
player.HP = player.maxHP();
19281926
player.fatigue = 0;

0 commit comments

Comments
 (0)