<?xml version="1.0" encoding="utf-8" ?>
<component name="loginScreen" extends="Group">
<script type="text/brightscript" uri="pkg:/components/screens/login/login.brs" />
<script type="text/brightscript" uri="pkg:/components/enums/fonts.brs" />
<interface>
<field id="loginScreenReadyToLoad" type="bool" />
</interface>
<children>
<Poster id="loginBackground" translation="[0,0]" />
<Poster id="loginRandomWeatherImage" translation="[0,0]" />
<ButtonGroup id="loginButtonGroup" translation="[600, 300]" focusBitmapUri="pkg:/assets/images/buttonSelected.9.png" focusFootprintBitmapUri="pkg:/assets/images/button.9.png" focusedIconUri="" iconUri="" showFocusFootprint="True">
<Button id="LoginBtn" translation="[200,200]" text="Log-in" focusedIconUri="" iconUri="" showFocusFootprint="True"/>
<Button id="EULABtn" translation="[200,200]" text="EULA" focusedIconUri="" iconUri="" showFocusFootprint="True"/>
</ButtonGroup>
</children>
</component>
<!-- focusBitmapUri="pkg:/assets/images/buttonSelected.9.png" focusFootprintBitmapUri="pkg:/assets/images/button.9.png" -->
m.loginButtonGroup = m.top.findNode("loginButtonGroup")
m.loginButtonGroup.buttons = ["Log-in", "EULA"]
<ButtonGroup
id="loginButtonGroup"
focusBitmapUri="pkg:/assets/images/buttonSelected.9.png"
focusFootprintBitmapUri="pkg:/assets/images/button.9.png"
translation="[600, 300]"
/>
"sharkieSBS" wrote:
@norcaljohnny This still won't allow each button to have an unfocused "state" image, will it?
"norcaljohnny" wrote:"sharkieSBS" wrote:
@norcaljohnny This still won't allow each button to have an unfocused "state" image, will it?
Yes, it will allow for the unfocused state with your custom image, assuming it is located in your image folder.
"speechles" wrote:"norcaljohnny" wrote:"sharkieSBS" wrote:
@norcaljohnny This still won't allow each button to have an unfocused "state" image, will it?
Yes, it will allow for the unfocused state with your custom image, assuming it is located in your image folder.
Dude, what are you smoking? It must not be the same stuff I am... lol
You want IconUri/FocusedIconUri and FocusedBitmapUri(If you even want or care about a background focus). You do not want that footprint. I mean if you have a need for it use it but Roku set the default to "" for a reason. For a reason I say. Understand the reason because 99 times out of 100 it has an undesired effect of this lingering odd weird shadow thing hangs on a button til you navigate it to the new one as you navigate off. It is just a placeholder for where you will land when you move that button group back into focus. 99 times out of 100 intutively people know. They don't like clumsy reminders unless it is done for a reason. Roku sets it "" so you can hopefully never use it. When you do you see it and go.. oh.. I see what that does it makes it look horrible. LOL
But you need to help people without misleading them. The individual in this case wants to use IconUri and FocusedBitmapUri to change an entire button as the focus and not just tint/blendcolor it or throw a background behind it or change its background. There are multiple ways to handle this. Focus is a wonderful thing since it can be so many things. Focus is alot like Tigger from Winnie the Pooh. The wonderful thing about focus is the tops are made out of rubber the bottoms are made out of springs. My focus is anyways.
Have fun with this. Don't get angry you cannot figure it out. Not everyone shares advice who really knows what they are doing. They have limited time. Whatever the reason there are some people who share code that are wonderful. You go wow I can dig that. Learn from it. Thanks for sharing. Then other times where you go.. wow.. I wish people would help only when they really know themselves what they are doing to help. You help people but hurt them by limit their knowledge by the limit of your own. Read the docs on button group ( https://sdkdocs.roku.com/display/sdkdoc/ButtonGroup ) not just saying this to blow wind in your face either. Not saying it to put you in your place. Just saying it because that is an obvious and most crucial place to start when you want to know something. Once you see how it is supposed to work try it. Does it work that way? How does it work? Can you figure out how it works if it differs from the SDK says it should? If you can make a note and always remember that. Share with us when you notice this difference.
There are many places the docs are not correct with how things work today. They were written yesterday. Always remember this. The best advice is your own, even if you don't take it or want to second guess yourself. The second best advice is to read the docs. The third best advice is trust no one. Believe nothing. Try code people give before you put confidence in anything they provide (text or code or conversation). You need to learn from good examples. The best examples are those which need no explanation. The simplest answer is likely correct. In this case it is just misunderstanding the button group and the uri to use for the buttons.
To mislead someone may not have been intentional but it is noticed by myself and others. If you can limit the misinformation you spread you are part of the solution otherwise you are part of the problem. Thanks for reading. 🙂
"norcaljohnny" wrote:"speechles" wrote:"norcaljohnny" wrote:"sharkieSBS" wrote:
@norcaljohnny This still won't allow each button to have an unfocused "state" image, will it?
Yes, it will allow for the unfocused state with your custom image, assuming it is located in your image folder.
Dude, what are you smoking? It must not be the same stuff I am... lol
You want IconUri/FocusedIconUri and FocusedBitmapUri(If you even want or care about a background focus). You do not want that footprint. I mean if you have a need for it use it but Roku set the default to "" for a reason. For a reason I say. Understand the reason because 99 times out of 100 it has an undesired effect of this lingering odd weird shadow thing hangs on a button til you navigate it to the new one as you navigate off. It is just a placeholder for where you will land when you move that button group back into focus. 99 times out of 100 intutively people know. They don't like clumsy reminders unless it is done for a reason. Roku sets it "" so you can hopefully never use it. When you do you see it and go.. oh.. I see what that does it makes it look horrible. LOL
But you need to help people without misleading them. The individual in this case wants to use IconUri and FocusedBitmapUri to change an entire button as the focus and not just tint/blendcolor it or throw a background behind it or change its background. There are multiple ways to handle this. Focus is a wonderful thing since it can be so many things. Focus is alot like Tigger from Winnie the Pooh. The wonderful thing about focus is the tops are made out of rubber the bottoms are made out of springs. My focus is anyways.
Have fun with this. Don't get angry you cannot figure it out. Not everyone shares advice who really knows what they are doing. They have limited time. Whatever the reason there are some people who share code that are wonderful. You go wow I can dig that. Learn from it. Thanks for sharing. Then other times where you go.. wow.. I wish people would help only when they really know themselves what they are doing to help. You help people but hurt them by limit their knowledge by the limit of your own. Read the docs on button group ( https://sdkdocs.roku.com/display/sdkdoc/ButtonGroup ) not just saying this to blow wind in your face either. Not saying it to put you in your place. Just saying it because that is an obvious and most crucial place to start when you want to know something. Once you see how it is supposed to work try it. Does it work that way? How does it work? Can you figure out how it works if it differs from the SDK says it should? If you can make a note and always remember that. Share with us when you notice this difference.
There are many places the docs are not correct with how things work today. They were written yesterday. Always remember this. The best advice is your own, even if you don't take it or want to second guess yourself. The second best advice is to read the docs. The third best advice is trust no one. Believe nothing. Try code people give before you put confidence in anything they provide (text or code or conversation). You need to learn from good examples. The best examples are those which need no explanation. The simplest answer is likely correct. In this case it is just misunderstanding the button group and the uri to use for the buttons.
To mislead someone may not have been intentional but it is noticed by myself and others. If you can limit the misinformation you spread you are part of the solution otherwise you are part of the problem. Thanks for reading. 🙂
Hey man dont come off like a prick. I didnt pay attention to the focus uri and such, only they way his code was in general for the way he had coded his button group.
You wrote alot of BS but didnt answer his question or even try to come off as a helpful user so save the crap.