From b462c61d4c2812af67e85779e9edc7e096a8d40b Mon Sep 17 00:00:00 2001 From: FAKEiceylime Date: Fri, 5 Jun 2026 04:05:19 -0700 Subject: [PATCH] I made icon and veil the,e... durr --- conf.lua | 16 ++++++++-------- durrrrrrrrrr.png | Bin 0 -> 761 bytes editor/ui.lua | 36 +++++++++++++++++++++++++----------- lovedd installation.bat | 22 ++++++++++++++++++++++ main.lua | 11 ++++++++--- 5 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 durrrrrrrrrr.png create mode 100644 lovedd installation.bat diff --git a/conf.lua b/conf.lua index 30aa13b..09562c5 100644 --- a/conf.lua +++ b/conf.lua @@ -1,11 +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 + 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/durrrrrrrrrr.png b/durrrrrrrrrr.png new file mode 100644 index 0000000000000000000000000000000000000000..11e45c885c7a562ba2415723ec923bd1f50ebed5 GIT binary patch literal 761 zcmVPx%vq?ljRCt{2nmba%Fc5}iCLD!^8FGN6@eMcy1qBowgaQf*PQeY_kOL$$G#rJ@ zn1U!HZzSzQE6GgscZucI?k8!rvTaOLQ&ZC!tE@|*U>C!sMjO^pB zv+a-AUjSyP!-?2Vih#B~C)S2IdbahFyIChE~3^g6G&~+RX#NmFuuHXv}t^ zT?--4E}$KBM%zUz!8xh{sO>;)H3069IXvSptu_N{J5XBns7dXMwW>;A#S( z#1|QJQ=0*`9jGl80B_IV8fJB`%U`{|t0F1&c$e~n_ zzFkf&36>b;9FU{?zV=dxY4P}lw%Na2i$RBK9CZLz91xV?t?m}LB7Z~xjM77r7z|GE zR$K_N3YS#+YCb7~FmeOH%KPNcwvjK z;QA*jgysrC;+MD*)PevLnq;5vmYYuMPtx0A+iB_!AuVou3_I&_! rCg*E5P2kx+lZ!cdj_)9wnr5nBK9fp*u}BmA00000NkvXXu0mjfd*M}0 literal 0 HcmV?d00001 diff --git a/editor/ui.lua b/editor/ui.lua index 08e679e..2e9ea77 100644 --- a/editor/ui.lua +++ b/editor/ui.lua @@ -12,6 +12,20 @@ ui.theme = { active = {0.20, 0.40, 0.75}, } +ui.theme2 = { + bg = {0.5, 0, 0}, + panel = {0.25, 0, 0}, + border = {1, 0, 0}, + borderwidth = 3, + text = {0, 0, 1}, + text_dim = {1, 0, 0}, + accent = {0.7, 0, 0}, + hover = {1, 0, 0}, + active = {1, 0, 0}, +} + +ui.activeTheme = ui.theme + -- per-frame state (most/all gets reset if i remember) ui._wasDown = false ui._focused = nil @@ -23,10 +37,10 @@ ui._hoverConsumed = false -- so it sets hovered to the correct thing -- draws a basic bordered panel function ui._draw_panel(e) - love.graphics.setColor(ui.theme.panel) + love.graphics.setColor(ui.activeTheme.panel) love.graphics.rectangle("fill", e.x, e.y, e.w, e.h) - love.graphics.setColor(ui.theme.border) - love.graphics.setLineWidth(ui.theme.borderwidth) + love.graphics.setColor(ui.activeTheme.border) + love.graphics.setLineWidth(ui.activeTheme.borderwidth) love.graphics.rectangle("line", e.x, e.y, e.w, e.h) end @@ -38,7 +52,7 @@ function ui._draw_text(e) local startY = e.y + (e.h - totalHeight) / 2 love.graphics.setScissor(e.x, e.y, e.w, e.h) -- clip to box bounds - love.graphics.setColor(ui.theme.text) + love.graphics.setColor(ui.activeTheme.text) love.graphics.printf(e.text, e.x, startY, e.w, "center") love.graphics.setScissor() -- reset clip end @@ -48,10 +62,10 @@ function ui._draw_button(e) local mx, my = love.mouse.getPosition() local hovered = not ui._hoverConsumed and mx > e.x and mx < e.x + e.w and my > e.y and my < e.y + e.h - love.graphics.setColor(e._hovered and ui.theme.hover or ui.theme.panel) + love.graphics.setColor(e._hovered and ui.activeTheme.hover or ui.activeTheme.panel) love.graphics.rectangle("fill", e.x, e.y, e.w, e.h) - love.graphics.setColor(ui.theme.border) - love.graphics.setLineWidth(ui.theme.borderwidth) + love.graphics.setColor(ui.activeTheme.border) + love.graphics.setLineWidth(ui.activeTheme.borderwidth) love.graphics.rectangle("line", e.x, e.y, e.w, e.h) ui._draw_text(e) end @@ -62,17 +76,17 @@ function ui._draw_textInput(e) local text = ui._inputs[e.placeholder] or "" if focused then - love.graphics.setColor(ui.theme.panel) + love.graphics.setColor(ui.activeTheme.panel) love.graphics.rectangle("fill", e.x, e.y, e.w, e.h) - love.graphics.setColor(ui.theme.accent) - love.graphics.setLineWidth(ui.theme.borderwidth) + love.graphics.setColor(ui.activeTheme.accent) + love.graphics.setLineWidth(ui.activeTheme.borderwidth) love.graphics.rectangle("line", e.x, e.y, e.w, e.h) if text == "" then -- show dimmed placeholder text when empty local font = love.graphics.getFont() local startY = e.y + (e.h - font:getHeight()) / 2 - love.graphics.setColor(ui.theme.text_dim) + love.graphics.setColor(ui.activeTheme.text_dim) love.graphics.printf(e.placeholder, e.x + 4, startY, e.w - 8, "left") else ui._draw_text({ x=e.x, y=e.y, w=e.w, h=e.h, text=text }) diff --git a/lovedd installation.bat b/lovedd installation.bat new file mode 100644 index 0000000..632f3e0 --- /dev/null +++ b/lovedd installation.bat @@ -0,0 +1,22 @@ +@echo off +echo installing Love2D 11.5 + +set DOWNLOAD_URL=https://github.com/love2d/love/releases/download/11.5/love-11.5-win64.exe +set INSTALLER=%TEMP%\love-installer.exe + +echo download started +curl -L -o "%INSTALLER%" "%DOWNLOAD_URL%" + +if %errorlevel% neq 0 ( + echo failed to install + pause + exit /b 1 +) + +echo running installer... +"%INSTALLER%" + +setx PATH "%PATH%;C:\Program Files\LOVE" + +echo i think it installed idk +pause \ No newline at end of file diff --git a/main.lua b/main.lua index 8a3f7af..6ff6edc 100644 --- a/main.lua +++ b/main.lua @@ -1,9 +1,13 @@ -- ctrl+shift+b for launching game local ui = require("editor.ui") +local OBVIOUSYLYYYYY = 0 + function love.load() - + local imagedata = love.image.newImageData("durrrrrrrrrr.png") + print(imagedata) + love.window.setIcon(imagedata) end function love.textinput(t) @@ -23,8 +27,9 @@ end function love.draw() ui.panel(50, 50, 50, 50) - ui.button(100, 200, 100, 100, "hello world", function() - print("clicked!") + ui.button(100, 200, 100, 100, OBVIOUSYLYYYYY, function() + OBVIOUSYLYYYYY = OBVIOUSYLYYYYY + 1 + print(OBVIOUSYLYYYYY) end) ui.textInput(50, 400, 100, 100, "textInput")