Hi all-
I was working today to replace the standard skin's "thumbs" scene browser with a combobox-based menu.
(Why? I think a scene menu is a much better user interface - the user can quickly get a list of scenes that have BOTH pict thumbnails and names, and clicks on just the one they want. That beats the thumb's "scroll around and look at nebulous thumbnails and make guesses" navigation by a country mile...)
I have a combobox menu placed at the "global" level of my tour.xml working just fine. (Well, the selectItemByName function doesn't seem to work, but I have a work-around.)
OK, great - all I have to do now is edit the thumbs code in skin.xml, change the references over to my combobox, some common-sense edits, and I'm home free, right?
However, when I place that same working combobox inside of a new "menu container" layer inside my skin.xml, the "onloaded" event never fires off.
Code from vtourskin.xml:
<layer name="skin_scroll_container" type="container" align="lefttop" width="100%" height="100%" x="0" y="0"
onloaded="trace('DEBUG: hit scroll container onloaded call');" >
<layer name="skin_thumbs_container" type="container" align="lefttop" width="100%" height="100%" visible="false"
onloaded="trace('DEBUG: hit thumbs container onloaded call');" >
(Edited out "skin_thumbs_scrollleft", "skin_thumbs_scrollright" "skin_thumbs_scrollindicator" layers)
<layer name="skin_thumbs" state="closed" url="%VIEWER%/plugins/scrollarea.js" direction="h" align="top"
width="100%" height="100" zorder="1"
onloaded="trace('DEBUG: about to call thumbs onloaded skin_updatescroll'); skin_updatescroll();"
onscroll="skin_updatethumbscroll();" />
</layer>
<layer name="skin_menu_container" type="container" align="lefttop" width="100%" height="100%" visible="false"
onloaded="trace('DEBUG: hit menu container onloaded call');" >
<combobox name="cbscenes" design="vtour" align="top" width="100%" height="100"
onloaded="trace('DEBUG: about to call menu onloaded add_scene_items'); add_scene_items();" />
</layer>
(Edited out map-related layers)
</layer>
Display More
However, that last "trace" command in the last "onloaded" option isn't firing off.
I see in combobox.xml that it only looks at the global level when converting comboboxes to layers:
<!-- convert all <combobox> elements to layers -->
<action name="combobox_parse_xml_elements" scope="localonly">
trace("DEBUG: at top of combobox_parse_xml_elements code");
if(global.combobox,
trace("DEBUG: in combobox_parse_xml_elements if global.combobox code");
copy(combobox_src, global.combobox);
So, am I out of luck in my attempts to modernize the skin interface by dumping the thumbs and going to a menu?
Thanks in advance for any help!