Just wondering if there is a set priority for interface objects. I am working on a new version of Radio Star. I have created transparent buttons that overlay the green rectangles on screen right, identifying the songs. I want to enable users to instantly skip to any song just by pressing anywhere in any of the rectangles.
But there are three fields within each song description, and they seem to have a higher priority than the buttons. If I press anywhere but in the blank upper right corner of a song rectangle, I get no response from the button. I assume that it is blocked elsewhere by the fields.
Any way to unblock it? As a feature request, I think it would be a good thing to give buttons the highest priority, since in designing a program I doubt if a programmer would ever place a button over an object that also needed touch access. I can definitely see the value of being able to put a button on top of an RO field, though. That way one could have buttons containing (or seeming to contain) multiple lines of text.
Priority of interface objects
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Priority of interface objects
- Attachments
-
- image.png (527.94 KiB) Viewed 3748 times
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Priority of interface objects
In sB overlapping order is defined by order of object creation. Later created objects overlap earlier created objects. So one can control objects overlapping of any complexity. Any kind of automatic reordering can be problematic and not universal.
Also please don't forget pages functionality. For example overlapping buttons can belong to separate page which can be put on top. Pages also have their own transparency, can be reordered and moved.
Also sprites can be used as a touchable graphics, or just touches can be analyzed inside known rectangular areas.
Also please don't forget pages functionality. For example overlapping buttons can belong to separate page which can be put on top. Pages also have their own transparency, can be reordered and moved.
Also sprites can be used as a touchable graphics, or just touches can be analyzed inside known rectangular areas.
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Re: Priority of interface objects
Yes, it seemed to me that interface objects created later would have higher priority, but I am creating the buttons after the fields, and it makes no difference. The buttons still won't respond in the areas where the fields are.
I will try one of the other suggestions. Thanks.
I will try one of the other suggestions. Thanks.
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Priority of interface objects
If you create text field first, then you create button, and then you change field text, then field text overlaps the button.
Because changing field text recreates the field with new text.
Because changing field text recreates the field with new text.
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Re: Priority of interface objects
Thanks. That explains it.
The only thing that gets me down is gravity...
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Re: Priority of interface objects
I didn't realize realize that interface object priorities changed when the text in them was updated. I now have the buttons working. All I did was redefine the text in the buttons each time after I redefine the text in the fields ="". That ensures that the buttons always have top priority. I set fill alpha to 0 when creating the buttons the first time, so that they would not hide the fields. But that did not affect their touch responses.
Thanks again.
Thanks again.
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Priority of interface objects
If you put buttons on the upper page then you would not need update them anymore - they will always stay on top of fields.
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Re: Priority of interface objects
Will give that a try next.
The only thing that gets me down is gravity...
Re: Priority of interface objects
"I am begining to learn PAGE functionality but i am confused; I have a function which handle dialogs and choices and have decided to place it in a special page. Before, dialogs and choices where lying at the top of the screen, and i thought it would be cleaner, and more logical to proceed with a dedicated page, thus leaving more space for the rest of the interface. The built in doc of SB is quite short about this functionality, and i wonder where i can find more... It seems that when i SHOW a previously HIDEn PAGE, i cannot add interface objets any more.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Priority of interface objects
Please be more specific in what information do you need.smabasgil wrote:"I am begining to learn PAGE functionality but i am confused; I have a function which handle dialogs and choices and have decided to place it in a special page. Before, dialogs and choices where lying at the top of the screen, and i thought it would be cleaner, and more logical to proceed with a dedicated page, thus leaving more space for the rest of the interface. The built in doc of SB is quite short about this functionality, and i wonder where i can find more... It seems that when i SHOW a previously HIDEn PAGE, i cannot add interface objets any more.