PDA

View Full Version : Alignment help



statik37
September 12th, 2019, 14:19
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?

28937

Trenloe
September 12th, 2019, 16:05
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.

Varsuuk
September 12th, 2019, 16:09
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:



<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?

Trenloe
September 12th, 2019, 16:11
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:



<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.

Varsuuk
September 12th, 2019, 16:11
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 :)

Moon Wizard
September 12th, 2019, 17:47
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

statik37
September 12th, 2019, 18:04
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.

28939

Trenloe
September 12th, 2019, 18:15
Have you changed the anchored data for <template name="basicchatentry">

statik37
September 12th, 2019, 18:19
Yeah, that adjusts the size of the chatbox, but not the cursor position.

Trenloe
September 12th, 2019, 18:34
What changes did you make to the following code in template_desktop.xml?


<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..

statik37
September 12th, 2019, 18:52
That was it. I ended up focusing on moving the individual elements, and not the whole as one.