implemented daily double, adding/removing players, fixed font sizes, completed multiple choice

This commit is contained in:
2026-05-10 14:29:56 -07:00
parent cd0b9337fa
commit c3496cfdbe
30 changed files with 610 additions and 798 deletions
+12 -11
View File
@@ -1185,6 +1185,7 @@ function gui:newTextBox(txt, x, y, w, h, sx, sy, sw, sh)
c.cur_pos = 0
c.selection = {0, 0}
c.blink = true
function c:getUniques()
return gui.getUniques(c, {
@@ -1254,7 +1255,7 @@ end
local function textBoxThread()
updater:newThread("Textbox Handler", function()
local check = function() return object_focus:hasType(box) end
local check = function() return object_focus:hasType(box) and object_focus.blink end
while true do
-- Do nothing if we aren't dealing with a textbox
thread.hold(check)
@@ -1648,21 +1649,21 @@ local drawtypes = {
love.graphics.setColor(child.textColor[1], child.textColor[2],
child.textColor[3], child.textVisibility)
love.graphics.setFont(child.font)
if child.align == gui.ALIGN_LEFT then
child.adjust = 0
elseif child.align == gui.ALIGN_CENTER then
local fw = child.font:getWidth(child.text)
child.adjust = (w - fw) / 2
elseif child.align == gui.ALIGN_RIGHT then
local fw = child.font:getWidth(child.text)
child.adjust = w - fw - 4
end
-- if child.align == gui.ALIGN_LEFT then
-- child.adjust = 0
-- elseif child.align == gui.ALIGN_CENTER then
-- local fw = child.font:getWidth(child.text)
-- child.adjust = (w - fw) / 2
-- elseif child.align == gui.ALIGN_RIGHT then
-- local fw = child.font:getWidth(child.text)
-- child.adjust = w - fw - 4
-- end
local mul = 1
if (child.formFactor == gui.FORM_ARC) or (child.formFactor == gui.FORM_CIRCLE) then
mul = 2
end
love.graphics.printf(child.text, child.adjust + x + child.textOffsetX,
y + child.textOffsetY, w*mul, "left", child.rotation,
y + child.textOffsetY, w*mul, ({[0]="center","left", "right", "justify"})[child.align], child.rotation,
child.textScaleX, child.textScaleY, 0, 0,
child.textShearingFactorX,
child.textShearingFactorY)