Hey everyone,
I have an inventory interface(a lot of divs with layering images) in the left sidebar of my game. The interface has two tabs, clothing and backpack. For now, the code looks like this:
<<link [img[images/icons/ui01.png]]>>
<<set $Visiblelayer to "clothing">>
<<goto `passage()`>>
<</link>>
<<link [img[images/icons/ui02.png]]>>
<<set $Visiblelayer to "backpack">>
<<goto `passage()`>>
<</link>>
<<if $Visiblelayer is "clothing">>
*clothing interface*
<<elseif $Visiblelayer is "backpack">>
*backback inferface*
<</if>>
It works fine, but the unnecesary reload of the whole passage bothers me, it may cause troubles in the future. And overall I think there must be some cleaner way to do this.
So the question is - how can I refresh just she sidebar without refreshing the whole passage? Thanks in advance!