FG Spreadshirt Swag
Page 1 of 3 123 Last
  1. #1

    Drag and Drop not working

    I created a Window List for languages (lstLanguages), created the language item to go into it (itemLanguage) and the language description window (language), to hold all the info on a specific language.
    I set this up the same as with equipment, but I can't seem to drag and drop items from the Languages sidebar window into that language list, like I can with equipment items...

    For lstLanguages I have the Class Name set to itemLanguage, the Accept Drop Classes to 'item' (also tried 'language' and 'languageItem') and the Data Source set to .languageItem.
    When I create a new Language entry from the sidebar menu, it comes up with my custom dialogue window (language). The same dialogue that comes up when I create a language in listLanguages...


    I don't know what I missed...

  2. #2
    You should probably just use the same templates and code as the CoreRPG sheet; instead of creating your own. There is a bunch of logic built into those templates that other areas know about.

    In fact, I would recommend using the CoreRPG version of the character sheet pages, and only overriding the specific ones you need to override for your system. In many rulesets, you don't need to override the Inventory or Notes sections at all...

    Regards,
    JPG

  3. #3
    Quote Originally Posted by Moon Wizard View Post
    You should probably just use the same templates and code as the CoreRPG sheet; instead of creating your own. There is a bunch of logic built into those templates that other areas know about.

    In fact, I would recommend using the CoreRPG version of the character sheet pages, and only overriding the specific ones you need to override for your system. In many rulesets, you don't need to override the Inventory or Notes sections at all...

    Regards,
    JPG
    That's basically what I've done, I only overrode the layout of language, just as I did with Inventory, which works just fine. The only thing i've deleted outright was the Abilities tab, since I don't need it. I'm also creating items that aren't present in CoreRPG, like Holdings and Treasure, which aren't the same as inventory items, in this game...

  4. #4
    I've gone back and redid Languages with the CoreRPG vanilla template, but I still can't drag and drop languages from the sidebar item...

  5. #5

  6. #6
    Quote Originally Posted by damned View Post
    followed that, but still cannot drag and drop languages into that field.

  7. #7
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,649
    Blog Entries
    1
    You might note I didnt create a Campaign Tool for Languages - Im using the CoreRPG languages as they have things like the chat in language features.

  8. #8
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,649
    Blog Entries
    1
    If you look in your generated content you will likely see something like:

    Code:
          <list_language name="language_list">
            <frame>
              <name>languagesframe</name>
              <offset>5,20,5,20</offset>
            </frame>
            <bounds>205,65,180,190</bounds>
            <class>char_language</class>
            <datasource>.languagelist</datasource>
          </list_language>
    in CoreRPG you have the following template

    Code:
    	<template name="list_language">
    		<list_text>
    			<datasource>.languagelist</datasource>
    			<class>char_language</class>
    			<sortby><control>name</control></sortby>
    			<newfocus>name</newfocus>
    			<allowcreate />
    			<allowdelete />
    			<script>
    				function onDrop(x, y, draginfo)
    					local sDragType = draginfo.getType();
    					if sDragType == "string" or sDragType == "language" then
    						local w = addEntry(true);
    						w.name.setValue(draginfo.getStringData());
    						return true;
    					end
    				end
    			</script>
    		</list_text>
    	</template>
    if you look at another windowlist you have created with campaign tools and drag and drop you might see

    Code:
          <list_text name="skills_list">
            <frame>
              <name>skillsframe</name>
              <offset>5,18,5,10</offset>
            </frame>
            <bounds>5,216,380,47</bounds>
            <class>skills_detail</class>
            <datasource>.skillslist</datasource>
            <allowcreate />
            <allowdelete />
            <acceptdrop>
              <class>skills</class>
              <field>*</field>
            </acceptdrop>
            <columns>
              <width>180</width>
              <fillwidth />
            </columns>
          </list_text>
    in particular see

    Code:
            <acceptdrop>
              <class>skills</class>
              <field>*</field>
            </acceptdrop>

  9. #9
    Quote Originally Posted by damned View Post
    You might note I didn't create a Campaign Tool for Languages - I'm using the CoreRPG languages as they have things like the chat in language features.
    I'd like to have a repository of languages, the players can drag and drop onto their character sheets, just like Items...

  10. #10

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