"RokuRobB" wrote:
There is no EncodeJSON function in the SDK at present. As for the color of the top part of the keyboard screen, do you mean the overhang area?
"RokuRobB" wrote:
You can replace the overhang for that specific screen by calling roAppManager.SetThemeAttribute("OverhangSliceHD", "background_image") where background_image is simply an image with the same color as the desired keyboard screen background. Then when navigating to other screens, call SetThemeAttribute again to set the overhang back to the original value. You can do this for the SD case as well by setting the OverhangSliceSD apptheme attribute.
"Mr. E" wrote:
I've tried calling SetThemeAttribute. I've tried changing the size of the overhang png from 1281x165 to 1280x138. None of it works. The overhang for the keyboard screen is still an ugly white-blue gradient.
Can anyone help me out here?"RokuRobB" wrote:
You can replace the overhang for that specific screen by calling roAppManager.SetThemeAttribute("OverhangSliceHD", "background_image") where background_image is simply an image with the same color as the desired keyboard screen background. Then when navigating to other screens, call SetThemeAttribute again to set the overhang back to the original value. You can do this for the SD case as well by setting the OverhangSliceSD apptheme attribute.
"TheEndless" wrote:"Mr. E" wrote:
I've tried calling SetThemeAttribute. I've tried changing the size of the overhang png from 1281x165 to 1280x138. None of it works. The overhang for the keyboard screen is still an ugly white-blue gradient.
Can anyone help me out here?"RokuRobB" wrote:
You can replace the overhang for that specific screen by calling roAppManager.SetThemeAttribute("OverhangSliceHD", "background_image") where background_image is simply an image with the same color as the desired keyboard screen background. Then when navigating to other screens, call SetThemeAttribute again to set the overhang back to the original value. You can do this for the SD case as well by setting the OverhangSliceSD apptheme attribute.
If you're setting it in your main SetTheme() metadata, you should be good. Can you share details on the image and the code that's setting it in the theme? I've run into issues on the grid screen where images saved from Photoshop with the "Convert to sRGB" option checked wouldn't load in the grid. I don't know if that applies here, but I suppose it's possible the same could be true for the overhang on some screens.
sub Main()
' Set the basic color scheme
SetTheme()
while true
DoLogin()
end while
end sub
sub SetTheme()
app = CreateObject("roAppManager")
theme = CreateObject("roAssociativeArray")
theme.OverhangOffsetHD_X = "125"
theme.OverhangOffsetHD_Y = "35"
theme.OverhangSliceHD = "pkg:/images/hd/overhang.png"
theme.GridScreenOverhangSliceHD = "pkg:/images/hd/overhang.png"
theme.OverhangLogoHD = "pkg:/images/hd/overhang_logo.png"
' Some other color info for the theme is set here.
app.SetTheme(theme)
end sub
sub DoLogin()
port = CreateObject("roMessagePort")
screen = CreateObject("roKeyboardScreen")
screen.SetMessagePort(port)
screen.SetTitle("Account Login")
screen.SetDisplayText("Please enter your Grooveshark username")
screen.AddButton(1, "Next")
screen.AddButton(2, "Back")
screen.Show()
while true
msg = wait(0, screen.GetMessagePort())
print "Message Received."
print msg
if type(msg) = "roKeyboardScreenEvent"
if msg.isScreenClosed()
return
else if msg.isButtonPressed() then
print "Event: "; msg.GetMessage(); " idx: "; msg.GetIndex()
if msg.GetIndex() = 1
user_login = screen.GetText()
print "Login: ";user_login
endif
endif
endif
end while
end sub
"Mr. E" wrote:
I believe the sRGB thing is the problem. I'm currently at work, so have no way to test this, but the tool I'm using, GIMP, sets the color profile as sRGB by default.
I guess I could try downloading color profiles from Adobe or something.
I'll update this when I get a chance to test this. Thanks for your help!
Other quotes....