https://forums.coronalabs.com/topic/69466-edit-debug-console-font-size-and-colour/
I saw this post for changing font size and color, but it is for Mac only, I was wondering when we will be able to do it for Windows too.
Thank you
https://forums.coronalabs.com/topic/69466-edit-debug-console-font-size-and-colour/
I saw this post for changing font size and color, but it is for Mac only, I was wondering when we will be able to do it for Windows too.
Thank you
That’s not a feature that’s high on our list of things to do. This honestly would be a great addition for programmers interested in contributing to Corona’s core code since it’s now open source!
PS and welcome to our wonderful Corona community!
Rob
A bit off topic but: I have my own “console” running on top of my app in its own displayGroup, and I have to say this works really well for me:
I can choose which message I print and which I don’t want to see
I can clear the debug screen easily
I can mix permanently displayed info (like texture memory usage) with temporary info (line statements) etc…
I can display my info in a variety of forms
All this running in my device display
I know this only touches upon your question very indirectly, but if you’re looking for “better” console functionality, it’s worth looking into rolling your own…
Sounds very interesting.
Thanks for the info!
If you want, feel free to use my code:
-------------------------- -- appDebuggerClass.lua -- -------------------------- local appDebuggerClass = {} appDebuggerClass.new = function(super, targetDisplayGroup) self = {} self.type = "appDebugger" self.super = super -- super is of type appEngine (game or editor) self.mainGroup = display.newGroup() self.mainGroup.name = "appDebugger mainGroup named inside appDebugger class" self.mainGroup.alpha = .25 self.currentVerticalPosition = 16 self.fontSize = 32 self.lineHeight = 32 self.addLine = function(lineText) local lineOptions = { parent = self.mainGroup, text = lineText, x = 16, y = self.currentVerticalPosition, font = native.systemFontBold, fontSize = self.fontSize, align = "left" } local textLine = display.newText(lineOptions) textLine.anchorY = 0 textLine.anchorX = 0 --textLine:setFillColor(0,0,0) -- black text! textLine:setFillColor(0,1,0) -- green text! if self.currentVerticalPosition \< 1400 then self.currentVerticalPosition = self.currentVerticalPosition + self.lineHeight else self.currentVerticalPosition = self.currentVerticalPosition + self.lineHeight self.mainGroup.y = self.mainGroup.y - self.lineHeight end end -- self.addTitle() self.clearDebugger = function() for i = self.mainGroup.numChildren, 1, -1 do self.mainGroup[i]:removeSelf() end self.mainGroup.y = 0 self.currentVerticalPosition = 16 end -- self.clearDebugger() self.countDisplayObjects = function() local mainStage = display.getCurrentStage() self.addLine(" ") self.addLine("\*\*\*--- COUNT DISPLAYOBJECTS ---\*\*\*") self.addLine("mainStage has "..mainStage.numChildren.." children") for i = 1, mainStage.numChildren do local childType = "" if mainStage[i].numChildren == nil then childType = "displayObject, no group" else childType = "group with "..mainStage[i].numChildren.." children" end local groupName = "" if mainStage[i].name then groupName = mainStage[i].name else groupName = "no name!" end self.addLine("Child "..i.." type = "..childType.." ( name = "..groupName.." )") end end -- self.countDisplayObjects() -- insert own objects into own mainGroup -- insert own mainGroup into targetDisplayGroup! targetDisplayGroup:insert(self.mainGroup) return self end -- appDebuggerClass.new() return appDebuggerClass
FYI, the code above let’s you output lines of text that appear in a displayGroup of your choosing.
It’s best to create a displayGroup at the very “top” of your screen stack, and pass this displayGroup as a parameter to the appDebugger class.
The “super” parameter is meant to be the parent object of this appDebugger. If you don’t want to use this just delete that code from this class.
Then there’s two methods that are handy: self.clearDebugger which empties the screen, and self.countDisplayObjects which counts the number of displayObjects or displayGroups on the “most top” level, which is the currentStage. This is handy to see if you’ve cleaned up everything on screen or not.
That’s not a feature that’s high on our list of things to do. This honestly would be a great addition for programmers interested in contributing to Corona’s core code since it’s now open source!
PS and welcome to our wonderful Corona community!
Rob
A bit off topic but: I have my own “console” running on top of my app in its own displayGroup, and I have to say this works really well for me:
I can choose which message I print and which I don’t want to see
I can clear the debug screen easily
I can mix permanently displayed info (like texture memory usage) with temporary info (line statements) etc…
I can display my info in a variety of forms
All this running in my device display
I know this only touches upon your question very indirectly, but if you’re looking for “better” console functionality, it’s worth looking into rolling your own…
Sounds very interesting.
Thanks for the info!
If you want, feel free to use my code:
-------------------------- -- appDebuggerClass.lua -- -------------------------- local appDebuggerClass = {} appDebuggerClass.new = function(super, targetDisplayGroup) self = {} self.type = "appDebugger" self.super = super -- super is of type appEngine (game or editor) self.mainGroup = display.newGroup() self.mainGroup.name = "appDebugger mainGroup named inside appDebugger class" self.mainGroup.alpha = .25 self.currentVerticalPosition = 16 self.fontSize = 32 self.lineHeight = 32 self.addLine = function(lineText) local lineOptions = { parent = self.mainGroup, text = lineText, x = 16, y = self.currentVerticalPosition, font = native.systemFontBold, fontSize = self.fontSize, align = "left" } local textLine = display.newText(lineOptions) textLine.anchorY = 0 textLine.anchorX = 0 --textLine:setFillColor(0,0,0) -- black text! textLine:setFillColor(0,1,0) -- green text! if self.currentVerticalPosition \< 1400 then self.currentVerticalPosition = self.currentVerticalPosition + self.lineHeight else self.currentVerticalPosition = self.currentVerticalPosition + self.lineHeight self.mainGroup.y = self.mainGroup.y - self.lineHeight end end -- self.addTitle() self.clearDebugger = function() for i = self.mainGroup.numChildren, 1, -1 do self.mainGroup[i]:removeSelf() end self.mainGroup.y = 0 self.currentVerticalPosition = 16 end -- self.clearDebugger() self.countDisplayObjects = function() local mainStage = display.getCurrentStage() self.addLine(" ") self.addLine("\*\*\*--- COUNT DISPLAYOBJECTS ---\*\*\*") self.addLine("mainStage has "..mainStage.numChildren.." children") for i = 1, mainStage.numChildren do local childType = "" if mainStage[i].numChildren == nil then childType = "displayObject, no group" else childType = "group with "..mainStage[i].numChildren.." children" end local groupName = "" if mainStage[i].name then groupName = mainStage[i].name else groupName = "no name!" end self.addLine("Child "..i.." type = "..childType.." ( name = "..groupName.." )") end end -- self.countDisplayObjects() -- insert own objects into own mainGroup -- insert own mainGroup into targetDisplayGroup! targetDisplayGroup:insert(self.mainGroup) return self end -- appDebuggerClass.new() return appDebuggerClass
FYI, the code above let’s you output lines of text that appear in a displayGroup of your choosing.
It’s best to create a displayGroup at the very “top” of your screen stack, and pass this displayGroup as a parameter to the appDebugger class.
The “super” parameter is meant to be the parent object of this appDebugger. If you don’t want to use this just delete that code from this class.
Then there’s two methods that are handy: self.clearDebugger which empties the screen, and self.countDisplayObjects which counts the number of displayObjects or displayGroups on the “most top” level, which is the currentStage. This is handy to see if you’ve cleaned up everything on screen or not.