Thread Tools Display Modes
04/02/14, 10:06 AM   #1
Kian
 
Kian's Avatar
Join Date: Apr 2014
Posts: 4
Resize Chat Window

How would this be done? I'm new to LUA and addons in general. But i'm not new to programming.

I used to Zgoo to output /zgood mouse when highlighted on the chat window which produced

Code:
    ["ZO_ChatWindow"] =   < "ZO_ChatWindow" - CT_TOPLEVELCONTROL >

      (m) GetDesiredHeight() = 380
      (m) GetDesiredWidth() = 550
The desired height/width is probably just returning the already set values, but looking through the wiki, I saw:

Code:
SetWidth protected-attributes (number width)
Setheight protected-attributes (number height)
This is just a personal preference addon and if is easier to hard code the values, I will. Just need to get started

I done the MyFirst Tutorial with the counters but doesn't really help with the in-game elements.

I have created the three files:

ChatResizer.lua
ChatResizer.txt
ChatResizer.xml

Any help would be great.

Thanks,
  Reply With Quote
04/02/14, 10:16 AM   #2
ingeniousclown
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 122
Hey! You left IRC before I had a chance to respond

Anyway, you're on the right track. UI Controls are all global from what I can tell, and the name ("ZO_ChatWindow" in this case) is the same as the variable that holds it.

You should start with ZO_ChatWindow:SetHeight(y) and :SetWidth(x) and see what happens. If it doesn't have the desired results, make sure you look and see if there are any children of ZO_ChatWindow and if they might need to be set. My bet is that you'll need to dig into those children, but your guess is as good as mine at this point.

You can also test small changes in the game by using the /script command. eg: "/script ZO_ChatWindow:SetWidth(x)"

Just know that if you do create something like this, it might have compatibility issues with any other add-on that interacts with the same already-existing controls.
  Reply With Quote
04/02/14, 10:28 AM   #3
Kian
 
Kian's Avatar
Join Date: Apr 2014
Posts: 4
Hey! I got disconnected from IRC and it didn't tell me until after, i figured I missed you

thanks very much for the tips! I'm going to test that /script command in game right now, and if its the winner, its all good. I might have seen a couple of children when using /zgoo, but lets hope thats not a problem.

Then I can start constructing the .lua file. Would need some tips on that if you don't mind
  Reply With Quote
04/02/14, 10:50 AM   #4
ingeniousclown
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 122
My suggestion for that is to download a few mods from other folks and kinda see how they set things up.
  Reply With Quote
04/02/14, 11:15 AM   #5
Kian
 
Kian's Avatar
Join Date: Apr 2014
Posts: 4
I will look at some other mods that I have already installed, cheers!

The ZO_ChatWindow is not going above Height: 380. This has to be locked somewhere that i'm not seeing.

Going to poke around with /Zgoo but if anyone has any ideas, please let me know
  Reply With Quote
04/02/14, 12:27 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Try printing the results of this method:
GetDimensionConstraints()
Returns: number minWidth, number minHeight, number maxWidth, number maxHeight
/edit: so....
lua Code:
  1. /script d(ZO_ChatWindow:GetDimensionConstraints())

If there is a max, you may need to chage it with :SetDimensionConstraints()
  Reply With Quote
04/02/14, 01:08 PM   #7
Kian
 
Kian's Avatar
Join Date: Apr 2014
Posts: 4
Hey thanks for the tip.

Using /Zgoo I got these results for ZO_ChatWindow

Code:
(m) GetDimensionConstraints() = table [#4,4]
        [1] = 300
        [2] = 170
        [3] = 550
        [4] = 380
Let me try the LUA and I will edit back if somehow different.

-Same. Lets have a go at changing the dimensions.

It works using /script so thank you so much. This is just what I wanted

But for a more permanent method, I might as well put this up as an Addon.

Last edited by Kian : 04/02/14 at 01:32 PM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Resize Chat Window


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off