I'm working on a menu, using the html/css way... I've started from the Pearl Diver demo but I'm having trouble trying to hide some elements. In the demo, each menu item has 3 divs, showing/hiding them depending on the mouse event... Those buttons are images, but I'm working with text, so I have something like this in the .rml file:
- Code: Select all
<!-- Item -->
<div id="item_1" class="menu_item"
onmouseover="hide(self,item_1_normal);show(self,item_1_hover);"
onmouseout="show(self,item_1_normal);"
onmousedown="hide(self,item_1_normal);hide(self,item_1_hover);show(self,item_1_active);"
onmouseup="hide(self,item_1_active);show(self,item_1_hover);"
onclick="lua(UI_script,sound_click,test);lua(UI_script,menu_start,test);">
<div id="item_1_active" class="item_active">START</div>
<div id="item_1_hover" class="item_hover">START</div>
<div id="item_1_normal" class="item_normal">START</div>
</div>
Everything works fine as soon I mouse over the items, but when the GUI is loaded, I see all the elements visible by default... Is there any way to hide both active and hover elements when the GUI is loaded?
I'm also wondering... do I really need 3 elements to make a simple link? Any clue to make it simpler?
Thanks in advance!