Thread: Drag and Drop not working
-
January 2nd, 2022, 19:55 #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...
-
January 2nd, 2022, 21:47 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,649
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
-
January 2nd, 2022, 22:01 #3
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...
-
January 3rd, 2022, 00:28 #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...
-
January 3rd, 2022, 03:14 #5
-
January 3rd, 2022, 03:26 #6
-
January 3rd, 2022, 03:31 #7
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.
-
January 3rd, 2022, 03:36 #8
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>
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>
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>
Code:<acceptdrop> <class>skills</class> <field>*</field> </acceptdrop>
-
January 3rd, 2022, 03:37 #9
-
January 3rd, 2022, 03:52 #10
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks