Mercurial > hg > batmud > alchtool
changeset 40:bb335b891605
Various improvements.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Mar 2011 13:58:48 +0200 |
parents | 15a25bb0a694 |
children | ebd29544477c |
files | alch.css index.php |
diffstat | 2 files changed, 47 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/alch.css Tue Mar 22 09:45:35 2011 +0200 +++ b/alch.css Tue Mar 22 13:58:48 2011 +0200 @@ -3,7 +3,7 @@ background: black; color: white; font-family: arial, helvetica; - font-size: 10px; + font-size: 12pt; } a { @@ -17,17 +17,14 @@ } -th { - font-size: 10px; -} - th.noframe { border: 0px; } -td { font-size: 8px; text-align: center; } -td.tab { background: #000; font-size: 10px; } -td.atab { background: #888; font-size: 10px; } +table.mixtable { font-size: 10pt; } +td { text-align: center; } +td.tab { background: #000; font-size: 10pt; } +td.atab { background: #888; font-size: 10pt; } td.nomatch { background: #888; border: solid #aaa 1px; } td.nomark { background: #888; } @@ -40,8 +37,34 @@ td.pairnoclose { background: #008; border: solid #00a 1px; } td.pairclose { background: #008; border: solid #00a 1px; } +table.potlist { font-size: 12pt; } table.potlist { width: 65%; } table.potlist th { background: #777; } table.potlist tr:hover td { background: #060; } table.potlist tr:hover th { background: #080; } +#info { + padding-bottom: 5pt; + color: #0e0; +} + +#controls { + padding-top: 5pt; + padding-bottom: 5pt; + background: #555; +} + +#controls a { + color: yellow; +} + +#legend { + background: black; + position: absolute; + right: 1em; + bottom: 1em; + font-size: 8pt; + padding: 2pt; + margin: 5pt; +} +
--- a/index.php Tue Mar 22 09:45:35 2011 +0200 +++ b/index.php Tue Mar 22 13:58:48 2011 +0200 @@ -15,10 +15,10 @@ } $dbModes = array( - "min" => array("Mineral", 0), - "org" => array("Organ", 1), - "herb" => array("Herb", 2), - "list" => array("Potion list", 3), + "min" => array("Mineral", 0, "minerals"), + "org" => array("Organ", 1, "organs"), + "herb" => array("Herb", 2, "herbs"), + "list" => array("Potion list", 3, "potions"), ); $dbNames = array( @@ -175,7 +175,7 @@ $div = $max / 2; // Print selection for primary key - echo "<table border=\"1\" cellspacing=\"0\">\n"; + echo "<table class=\"seltable\" border=\"1\" cellspacing=\"0\">\n"; $n = 0; foreach ($pdata as $key => $val) { if ($n == 0) echo " <tr>\n"; @@ -268,6 +268,7 @@ <link href="alch.css" title="compact" rel="stylesheet" type="text/css"> </head> <body> +<div id="info"> <? alch_matrix_clear(); @@ -347,10 +348,11 @@ for ($z = 0; $z < $dbDims[2]; $z++) $results[$db[$x][$y][$z][0]]++; -echo $results["!"]." found potions, ". - $results["?"]." active partial matches, ". - $results["-"]." combinations eliminated, ". - $results["."]." combinations untested.<br />\n"; +echo "<b>".$results["!"]."</b> found potions, ". + "<b>".$results["?"]."</b> active partial matches, ". + "<b>".$results["-"]."</b> combinations eliminated, ". + "<b>".$results["."]."</b> combinations untested.\n". + "</div>\n"; function printItem($x, $y, $z, $s, &$index) @@ -373,11 +375,10 @@ printItem($x, $y, $z, substr($s, 1), $index); } -?> -<p> -Change index key to [<a href="?org=0">organs</a>] [<a href="?min=0">minerals</a>] [<a href="?herb=0">herbs</a>] [<a href="?list">Potion list</a>] -</p> -<? +echo "<div id=\"controls\">Change index key to "; +foreach ($dbModes as $id => $data) + echo "[<a href=\"?".$id."=0\">".$data[2]."</a>] "; +echo "</div>\n"; if ($mode == "list") { @@ -435,7 +436,7 @@ alch_matrix_print($mode, $active); ?> -<table border="1" cellspacing="1"> +<table id="legend" border="1" cellspacing="1"> <tr><th colspan="2" class="noframe">Legend</th></tr> <tr><td width="10%" class="notres"> </td><th class="noframe">Not researched yet</th></tr> <tr><td class="nomatch">-</td><th class="noframe">No match</th></tr>