Starfinder Playlist
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    referencetext / referencetextwide *acceptdrop" question

    I see these referenced in CoreRPG and MoreCore character/npc sheets:

    Code:
    				<acceptdrop>
    					<class>referencetext</class>
    					<class>referencetextwide</class>
    					<class>ability</class>
    					<class>note</class>
    					<class>encounter</class>
    					<field>*</field>
    				</acceptdrop>
    What kind of thing can I test dragging to them? I couldn't find anything defined as reference text that I understood to be that (ie: I expect I "don't get it" )

    For example, I was only able to drag rolls on MoreCore to the CT list box. That's fine based on them not including (for now) drag for cas but not sure what other type is for?

  2. #2
    "referencetext"/"referencetextwide" were older versions of the Story window class ("encounter") that are used by some older modules.

    That particular set of drop accept tags appears to be focused on accepting Story/Note entries.

    Regards,
    JPG

  3. #3

  4. #4
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Quote Originally Posted by Moon Wizard View Post
    "referencetext"/"referencetextwide" were older versions of the Story window class ("encounter") that are used by some older modules.

    That particular set of drop accept tags appears to be focused on accepting Story/Note entries.

    Regards,
    JPG
    Awesome I hate when I just can't find something and I am SURE it has to be there or I am completely misunderstanding.
    This is one reason at work I always remove orphaned code when I come across it (we have git to recover and I comment on the commit "removing unused X" because I cannot well you how many times I search for something hit that code and wonder ... but... it is never referenced again... or is there some intended side effect or? before I find out it was just never removed fully.

    Of course in this case, it is there for a reason - some rulesets or modules probably still have these types. I just didn't have them to be found when I did "find in files"

  5. #5
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    [EDIT: Forgot to update this last night, see next post - there IS a difference but the functionality is there]

    Slightly related topic...

    While testing the above drag-drops (all good) I found a difference. In MoreCore vanilla NPC sheet I can type test in the Notes tab and then drop a roll etc in as well. The "notes" is not in a separate class in MC but in the npc class and created into a tabs thing.

    (In both MoreCore, first, and my extension, second, I have bolded the "notes" sections)

    Code:
    	<windowclass name="npc">
    		<frame>recordsheet</frame>
    		<placement>
    			<size width="350" height="600" />
    		</placement>
    		<sizelimits>
    			<minimum width="350" height="350" />
    			<dynamic />
    		</sizelimits>
    		<minimize>minimized_npc</minimize>
    		<tooltip field="name" />
    		<nodelete />
    		<gmexport>npc</gmexport>
    		<script>
    			function onInit()
    				onLockChanged();
    				DB.addHandler(DB.getPath(getDatabaseNode(), "locked"), "onUpdate", onLockChanged);
    			end
    
    			function onClose()
    				DB.removeHandler(DB.getPath(getDatabaseNode(), "locked"), "onUpdate", onLockChanged);
    			end
    
    			function onLockChanged()
    				if header.subwindow then
    					header.subwindow.update();
    				end
    				if main.subwindow then
    					main.subwindow.update();
    				end
    
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
    				notes.setReadOnly(bReadOnly);
    
    			end
    		</script>
    		<sheetdata>
    			<sub_record_header name="header">
    				<class>npc_header</class>
    			</sub_record_header>
    
    			<frame_record_content_tabbed name="contentframe" />
    
    			<subwindow_record name="main">
    				<class>npc_main</class>
    			</subwindow_record>
    			<ft_record name="notes">
    				<anchored to="contentframe" position="over" />
    				<empty textres="ft_empty" />
    				<invisible />
    			</ft_record>
    
    			<scrollbar_record>
    				<target>main</target>
    			</scrollbar_record>
    			<scrollbar_record>
    				<target>notes</target>
    			</scrollbar_record>
    
    			<tabs_recordsheet>
    				<tab>
    					<icon>tab_main</icon>
    					<subwindow>main</subwindow>
    				</tab>
    				<tab>
    					<icon>tab_notes</icon>
    					<subwindow>notes</subwindow>
    				</tab>
    			</tabs_recordsheet>
    
    			<resize_recordsheet />
    			<close_recordsheet />
    		</sheetdata>
    	</windowclass>
    In mine, I wanted to add a few fields to the top of that tab, so I made it another full windowless (flying by seat of my guessing pants) and the new fields plus Formatted Text seemed to work.

    Only just now, noticed I cannot drag any rolls to it or anything else really. So I wonder why it is so different. I get that they are not created in any similar way at all - but I don't see the "end difference" when I look at the db.xml element both have type "formattedtext" but something must be missing in the accepting drop department?

    Code:
    	<windowclass name="npc">
    		<frame>recordsheet</frame>
    		<placement>
    			<size width="350" height="600" />
    		</placement>
    		<sizelimits>
    			<minimum width="350" height="350" />
    			<dynamic />
    		</sizelimits>
    		<minimize>minimized_npc</minimize>
    		<tooltip field="name" />
    		<nodelete />
    		<gmexport>npc</gmexport>
    		<script>
    			function onInit()
    				onLockChanged();
    				DB.addHandler(DB.getPath(getDatabaseNode(), "locked"), "onUpdate", onLockChanged);
    			end
    
    			function onClose()
    				DB.removeHandler(DB.getPath(getDatabaseNode(), "locked"), "onUpdate", onLockChanged);
    			end
    
    			function onLockChanged()
    				if header.subwindow then
    					header.subwindow.update();
    				end
    
    				if main.subwindow then
    					main.subwindow.update();
    				end
    
    				if notes.subwindow then
    					notes.subwindow.update();
    				end
    			end
    		</script>
    		<sheetdata>
    			<sub_record_header name="header">
    				<class>npc_header</class>
    			</sub_record_header>
    
    			<frame_record_content_tabbed name="contentframe" />
    
    			<subwindow_record name="main">
    				<class>npc_main</class>
    			</subwindow_record>
    
    			<subwindow_record name="notes">
    				<class>npc_notes</class>
    			</subwindow_record>
    
    			<scrollbar_record>
    				<target>main</target>
    			</scrollbar_record>
    			<scrollbar_record>
    				<target>notes</target>
    			</scrollbar_record>
    
    			<tabs_recordsheet>
    				<tab>
    					<icon>tab_main</icon>
    					<subwindow>main</subwindow>
    				</tab>
    				<tab>
    					<icon>tab_notes</icon>
    					<subwindow>notes</subwindow>
    				</tab>
    			</tabs_recordsheet>
    
    			<resize_recordsheet />
    			<close_recordsheet />
    		</sheetdata>
    	</windowclass>
    
    ... the npc header etc here ...
    
    	<windowclass name="npc_notes">
    		<margins control="0,0,0,2" />
    		<script>
    			function onInit()
    				local nodeNPC = getDatabaseNode()
    				local bReadOnly = WindowManager.getReadOnlyState(nodeNPC);
    
    				reach.setReadOnly(bReadOnly)
    				space.setReadOnly(bReadOnly)
    				actor_tags.setReadOnly(bReadOnly)
    				divider.setVisible(true)
    				update()
    			end
    
    			function update()
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
    
    				description.setReadOnly(bReadOnly)
    			end
    		</script>
    		<sheetdata>
    			<anchor_column name="columnanchor" />
    
    			<label_column name="space_label">
    				<static textres="npc_label_size" />
    			</label_column>
    			<number_column name="space">
    				<default>1</default>
    			</number_column>
    
    			<label_column_right name="reach_label">
    				<anchored to="space" />
    				<static textres="npc_label_reach" />
    			</label_column_right>
    			<number_column_right name="reach">
    				<anchored to="space" />
    				<default>1</default>
    			</number_column_right>
    
    
    			<label_column name="actor_tags_label">
    				<static textres="actor_tags_label" />
    			</label_column>
    
    			<string_columnh name="actor_tags" />
    
    
    			<line_column name="divider" />
    			
    
    			<ft_record name="description">
    				<anchored>
    					<top parent="divider" anchor="bottom" offset="15" />
    
    					<left parent="" offset="0" />
    				</anchored>
    				<empty textres="ft_empty" />
    			</ft_record>
    		</sheetdata>
    	</windowclass>

    Any suggestion? Not sure what I need to do for dragging, for example, a roll I just created to it requires.
    Last edited by Varsuuk; May 15th, 2021 at 23:15.

  6. #6
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    What the bloody hell... it just worked when I went to test another thing (inserting when cursor between words) and then it works at the start as well and at end... but seems to be tricky like I need to have the focus in the control blinking vs dropping atop it...

    This is probably the difference between the two. It drops "cleaner" on MoreCore version because that whole tab is just one FormattedText control probably vs mine which has a FT but only as one of many elements?

    Tired - will relook tomorrow to see if anything else I can figure.

    It seems

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
  •  
DICE PACKS BUNDLE

Log in

Log in