Tweak some colors

This commit is contained in:
Empathic Qubit 2021-04-24 06:00:28 -04:00
parent bdc3ccaad7
commit 0e3867eb68
4 changed files with 14 additions and 14 deletions

View file

@ -32,7 +32,3 @@ pool.onRenderForm(function(form)
end
end)
pool.run()
function on_post_load()
print("HELLO LOAD")
end

View file

@ -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.

View file

@ -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)

View file

@ -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