Tweak some colors
This commit is contained in:
parent
bdc3ccaad7
commit
0e3867eb68
4 changed files with 14 additions and 14 deletions
|
@ -32,7 +32,3 @@ pool.onRenderForm(function(form)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
pool.run()
|
pool.run()
|
||||||
|
|
||||||
function on_post_load()
|
|
||||||
print("HELLO LOAD")
|
|
||||||
end
|
|
||||||
|
|
|
@ -50,15 +50,15 @@ local guiHeight = 0
|
||||||
local guiWidth = 0
|
local guiWidth = 0
|
||||||
runner.onRenderForm(function(form)
|
runner.onRenderForm(function(form)
|
||||||
guiWidth, guiHeight = gui.resolution()
|
guiWidth, guiHeight = gui.resolution()
|
||||||
gui.left_gap(500)
|
gui.left_gap(0)
|
||||||
gui.top_gap(0)
|
gui.top_gap(0)
|
||||||
gui.bottom_gap(0)
|
gui.bottom_gap(0)
|
||||||
gui.right_gap(0)
|
gui.right_gap(0)
|
||||||
form:draw(-500, 0)
|
form:draw(0, 0)
|
||||||
|
|
||||||
if statusLine ~= nil then
|
if statusLine ~= nil then
|
||||||
gui.rectangle(-500, guiHeight - 20, 0, 20, 1, 0x00000000, statusColor)
|
gui.rectangle(0, guiHeight - 20, 0, 20, 1, 0x00000000, statusColor)
|
||||||
gui.text(-500, guiHeight - 20, statusLine, 0x00000000)
|
gui.text(0, guiHeight - 20, statusLine, 0x00000000)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- This isn't passed up to the parent since we're handling the GUI.
|
-- This isn't passed up to the parent since we're handling the GUI.
|
||||||
|
|
10
runner.lua
10
runner.lua
|
@ -25,7 +25,7 @@ local genomeCtx = gui.renderctx.new(470, 200)
|
||||||
local function displayGenome(genome)
|
local function displayGenome(genome)
|
||||||
genomeCtx:set()
|
genomeCtx:set()
|
||||||
genomeCtx:clear()
|
genomeCtx:clear()
|
||||||
gui.solidrectangle(0, 0, 470, 200, 0x00606060)
|
gui.solidrectangle(0, 0, 470, 200, 0x99606060)
|
||||||
local network = genome.network
|
local network = genome.network
|
||||||
local cells = {}
|
local cells = {}
|
||||||
local i = 1
|
local i = 1
|
||||||
|
@ -60,7 +60,7 @@ local function displayGenome(genome)
|
||||||
if cell.value > 0 then
|
if cell.value > 0 then
|
||||||
color = 0x000000FF
|
color = 0x000000FF
|
||||||
else
|
else
|
||||||
color = 0x00000000
|
color = 0x00ffffff
|
||||||
end
|
end
|
||||||
gui.text(403, 10+14*o, config.ButtonNames[o], color, 0xff000000)
|
gui.text(403, 10+14*o, config.ButtonNames[o], color, 0xff000000)
|
||||||
::continue::
|
::continue::
|
||||||
|
@ -179,7 +179,7 @@ local function displayGenome(genome)
|
||||||
|
|
||||||
local pos = 100
|
local pos = 100
|
||||||
for mutation,rate in pairs(genome.mutationRates) do
|
for mutation,rate in pairs(genome.mutationRates) do
|
||||||
gui.text(100, pos, mutation .. ": " .. rate, 0x00000000, 0xff000000)
|
gui.text(100, pos, mutation .. ": " .. rate, 0x00ffffff, 0xff000000)
|
||||||
|
|
||||||
pos = pos + 14
|
pos = pos + 14
|
||||||
end
|
end
|
||||||
|
@ -203,7 +203,7 @@ function displayButtons()
|
||||||
buttonCtx:set()
|
buttonCtx:set()
|
||||||
buttonCtx:clear()
|
buttonCtx:clear()
|
||||||
|
|
||||||
gui.rectangle(0, 0, 500, 70, 1, 0x000000000, 0x00990099)
|
gui.rectangle(0, 0, 500, 70, 1, 0x000000000, 0x33990099)
|
||||||
local startStop = ""
|
local startStop = ""
|
||||||
-- FIXME this won't work I think???
|
-- FIXME this won't work I think???
|
||||||
if config.Running then
|
if config.Running then
|
||||||
|
@ -253,7 +253,7 @@ function displayForm(_M)
|
||||||
|
|
||||||
formCtx:set()
|
formCtx:set()
|
||||||
formCtx:clear()
|
formCtx:clear()
|
||||||
gui.rectangle(0, 0, 500, guiHeight, 1, 0x00ffffff, 0x00000000)
|
gui.rectangle(0, 0, 500, guiHeight, 1, 0x00ffffff, 0xbb000000)
|
||||||
--gui.circle(game.screenX-84, game.screenY-84, 192 / 2, 1, 0x50000000)
|
--gui.circle(game.screenX-84, game.screenY-84, 192 / 2, 1, 0x50000000)
|
||||||
|
|
||||||
gui.text(5, 30, "Timeout: " .. _M.timeout)
|
gui.text(5, 30, "Timeout: " .. _M.timeout)
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
#ARGS=("--lua=$SCRIPT_DIR/neat-donk.lua")
|
||||||
|
ARGS=()
|
||||||
PORT=5309
|
PORT=5309
|
||||||
xpra start --bind-tcp=127.0.0.1:$PORT --html=on --start-child="lsnes --lua=$SCRIPT_DIR/neat-donk.lua" --exit-with-child=yes --start-new-commands=no
|
xpra start --bind-tcp=127.0.0.1:$PORT --html=on \
|
||||||
|
--start-child="lsnes ${ARGS[*]}" \
|
||||||
|
--exit-with-child=yes --start-new-commands=no
|
||||||
while ! nc -z localhost $PORT ; do
|
while ! nc -z localhost $PORT ; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue