diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cad84f0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + "Lua.workspace.library": [ + "${addons}/love2d/module/library" + ], + "Lua.runtime.version": "LuaJIT", + "Lua.runtime.special": { + "love.filesystem.load": "loadfile" + }, + "Lua.workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/conf.lua b/conf.lua new file mode 100644 index 0000000..30aa13b --- /dev/null +++ b/conf.lua @@ -0,0 +1,11 @@ +-- conf.lua +function love.conf(t) + t.window.title = "engine" + t.window.width = 1024 + t.window.height = 680 + t.window.resizable = true + t.window.minwidth = 640 + t.window.minheight = 480 + t.version = "11.4" + t.console = true -- shows console output on Windows +end \ No newline at end of file diff --git a/editor/ui.lua b/editor/ui.lua new file mode 100644 index 0000000..5847f9b --- /dev/null +++ b/editor/ui.lua @@ -0,0 +1,27 @@ +local ui = {} + +ui.theme = { + bg = {0.13, 0.13, 0.14}, + panel = {0.17, 0.17, 0.19}, + border = {0.28, 0.28, 0.30}, + borderwidth = 3, + text = {0.90, 0.90, 0.90}, + text_dim = {0.50, 0.50, 0.55}, + accent = {0.27, 0.52, 0.90}, + hover = {0.22, 0.22, 0.25}, + active = {0.20, 0.40, 0.75}, +} + +function ui.panel(x, y, w, h) + love.graphics.setColor(ui.theme.panel) + love.graphics.rectangle("fill", x, y, w, h) + love.graphics.setColor(ui.theme.border) + love.graphics.setLineWidth(ui.theme.borderwidth) + love.graphics.rectangle("line", x, y, w, h) +end + +function ui.button() + +end + +return ui \ No newline at end of file diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..5b3175e --- /dev/null +++ b/main.lua @@ -0,0 +1,13 @@ +local ui = require("editor.ui") + +function love.load() + +end + +function love.update(dt) + +end + +function love.draw() + ui.panel(50,50,50,50) +end \ No newline at end of file diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..c92d7b0 --- /dev/null +++ b/run.bat @@ -0,0 +1,2 @@ +@echo off +love . diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..7c80ea6 --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +love .