From 0e3867eb682c95e8986f275f1aba1876c5a35fb6 Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Sat, 24 Apr 2021 06:00:28 -0400 Subject: [PATCH] Tweak some colors --- neat-donk.lua | 4 ---- runner-process.lua | 8 ++++---- runner.lua | 10 +++++----- xpra-run.sh | 6 +++++- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/neat-donk.lua b/neat-donk.lua index 0a778b6..e927178 100644 --- a/neat-donk.lua +++ b/neat-donk.lua @@ -32,7 +32,3 @@ pool.onRenderForm(function(form) end end) pool.run() - -function on_post_load() - print("HELLO LOAD") -end diff --git a/runner-process.lua b/runner-process.lua index 2579b1e..488f871 100644 --- a/runner-process.lua +++ b/runner-process.lua @@ -50,15 +50,15 @@ local guiHeight = 0 local guiWidth = 0 runner.onRenderForm(function(form) guiWidth, guiHeight = gui.resolution() - gui.left_gap(500) + gui.left_gap(0) gui.top_gap(0) gui.bottom_gap(0) gui.right_gap(0) - form:draw(-500, 0) + form:draw(0, 0) if statusLine ~= nil then - gui.rectangle(-500, guiHeight - 20, 0, 20, 1, 0x00000000, statusColor) - gui.text(-500, guiHeight - 20, statusLine, 0x00000000) + gui.rectangle(0, guiHeight - 20, 0, 20, 1, 0x00000000, statusColor) + gui.text(0, guiHeight - 20, statusLine, 0x00000000) end -- This isn't passed up to the parent since we're handling the GUI. diff --git a/runner.lua b/runner.lua index 4ada7ef..5d4ca6b 100644 --- a/runner.lua +++ b/runner.lua @@ -25,7 +25,7 @@ local genomeCtx = gui.renderctx.new(470, 200) local function displayGenome(genome) genomeCtx:set() genomeCtx:clear() - gui.solidrectangle(0, 0, 470, 200, 0x00606060) + gui.solidrectangle(0, 0, 470, 200, 0x99606060) local network = genome.network local cells = {} local i = 1 @@ -60,7 +60,7 @@ local function displayGenome(genome) if cell.value > 0 then color = 0x000000FF else - color = 0x00000000 + color = 0x00ffffff end gui.text(403, 10+14*o, config.ButtonNames[o], color, 0xff000000) ::continue:: @@ -179,7 +179,7 @@ local function displayGenome(genome) local pos = 100 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 end @@ -203,7 +203,7 @@ function displayButtons() buttonCtx:set() buttonCtx:clear() - gui.rectangle(0, 0, 500, 70, 1, 0x000000000, 0x00990099) + gui.rectangle(0, 0, 500, 70, 1, 0x000000000, 0x33990099) local startStop = "" -- FIXME this won't work I think??? if config.Running then @@ -253,7 +253,7 @@ function displayForm(_M) formCtx:set() 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.text(5, 30, "Timeout: " .. _M.timeout) diff --git a/xpra-run.sh b/xpra-run.sh index 34782f6..5593749 100755 --- a/xpra-run.sh +++ b/xpra-run.sh @@ -1,7 +1,11 @@ #! /bin/bash SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +#ARGS=("--lua=$SCRIPT_DIR/neat-donk.lua") +ARGS=() 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 sleep 0.1 done