DICE PACKS BUNDLE
Page 1 of 2 12 Last
  1. #1

    Help With Coding Single Link (Not In A List)

    Hi Guys,

    I'm trying to right the XML/LUA code to have a Link to a Map - I've looked at the various lists which allow you to drag and drop an entity's shortcut into the list, but what I want is a one-of entry, not a list, so I'm having trouble.

    What I'd lick is (for eg)

    Code:
    			<label_column>
    				<anchor>MapLink</anchor>
    				<static text="Map" />
    			</label_column>
                            <Some other template which would hold the name of the map (filename) plus a Shortcut Icon. name="MapLink" />
    Any ideas/help would be appreciated.

    Cheers
    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
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Are you trying to do something like the linkfield at the right of a skill entry on the character sheet in the 3.5e ruleset?

    If so, have a look at the campaign\record_char_skills.xml file - the "char_skill" windowclass defines each skill entry and the "shortcut" linkfield is where a link can be dropped:
    Code:
    <linkfield name="shortcut">
    	<anchored width="20" height="20">
    		<top offset="2" />
    		<right parent="rightanchor" anchor="left" relation="relative" offset="-2" />
    	</anchored>
    	<allowdrop />
    </linkfield>
    <linkfield> is a template that can be found in common\template_common.xml in the CoreRPG ruleset.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    That sounds like what I'm after - I'll have a look see and get back to you if I have ay further issues/questions.

    Thanks Trenloe, I really do appreciate all the help - even if I do forget to say thanks now then.
    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

  4. #4
    Thanks Trenloe, that was what I was after.

    OK, next question: Is there a way to clear/reset the linkfield/windowreferencecontrol back to an "blank" state?

    At the moment I've got:
    Code:
    <script>
    	function onDrop(nXPos,nYPos,oDragData)
    		if oDragData.getType() == "shortcut" and
    				oDragData.getShortcutData() == "imagewindow" then
    			[stuff happens];
    		else
    			setValue("","");
    		end
    	end
    </script>
    But this doesn't seem to work.

    Thanks in advance
    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

  5. #5
    Tables have the functionality of removing a link. Might be able to find the code that does this and apply it to other links.
    I never claimed to be sane. Besides, it's more fun this way.

  6. #6

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by dulux-oz View Post
    Code:
    <script>
    	function onDrop(nXPos,nYPos,oDragData)
    		if oDragData.getType() == "shortcut" and
    				oDragData.getShortcutData() == "imagewindow" then
    			[stuff happens];
    		else
    			setValue("","");
    		end
    	end
    </script>
    But this doesn't seem to work.
    Try setValue() instead of setValue("","")
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #8
    Quote Originally Posted by damned View Post
    now Im curious...
    Typo!
    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

  9. #9
    Quote Originally Posted by Trenloe View Post
    Try setValue() instead of setValue("","")
    Yup, tried that, still not work
    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

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by dulux-oz View Post
    Yup, tried that, still not work
    After using that, if you close and re-open the window has the link gone? I'm wondering if it is a refresh issue.

    Also try removing the link, closing FG and going back in and see if the link is still there?

    I had a recent issue where changing the icon of a button was only refreshing if you closed FG and opened it again. JPG fixed that specific issue in 3.0.3.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

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
  •  
5E Character Create Playlist

Log in

Log in