Sie sind nicht angemeldet.

1

Mittwoch, 29. Juli 2020, 21:44

How to use combox with thumb to show some scenes

I need to make a menu with thumbs with just a few scenes from my tour, I want to use the combobox plugin, but the available examples show all scenes, can someone help me?

my tour is already working like this, I just need to insert the thumbs.

Quellcode

1
	<combobox name="cbsettings" design="vtour" align="righttop" x="10" y="10" onchange="selectItemByName(0);">		<item name="item0" caption="Short Cut" />		<item name="item1" caption="Main Entrance"  onclick="loadscene(scene_Mian_Entrance,null,MERGE,BLEND(1));" />		<item name="item2" caption="Airboat"       onclick="loadscene(scene_Airboat,null,MERGE,BLEND(1));" />		<item name="item3" caption="Gator Pit"        onclick="loadscene(scene_Gator_Pit,null,MERGE,BLEND(1));" />		<item name="item4" caption="Guest Chickee"       onclick="loadscene(scene_Guest_Chickee,null,MERGE,BLEND(1));" />		<item name="item5" caption="Gift Shop Front" onclick="loadscene(scene_Giftshop_Front,null,MERGE,BLEND(1));" />		<item name="item6" caption="Lookout Viewer" onclick="loadscene(scene_Lookout_Viewer,null,MERGE,BLEND(1));" />		<item name="item7" caption="Swamp Buggy"       onclick="loadscene(scene_Swamp_Buggie,null,MERGE,BLEND(1));" />	</combobox>




the example showed me this option below but it shows all scenes and i need only a few selected



Quellcode

1
	<combobox name="cbscenes" design="vtour" align="righttop" x="10" y="10" onloaded="add_scene_items();" />	<action name="add_scene_items" scope="local">		for(set(i,0), i LT scene.count, inc(i),			caller.additem(calc('[img src=[dq]' + scene[get(i)].thumburl +  '[dq] style=[dq]border:1px solid rgba(255,255,255,0.5);width:30px;height:30px;vertical-align:middle;margin-right:8px;[dq]/] '+scene[get(i)].title), calc('loadscene('+i+',null,MERGE,BLEND(0.5))') );		);	</action>



my project: http://seminoleculture.org/billieswampsafari/index.html

2

Donnerstag, 30. Juli 2020, 08:19

Hi, try this code

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
<include url="%VIEWER%/plugins/combobox.xml" />
	
<combobox name="cbscenes" design="vtour" align="top" x="0" y="10"  
	onloaded="add_scene_cb(2);
		  add_scene_cb(5);
		  add_scene_cb(3);
			         " 
		/>
<action name="add_scene_cb" scope="local" args="scname">		
       caller.additem(calc('[img src=[dq]' + scene[get(scname)].thumburl +  '[dq] style=[dq]border:1px solid 
       rgba(255,255,255,0.5);width:48px;height:32px;vertical-align:middle;margin-right:8px;[dq]/] '+scene[get(scname)].title), 
       calc('loadscene('+scname+',null,MERGE,BLEND(0.5))') );
</action>


add_scene_cb(5); - In parentheses specify the ID(number) of the scene

Ähnliche Themen