PDA

View Full Version : Added "Send Message" button to "who" dis


geowar
07-28-2004, 01:26 AM
So how do i get it into Cosmos?

in <FrameXML/FriendsFrame.xml>:

<Button name="WhoFrameGroupInviteButton" inherits="UIPanelButtonTemplate" text="PARTY_INVITE">
<Size>
<AbsDimension x="55" y="22"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-40" y="82"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
InviteByName(WhoFrame.selectedName);
</OnClick>
</Scripts>
</Button>
<Button name="WhoFrameAddFriendButton" inherits="UIPanelButtonTemplate" text="ADD_FRIEND">
<Size>
<AbsDimension x="85" y="22"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="WhoFrameGroupInviteButton" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
AddFriend(WhoFrame.selectedName);
</OnClick>
</Scripts>
</Button>
<Button name="WhoFrameWhoButton" inherits="UIPanelButtonTemplate" text="REFRESH">
<Size>
<AbsDimension x="65" y="22"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="WhoFrameAddFriendButton" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
WhoFrameEditBox_OnEnterPressed();
</OnClick>
</Scripts>
</Button>
<Button name="WhoFrameSendMessageButton" inherits="UIPanelButtonTemplate" text="SEND_MESSAGE">
<Size>
<AbsDimension x="125" y="22"/>
</Size>
<Anchors>
<Anchor point="RIGHT" relativeTo="WhoFrameWhoButton" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
WhoFrame_SendMessage();
</OnClick>
</Scripts>
</Button>

and in <FrameXML/FriendsFrame.lua> added:

function WhoFrame_SendMessage()
local name = WhoFrame.selectedName;
if ( not ChatFrameEditBox:IsVisible() ) then
ChatFrame_OpenChat("/w "..name.." ");
else
ChatFrameEditBox:SetText("/w "..name.." ");
end
ChatEdit_ParseText(ChatFrame1.editBox, 0);
end

sarf
07-28-2004, 07:05 AM
Well... try putting your mod into the original files, add in a readme for what you've changed (no long explanations needed) and put the whole shebang into a zipped/compressed file, upload it somewhere and post the link here. I'll make sure it gets to someone's attention.

By the way, why not use alt/shift clicking on a persons name instead of a seperate button? (since that's used elsewhere)

Sarf
---
There's a pizza place near where I live that sells only slices. In the back you can see a guy tossing a triangle in the air.

geowar
07-28-2004, 05:12 PM
Well... try putting your mod into the original files, add in a readme for what you've changed (no long explanations needed) and put the whole shebang into a zipped/compressed file, upload it somewhere and post the link here. I'll make sure it gets to someone's attention.

Done: <http://homepage.mac.com/geowar1/FileSharing1.html>.

It's in the "Temporary Items" folder and is named "WhoMessage.zip".

Two files (plus a readme: <FriendsFrame.txt>; The FriendsFrame.xml & FriendsFrame.lua files go into Cosmos's "/Interface/FrameXML/" directory. You can diff with the existing files to see what I had to change.

By the way, why not use alt/shift clicking on a persons name instead of a seperate button? (since that's used elsewhere)


That's not working; I'll look into adding it thou. Thx.

sarf
07-28-2004, 08:42 PM
EDIT: added new info

OK, I'll try to snag a Cosmos developer in the chat channel - I'll post back with their feedback.

Back.

Hmm... it seems there already is a button in the friends frame - perhaps you meant to add it to the Who frame?

Sarf
---
Computers make very fast, very accurate mistakes.

geowar
07-29-2004, 05:35 PM
EHmm... it seems there already is a button in the friends frame - perhaps you meant to add it to the Who frame?


The "WhoFrame" is implemented in the <FrameXML/FriendsFrame.xml> source. All I did was re-size the existing buttons and add the "Message" button.

sarf
07-29-2004, 05:36 PM
Oops. My bad. :( I didn't check through the source code... oh well - I'll forward the patch once more. Sorry about the mistake!

Sarf
---
Some of the best things in life are free, but so are some of the worst. I can't remember the last cancer celebration I went to.