Skip to content

Commit

Permalink
- Add possibility to use the default dark blue interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkblk committed Dec 13, 2014
1 parent 0f16ef6 commit 97d702b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 18 deletions.
6 changes: 3 additions & 3 deletions checker/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ DONE -> Improved updater progress
DONE -> Updater: Create a "updating" file at start then delete it at the end. The launcher should check if the file is present, and then relaunch the updater again.

## 1.02

DONE -> Force installer to make a folder named "Rise of Mankind - A New Dawn" and to decompress into "Mods/" folder + Check the folder name at start
- Possibility to use the default color (!?)
- GUI to exclude files
DONE - Possibility to use the default color (!?)
DONE -> GUI to exclude files
- Drop support for Sinhala (unmaintened and less than 1% translated)

## Pending
? - Fix the weird updating loop !?
Expand Down
17 changes: 9 additions & 8 deletions checker/f_civ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int readColorsCounter()
QDomElement value_el = read.firstChildElement("Civ4ModularLoadControls").firstChildElement("ConfigurationInfos").firstChildElement("ConfigurationInfo").firstChildElement("Modules").firstChildElement("Module").toElement();

// Loop
int counter = -1;
int counter = 0;
for(;; value_el=value_el.nextSiblingElement() ) {

QString bLoad = value_el.firstChildElement("bLoad").text();
Expand Down Expand Up @@ -152,18 +152,19 @@ bool setColors(QString color)
// Reset all values
for(color_element ; !color_element.isNull(); color_element=color_element.nextSiblingElement() ) {
color_element.firstChildElement("bLoad").firstChild().setNodeValue("0");
}
}

color_element = read.firstChildElement("Civ4ModularLoadControls").firstChildElement("ConfigurationInfos").firstChildElement("ConfigurationInfo").firstChildElement("Modules").firstChildElement("Module").toElement();
if(color != "default"){
color_element = read.firstChildElement("Civ4ModularLoadControls").firstChildElement("ConfigurationInfos").firstChildElement("ConfigurationInfo").firstChildElement("Modules").firstChildElement("Module").toElement();

for(color_element ; !color_element.isNull(); color_element=color_element.nextSiblingElement() ) {
QString txtValue = color_element.firstChildElement("Directory").firstChild().nodeValue();
if (txtValue == color) {
color_element.firstChildElement("bLoad").firstChild().setNodeValue("1");
for(color_element ; !color_element.isNull(); color_element=color_element.nextSiblingElement() ) {
QString txtValue = color_element.firstChildElement("Directory").firstChild().nodeValue();
if (txtValue == color) {
color_element.firstChildElement("bLoad").firstChild().setNodeValue("1");
}
}
}


// Save content back to the file
if (!file.open(QIODevice::Truncate | QIODevice::WriteOnly)) {
return 0;
Expand Down
18 changes: 11 additions & 7 deletions checker/w_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,38 @@ void w_options::on_colorBox_currentIndexChanged(int index)
switch (index)
{
case 0:
colorUI = "Black UI";
colorUI = "default";
break;

case 1:
colorUI = "Coal UI";
colorUI = "Black UI";
break;

case 2:
colorUI = "Dark Red UI";
colorUI = "Coal UI";
break;

case 3:
colorUI = "Forest UI";
colorUI = "Dark Red UI";
break;

case 4:
colorUI = "Purple UI";
colorUI = "Forest UI";
break;

case 5:
colorUI = "Red UI";
colorUI = "Purple UI";
break;

case 6:
colorUI = "Silver UI";
colorUI = "Red UI";
break;

case 7:
colorUI = "Silver UI";
break;

case 8:
colorUI = "Cerulean UI";
break;
}
Expand Down
5 changes: 5 additions & 0 deletions checker/w_options.ui
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
<height>25</height>
</size>
</property>
<item>
<property name="text">
<string>Dark blue (default)</string>
</property>
</item>
<item>
<property name="text">
<string>Black</string>
Expand Down

0 comments on commit 97d702b

Please sign in to comment.