Is it Possible to change DialogBox Button text Font?
I see three field(titleFont, messageFont, bulletTextFont) in DialogBox. But, I doesn't see the any field for button Font in Roku. I tried with the below line. ' titleFont = CreateObject("roSGNode", "Font") ' titleFont.uri = "pkg:/fonts/font.ttf" ' titleFont.size = 24 ' optiondialog.buttons.textFont = titleFont or ' optiondialog.buttons.textFont.font.uri ="pkg:/fonts/font.ttf" ' optiondialog.buttons.textFont.font.size =24 Here, Both lines gives an error. Is there any way to change DialogBox Button Text Font?Solved2.6KViews0likes5CommentsGlobal font setting
Is there a mechanism that allows a developer to set a font that can be used across all font-capable nodes in your application? I just realized that even roAppManager doesn't appear to have font attributes. If application-level font-setting is not possible, is there a way to define a named font in your XML and then reference it from your labels etc? I am aware that you can pass a <Font> node to a label or programmatically assign the font in code on a per-item basis. It just seems bizarre that you have to do it for every node, manually.2.2KViews1like1CommentSetting CaptionStyle
Hi guys, I'm new over here, I'm having problem setting captionStyle. This is my code: m.video.globalCaptionMode = "On" [size=85][font=Monaco]m.video.subtitleTrack = params.subtitlesUrl[/font][/size] [size=85][font=Monaco]m.video.captionStyle = {[/font][/size] [size=85][font=Monaco][color=#000000] [/color][color=#3f7777]"Background Color"[/color][color=#000000][color=#000000]: params.[/color][/color][color=#ff9e00][color=#ff9e00]backgroundColor[/color][/color][/font][/size] [size=85][font=Monaco] [color=#3f7777]"Background Opacity"[/color]: params.backgroundOpacity[/font][/size] [size=85][font=Monaco] [color=#3f7777]"Text style"[/color]: params.textStyle[/font][/size] [size=85][font=Monaco] [color=#3f7777]"Text color"[/color]: params.textColor[/font][/size] [size=85][font=Monaco] [color=#3f7777]"Text size"[/color]: params.textSize[/font][/size] [size=85][font=Monaco] [color=#3f7777]"Text edge effect"[/color]: params.textEdgeEffect[/font][/size] } The subtitle is showing but it seems that styles showing are the ones set in the system (default), not the ones that I'm setting in code. Thanks for your help.3.4KViews0likes1CommentFont size always the same no matter what number I put.
I'm drawing text to a roImageCanvas to use as a loading page for a video player. Here is all of the code used to draw on the canvas below: Sub videoPaintCanvas() m.Canvas.AllowUpdates(false) list = [] if m.progress < 100 then color = "#000000" titleFont = m.fonts.GetDefaultFont(75, false, false) padding = 5 rect = { w: titleFont.GetOneLineWidth(m.content.Title, m.layout.w) + padding * 2 h: titleFont.GetOneLineHeight() + padding * 2 x: 0 y: 0 } rect.x = Int(m.layout.w / 2) - Int(rect.w / 2) rect.y = Int(m.layout.h / 2) - rect.h list.Push({ Text: m.content.Title TextAttrs: { Font: titleFont } TargetRect: rect }) else if m.paused AND NOT m.seeking then color = "#90000000" list.Push({ url: "pkg:/images/pause.png" TargetRect: { x: Int(m.layout.w / 2) - 64 y: Int(m.layout.h / 2) - 64 w: 128 h: 128 } CompositionMode: "Source_Over" }) else if m.seeking AND m.seekSpeed > 0 then color = "#90000000" list.Push({ url: "pkg:/images/fast-forward.png" TargetRect: { x: Int(m.layout.w / 2) - 64 y: Int(m.layout.h / 2) - 64 w: 128 h: 128 } CompositionMode: "Source_Over" }) else if m.seeking AND m.seekSpeed < 0 then color = "#90000000" list.Push({ url: "pkg:/images/rewind.png" TargetRect: { x: Int(m.layout.w / 2) - 64 y: Int(m.layout.h / 2) - 64 w: 128 h: 128 } CompositionMode: "Source_Over" }) else color = "#00000000" end if m.canvas.SetLayer(0, { Color: color, CompositionMode: "Source" }) m.canvas.SetLayer(1, list) if m.progress < 100 then m.loadingBar.UpdateProgress(m.progress, 100) else if m.progress = 100 then m.canvas.ClearLayer(m.loadingBar.layer1) m.canvas.ClearLayer(m.loadingBar.layer2) end if m.canvas.AllowUpdates(true) End Sub m.fonts is a roFontRegistry object m.canvas is the roImageCanvas used m.progress is used to show a loading bar for buffering. (always between 1 and 100) The specific part of this function I'm looking at right now is inside the if statement if m.progress < 100 then ... else if ... No matter what size I specify in the m.fonts.GetDefaultFont(75, false, false), when I run the app, the font is the same size every time. I'm certain it is somehow defaulting to the "Medium" font size. Any help is greatly appreciated.4.5KViews0likes8Commentsfont size botton and the background color of the button?
Dear Friends, I understand that I can function theme.ButtonMenuHighlightText change the font color of a button ..... but now I'm trying to change the font size (I put a label to the button too long ..... which the maximum of characters for a button?) and the background color of the button (default is black) .. . is it possible? as can be done? Attentive to your comments, Thanks! :cry: :shock: :roll:4.2KViews0likes2Comments