Small fixes
- Fixed Program Object not sending queued events correctly - Fixed size of error window on smaller screens - Fixed size of debug window on smaller screens
This commit is contained in:
@@ -498,7 +498,7 @@ return function(name, basalt)
|
||||
if (curProcess ~= nil) then
|
||||
if not (curProcess:isDead()) then
|
||||
if not (paused) then
|
||||
self:injectEvents(queuedEvent)
|
||||
self:injectEvents(table.unpack(queuedEvent))
|
||||
queuedEvent = {}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ return {
|
||||
if(frame==nil)then
|
||||
local mainFrame = basalt.getMainFrame()
|
||||
local w, h = mainFrame:getSize()
|
||||
frame = mainFrame:addMovableFrame("basaltErrorFrame"):setSize(w-20, h-10):setBackground(colors.lightGray):setForeground(colors.white):setZIndex(500)
|
||||
frame = mainFrame:addMovableFrame("basaltErrorFrame"):setSize(w-10, h-4):setBackground(colors.lightGray):setForeground(colors.white):setZIndex(500)
|
||||
frame:addPane("titleBackground"):setSize(w, 1):setPosition(1, 1):setBackground(colors.black):setForeground(colors.white)
|
||||
frame:setPosition(w/2-frame:getWidth()/2, h/2-frame:getHeight()/2):setBorder(colors.black)
|
||||
frame:addLabel("title"):setText("Basalt Unexpected Error"):setPosition(2, 1):setBackground(colors.black):setForeground(colors.white)
|
||||
@@ -31,7 +31,7 @@ return {
|
||||
end)
|
||||
end
|
||||
frame:show()
|
||||
errorList:addItem("--------------------------------------------")
|
||||
errorList:addItem(("-"):rep(frame:getWidth()-2))
|
||||
local err = wrapText(err, frame:getWidth()-2)
|
||||
for i=1, #err do
|
||||
errorList:addItem(err[i])
|
||||
|
||||
@@ -15,17 +15,16 @@ return {
|
||||
local maxW = 99
|
||||
local maxH = 99
|
||||
local w, h = mainFrame:getSize()
|
||||
debugFrame = mainFrame:addMovableFrame("basaltDebuggingFrame"):setSize(w-20, h-10):setBackground(colors.lightGray):setForeground(colors.white):setZIndex(100):hide()
|
||||
debugFrame = mainFrame:addMovableFrame("basaltDebuggingFrame"):setSize(w-20, h-10):setBackground(colors.gray):setForeground(colors.white):setZIndex(100):hide()
|
||||
debugFrame:addPane():setSize("parent.w", 1):setPosition(1, 1):setBackground(colors.black):setForeground(colors.white)
|
||||
debugFrame:setPosition(-w, h/2-debugFrame:getHeight()/2):setBorder(colors.black)
|
||||
local resizeButton = debugFrame:addButton()
|
||||
:setPosition("parent.w", "parent.h")
|
||||
:setSize(1, 1)
|
||||
:setText("\133")
|
||||
:setForeground(colors.lightGray)
|
||||
:setForeground(colors.gray)
|
||||
:setBackground(colors.black)
|
||||
:onClick(function(self, event, btn, xOffset, yOffset)
|
||||
end)
|
||||
:onClick(function() end)
|
||||
:onDrag(function(self, event, btn, xOffset, yOffset)
|
||||
local w, h = debugFrame:getSize()
|
||||
local wOff, hOff = w, h
|
||||
@@ -38,10 +37,15 @@ return {
|
||||
debugFrame:setSize(wOff, hOff)
|
||||
end)
|
||||
|
||||
debugExitButton = debugFrame:addButton():setText("Exit"):setPosition("parent.w - 6", 1):setSize(7, 1):setBackground(colors.red):setForeground(colors.white):onClick(function()
|
||||
debugExitButton = debugFrame:addButton():setText("Close"):setPosition("parent.w - 6", 1):setSize(7, 1):setBackground(colors.red):setForeground(colors.white):onClick(function()
|
||||
debugFrame:animatePosition(-w, h/2-debugFrame:getHeight()/2, 0.5)
|
||||
end)
|
||||
debugList = debugFrame:addList():setSize("parent.w - 2", "parent.h - 3"):setPosition(2, 3):setBackground(colors.lightGray):setForeground(colors.white):setSelectionColor(colors.lightGray, colors.gray)
|
||||
debugList = debugFrame:addList()
|
||||
:setSize("parent.w - 2", "parent.h - 3")
|
||||
:setPosition(2, 3)
|
||||
:setBackground(colors.gray)
|
||||
:setForeground(colors.white)
|
||||
:setSelectionColor(colors.gray, colors.white)
|
||||
if(debugLabel==nil)then
|
||||
debugLabel = mainFrame:addLabel()
|
||||
:setPosition(1, "parent.h")
|
||||
|
||||
Reference in New Issue
Block a user