STAR TREK 2d20
Page 1 of 2 12 Last

Thread: Alignment help

  1. #1

    Alignment help

    Hello,

    I created a new frame for the chat window, but now the text isn't aligned well. Can someone point me to where I need to go to find this code?

    chatbox.png

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    The chat window is defined in CoreRPG desktop\desktop_classes.xml - the "chat" windowclass. This will show you all of the controls that are used in the chat window, most of which are defined in desktop\template_desktop.xml.
    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
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    I'm so NOT an expert, but a quick look inside CoreRPG shows that in desktop/desktop_panels.xml you have a section delineating the sizes of the hatbox area:

    Code:
    	<panel name="chat" modes="host">
    		<class>chat</class>
    		<bounds>5,90,390,-130</bounds>
    		<dynamic />
    		<locked />
    	</panel>
    	<panel name="chat" modes="client">
    		<class>chat</class>
    		<bounds>5,90,390,-110</bounds>
    		<dynamic />
    		<locked />
    	</panel>
    	<panel name="chat" modes="local">
    		<class>chatlocal</class>
    		<bounds>5,90,390,-110</bounds>
    		<dynamic />
    		<locked />
    	</panel>
    Perhaps it is as simple as aligning the two bounds?

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Varsuuk View Post
    I'm so NOT an expert, but a quick look inside CoreRPG shows that in desktop/desktop_panels.xml you have a section delineating the sizes of the hatbox area:

    Code:
    	<panel name="chat" modes="host">
    		<class>chat</class>
    		<bounds>5,90,390,-130</bounds>
    		<dynamic />
    		<locked />
    	</panel>
    	<panel name="chat" modes="client">
    		<class>chat</class>
    		<bounds>5,90,390,-110</bounds>
    		<dynamic />
    		<locked />
    	</panel>
    	<panel name="chat" modes="local">
    		<class>chatlocal</class>
    		<bounds>5,90,390,-110</bounds>
    		<dynamic />
    		<locked />
    	</panel>
    Perhaps it is as simple as aligning the two bounds?
    That's for the size and placement of the chat window on the desktop itself. It's not the positioning of the chat controls within the chat window.
    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
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Eep Trenloe, I started mine before I saw your post - seems was in right direction but off a bit

    Saw this while checking on something else and gave it a quick shot - back to bed and cold/allergy medicine for me

  6. #6
    If you change the edge sizes of any of the frames, you also need to update the windowclass definitions to move the controls within the window to relate to the new frame edge sizes.

    In the frame graphic you've provided above, you've added significant frame edge on the left side, which is why all of the text overlays the left edge design. Now, you'll need to modify the "chat" windowclass to move all the fields right to address the changes.

    When people talk about making new themes, one of the things that I heavily emphasize is that their frame graphics should mirror the same edge depth as existing frames, or you have to start modifying windows to move fields around.

    Regards,
    JPG

  7. #7
    OK, I have spent the last hour on fixing this. I am lost on one thing. I was able, between desktop_classes and Template_desktop, to move everything in position except the cursor. I can not, for the life of me, find where that is.

    chatbox.png

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Have you changed the anchored data for <template name="basicchatentry">
    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
    Yeah, that adjusts the size of the chatbox, but not the cursor position.

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    What changes did you make to the following code in template_desktop.xml?

    Code:
    	<template name="chatentry_step">
    		<chatentry name="entry">
    			<anchored>
    				<sizelimits>
    					<maximum height="160" />
    				</sizelimits>
    			</anchored>
    			<frame name="chatentry" offset="2,2,50,2" />
    			<multilinespacing>20</multilinespacing>
    			<chatwindow>chat</chatwindow>
    			<font>chatfont</font>
    			<script file="desktop/scripts/chat_entry.lua" />
    		</chatentry>
    	</template>
    	<template name="basicchatentry">
    		<chatentry_step>
    			<anchored position="insidebottomleft" offset="18,14">
    				<right offset="-65" />
    				<sizelimits>
    					<maximum height="160" />
    				</sizelimits>
    			</anchored>
    		</chatentry_step>
    	</template>
    Changing the <anchored position="insidebottomleft" offset="18,14"> in <template name="basicchatentry"> should be all you need to do to move the position of the whole chat entry controls - frame, text entry, voice indicator, etc..
    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)

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