DICE PACKS BUNDLE
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    Help figuring out how to move an "ft_record" control on a tab

    I really think this one will stump me for a long time given the amount of possibilities and the even bigger amount of my xml/control/ui ineptitude (it's why so much of my customization in my first run will be lua driven and not xml driven )

    I made changes to record_npc.xml to change what and how some things are displayed on the npc_main tab. That worked out fine (after many stop/starts ;P)
    Then I realized I DID need size/reach after all (when seeing ow used in FG - hey... I never even DMed in FG, I only play - so limited technical use )

    I thought, I didn't want it at the top of every NPC - especially as it wil be defaulted to 1,1 99% of the time. So, I thought, instead of putting at the bottom (which is really out of the way) - how about on the top of the "notes" page tab? So I put it there to see and it looked fine. Well, except what I did did not put the formatted text thing - jsut my new fields. OK. So I did what I always do - test random small changes to get understanding and quickly realized I really don't know how these work right now.

    So... to recap base morecore:

    Code:
    <root>
    	<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 />
    		<script>
    ...
    		</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>
    
    	<windowclass name="npc_header">
    		<margins control="0,0,0,7" />
    		<script>
    			function onInit()
    				update();
    			end
    			function update()
    				local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
    				name.setReadOnly(bReadOnly);
    				token.setReadOnly(bReadOnly);
    			end
    		</script>
    		<sheetdata>
    			<link_record_header>
    				<class>npc</class>
    			</link_record_header>
    
    			<anchor_record_header_right />
    			<button_activateid>
    				<anchored to="rightanchor" width="23" height="22">
    ...
    
    			</sheetdata>
    	</windowclass>
    
    	<windowclass name="npc_main">
    		<margins control="0,0,0,2" />
    		<script>
    ...
    
    ---> This is the stuff I moved to sheetdata on the newly added windowclass="npc_notes" etc...
    		</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>
    
    			<line_column name="divider" />
    ...
    ----> continues with the npc_main controls below...
    ...

    So, I tried doing:

    Code:
    			<subwindow_record name="main">
    				<class>npc_main</class>
    			</subwindow_record>
    			<subwindow_record name="notes">
    				<class>npc_notes</class>
    			</subwindow_record>
    And defined the windowclass "npc_notes" with the size/reach/divider controls and all went well..

    BUT - how do I use
    Code:
    			<ft_record name="notes">
    				<anchored to="contentframe" position="over" />
    				<empty textres="ft_empty" />
    				<invisible />
    			</ft_record>
    or something LIKE it on that tab to fill out the REST of the window, ie - like "insert before" the size/reach/divider controls?

    I am not sure I am describing what I want here right - I wish I could SPEAK it vs typing it cos communication, especially written, is not my forte ;P Talking is... but that's another issue.

    I am not sure if it is easy to describe the general solution even if you can understand what I am asking for.


    Thanks, as always, for your support!

  2. #2
    I think you're making things more difficult than they have to be. Just leave those fields on the main page; and move around as needed.

    For example, the 3.5E ruleset redefines the entire "npc_main" page; and pulls that information from the "Type" field when needed to add NPC to the combat tracker.

    I would just move to bottom of the main page; or wherever you want on that page. It's a "combat mechanic"; so it really belongs there. Whereas the notes page is purely for notes.

    Regards,
    JPG

  3. #3
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    OK - its just that "at the bottom" is pretty far down - like scrolled off - I suck at UI and for now decided it might be nice to leave NPCs to be so slender but to be able to READ the CAS rolls, I needed to not have it as 2 columns wide and reworked it for vertical stacking - it works with main 2 "boxes" on front page - rest you scroll.

    Well, since posting as usual - it helped me think and I got it working mostly ALREADY (all while playing a video game in between rests) by expanding the templates and tweaking (eventually will retemplate a new one maybe)

    So far, works except for the left-right margins seem to be doubling (I can guess why) I'll revise late tonight now that I need not obsess seeing I can make it work. My MAIN issue is it was :invisible: by default so I didn't see the text and thought it wasn't showing up. Will looks why later.

    You are right about it being a combat mech - but front page is too busy and I want that way right or wrong. I HATE GUIs and can always take feedback once functionality is in. IF anyone finds it valuable, they can likely help suggest changes once it is distributed.

    Getting much closer now. Finally.

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 Product Walkthrough Playlist

Log in

Log in