DICE PACKS BUNDLE
  1. #1

    Where The Hell Is...

    Hi Guys,

    I need some help with collapsing and expanding lists, please.

    I've got a two-layer windowlsit structure and a stock-standard button_expand and button_collapse (from CoreRPG:template_buttons.xml). I've also got a stock-standard <genericcontrol name="status"> construct copied verbatum from CoreRPG:utility_options.xml (line 157).

    Everything is working fine - everything expands/collapses just as it should.

    My issue, however, is that when I use the button_expand/button_collapse to expand/collapse the lists, the "status" icon goes from its normal <icon>button_collapse</icon>/<icon>button_expand</icon> to the white versions (ie button_collapse_w/button_expand_w). Of course, when I click on the "status" button/icon it changes to the non-white version of the relevant icon.

    My problem is I can't find in the code where the white-versions are being set (so I can stop that from happening). Can anyone point me in the right direction?

    Thanks
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  2. #2
    Where did you get the status icon templates from? In the examples I could quickly find any examples in the CoreRPG and 5E rulesets of a collapse icon usage, there are no examples of status icons for the collapsed sections, just font/frame changes to indicate collapsed state of headers.

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    Where did you get the status icon templates from? In the examples I could quickly find any examples in the CoreRPG and 5E rulesets of a collapse icon usage, there are no examples of status icons for the collapsed sections, just font/frame changes to indicate collapsed state of headers.

    Regards,
    JPG
    The status icon structure isn't a template, is a generic control, and it came from the CoreRPG=>utility_options.xml file, starting at line 157. Here, I've copied it to below:
    Code:
    			<genericcontrol name="status">
    				<anchored to="label" position="left" offset="-20" width="20" />
    				<icon>button_collapse</icon>
    				<script>
    					function onClickDown(button, x, y)
    						return true;
    					end
    
    					function onClickRelease(button, x, y)
    						window.toggle();
    						return true;
    					end
    				</script>
    			</genericcontrol>
    As you can see, it uses the button_collapse icon (and the corresponding button_expand icon). Of course, I modified the anchored parameters and I had to write a custom window.toggle() function for my 2-layer windowlist structure, and its all working AOK (and nowhere did I substitue button_collapse_w for button_collapse nor button_expand_w for button_expand). The issue is (just to clarify) that when I click on the accompanying button_expand and button_collapse buttons (again, from CoreRPG:template_buttons.xml and reproduced below) is when the button_collapse/button_expand icons is replaced with the button_collapse_w/button_expand_w icons - and I can't find anywhere in the code where the "_w" versions of the icons are being set (on the "status" structure when the button is clicked, obviously - they are being set correctly to display on the buttons themselves, as the code shows).
    Code:
    	<template name="button_expand">
    		<button_icon>
    			<icon normal="button_expand_w" />
    			<tooltip textres="tooltip_expand" />
    			<target>grouplist,list</target>
    			<expand />
    			<script file="common/scripts/button_expand_collapse.lua" />
    		</button_icon>
    	</template>
    	<template name="button_collapse">
    		<button_icon>
    			<icon normal="button_collapse_w" />
    			<tooltip textres="tooltip_collapse" />
    			<target>grouplist,list</target>
    			<collapse />
    			<script file="common/scripts/button_expand_collapse.lua" />
    		</button_icon>
    	</template>
    	<template name="button_icon">
    		<buttoncontrol>
    			<frame name="buttonup" offset="2,2,2,2" />
    			<stateframe>
    				<pressed name="buttondown" offset="2,2,2,2" nobaseframe="true" />
    			</stateframe>
    			<pressed offset="1,1" />
    		</buttoncontrol>
    	</template>
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in