1. #1

    Making frame dinamicaly resizable ?

    Hi, I'ts me, again :/

    After days of fails trying to create a custom PC charsheet, i'm stuck on this :
    On the Abilities page on the charsheet, i have 4 frame containing : Traits, Abilities, Proficiency, Feats.
    I'm able to make the sheet resizable, but i can't find how to make each frame dynamically resizable.

    The only thing i was abble to do at this time is :

    - Top Left Frame : Resizable Vertically
    - Top Right Frame : Resizable Horizontally/Vertically
    - Bottom Left : Nothing
    - Bottom Right : Resizable Horizontally

    Can someone help me to understand how to do that ? Thanks a lot.
    I'd like to have 4 frame with same size, but that they resize dynamically with the charsheet, all the same way.

    Sorry for my english if you d'ont understand

    I'm working on this part of the xml code for positionning :

    Code:
    		<sheetdata>
    			<frame_char name="featframe">
    				<bounds>255,-225,-25,225</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="featframe" />
    				<static textres="char_label_feats" />
    			</label_frametop>
    			<list_charabilities name="feats">
    				<anchored to="featframe" />
    				<datasource>.featlist</datasource>
    				<class>char_ability_feat</class>
    			</list_charabilities>
    			<scrollbar>
    				<anchored to="feats" />
    				<target>feats</target>
    			</scrollbar>
    			<button_iedit name="feats_iedit">
    				<anchored to="feats" position="aboveright" offset="5,5" />
    				<target>feats</target>
    			</button_iedit>
    			<button_iadd name="feats_iadd">
    				<anchored to="feats" position="aboveleft" offset="5,5" />
    				<target>feats</target>
    			</button_iadd>
    
    			<frame_char name="specialabilityframe">
    				<bounds>255,0,-25,-225</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="specialabilityframe" />
    				<static textres="char_label_sa" />
    			</label_frametop>
    			<list_charabilities name="specialabilities">
    				<anchored to="specialabilityframe" />
    				<datasource>.specialabilitylist</datasource>
    				<class>char_ability_class</class>
    			</list_charabilities>
    			<scrollbar>
    				<anchored to="specialabilities" />
    				<target>specialabilities</target>
    			</scrollbar>
    			<button_iedit name="specialabilities_iedit">
    				<anchored to="specialabilities" position="aboveright" offset="5,5" />
    				<target>specialabilities</target>
    			</button_iedit>
    			<button_iadd name="specialabilities_iadd">
    				<anchored to="specialabilities" position="aboveleft" offset="5,5" />
    				<target>specialabilities</target>
    			</button_iadd>
    
    			<frame_char name="proficiencyframe">
    				<bounds>15,-225,240,225</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="proficiencyframe" />
    				<static textres="char_label_proficiencies" />
    			</label_frametop>
    			<list_charabilities name="proficiencies">
    				<anchored to="proficiencyframe" />
    				<datasource>.proficiencylist</datasource>
    				<class>char_ability_proficiency</class>
    			</list_charabilities>
    			<scrollbar>
    				<anchored to="proficiencies" />
    				<target>proficiencies</target>
    			</scrollbar>
    			<button_iedit name="proficiencies_iedit">
    				<anchored to="proficiencies" position="aboveright" offset="5,5" />
    				<target>proficiencies</target>
    			</button_iedit>
    			<button_iadd name="proficiencies_iadd">
    				<anchored to="proficiencies" position="aboveleft" offset="5,5" />
    				<target>proficiencies</target>
    			</button_iadd>
    
    			<frame_char name="traitframe">
    				<bounds>15,0,240,-225</bounds>
    			</frame_char>
    			<label_frametop>
    				<anchored to="traitframe" />
    				<static textres="char_label_traits" />
    			</label_frametop>
    			<list_charabilities name="traits">
    				<anchored to="traitframe" />
    				<datasource>.traitlist</datasource>
    				<class>char_ability_race</class>
    			</list_charabilities>
    			<scrollbar>
    				<anchored to="traits" />
    				<target>traits</target>
    			</scrollbar>
    			<button_iedit name="traits_iedit">
    				<anchored to="traits" position="aboveright" offset="5,5" />
    				<target>traits</target>
    			</button_iedit>
    			<button_iadd name="traits_iadd">
    				<anchored to="traits" position="aboveleft" offset="5,5" />
    				<target>traits</target>
    			</button_iadd>
    		</sheetdata>
    Last edited by PolluxTroy; June 15th, 2017 at 14:44.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,945
    Quote Originally Posted by PolluxTroy View Post
    I'd like to have 4 frame with same size, but that they resize dynamically with the charsheet, all the same way.
    You're going to have to use a mixture of normal and negative static bounds to anchor portions of the frames to the edges of the window.

    Then, as you want everything to be the same size, the dynamic corners need to be anchored to the center of the window.

    That is:
    - Feats frame (top left) - static bounds for the top left, dynamic bounds for the bottom right.
    - Special Abilities frame (top right) - static bounds for the top and right, dynamic bounds for the bottom and left right.
    - Proficiency frame (bottom left) - static bounds for the bottom and left dynamic bounds for the top and right.
    - Racial Traits frame (bottom right) - static bounds for the bottom and right, dynamic bounds for the top and left.

    See post #6 for info on anchoring to the center of the window.
    Last edited by Trenloe; June 16th, 2017 at 12:03. Reason: info using center anchor

    FG Con 15 – Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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
    Ok, so i need to create a lua script in order to do that ?

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,945
    Quote Originally Posted by PolluxTroy View Post
    Ok, so i need to create a lua script in order to do that ?
    Yes.

    FG Con 15 – Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,945
    Or, hang on a second... I'm seeing a anchor="center" statement in the Savage Worlds charsheet, that might do what you want. Give me a moment to check it out...

    FG Con 15 – Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,945
    I haven't tested this. But you could try something like this, using the anchor="center" which, in this example, is the center of the window.

    Code:
    <frame_char name="featframe">
    	<anchored>
    		<top anchor="top" offset="225" />
    		<left anchor="left" offset="255" />
    		<bottom anchor="center" offset="-20" />
    		<right anchor="center" offset="-20" />
    	</anchored>
    </frame_char>
    This will have a static top and left position - the offset is relative to the edge of the window. But the bottom and right of the frame will be offset 20 pixels to the top and left of the center of the window.

    Let me know if this works. You'll probably have to experiment with the exact offset values.

    FG Con 15 – Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  7. #7
    It seems to work, for the feats frame, but the 2nd frame on the right "Particularitιs" it's not. It's dynamic but the left border don't move.

    Code:
    <frame_char name="featframe">
    	<anchored>
    		<top anchor="top" offset="0" />
    		<left anchor="left" offset="15" />
    		<bottom anchor="center" offset="-20" />
    		<right anchor="center" offset="-20" />
    	</anchored>
    </frame_char>
    
    <frame_char name="specialabilityframe">
    	<anchored>
    		<top anchor="top" offset="0" />
    		<left anchor="left" offset="255" />
    		<bottom anchor="center" offset="-20" />
    		<right anchor="center" offset="-20" />
    	</anchored>
    </frame_char>
    First.PNG
    Sec.PNG
    Last edited by PolluxTroy; June 15th, 2017 at 19:53.

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,945
    Quote Originally Posted by PolluxTroy View Post
    It's dynamic but the left border don't move.
    That's because you're still using a static anchor to the left side of the window for the left side of that frame. Each frame is different. See what I listed in post #2 for what has to be static and what has to be dynamic (anchored to "center") for each frame.

    FG Con 15 – Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  9. #9
    Oh, my bad. It works great like this. Thank you Trenole, you're the best

    A last little question : If i want to share some extensions i've made, what i must add in them for copyright notice ? I've searched on the forum but didn't see anything clear.
    By copyright i'ts not for my wrk but because extensions are using some corerpg and 3.5e part modified by me.

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    23,945
    Include the Smiteworks copyright statement that comes in the ruleset announcement that appears in the chat window.

    FG Con 15 – Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in