Quantcast LoTROInterface - View Single Post - Help affecting other windows
View Single Post
  #8  
Unread 09-29-2010, 02:59 AM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
Send a message via MSN to Digital_Utopia Send a message via Yahoo to Digital_Utopia
Quote:
Originally Posted by Olenn
Thanks, DU. I have been digging through your code all day. Your classes are quite elegant and I have been learning a lot. I have my entire settings window built now and I am still figuring out what everything does and how to tie it all up.

Here is the code if you are interested.


One question, is there a reason you create your own window as opposed to using Turb's? It seams that if I use Turb's window that it accepts skins from users. Just a question, thanks for everything.
Main reason is simple. The default Turbine.UI.Lotro.Window's title bar will continue to grow with the window. The real titlebars in the in game windows grow no larger than 255px. My class was designed to create a "realistic" Window. Sadly this means that it no longer accepts skins - but I felt that this was a necessary sacrifice.

The BaseWindow class on the other hand is a standard window without a titlebar - something, like most of my other elements in this folder, didn't exist in the actual API. The only exceptions are the previously mentioned Window class, and the CheckBox - which only exists because it was made before they added that class to the API.

As far as elegance? Nah. You can probably see several areas where I switch between self:<function> and self.function, and some of those classes could use constructors instead of requiring properties to be set. I will admit however that they work as close as possible to the behavior of the real thing, and I did try to make it as painless as possible to use.

If you're planning on using the DropDown box, you need to handle the open/close event yourself in it's parent class (the window/control you're displaying it in). The reason is that if you're dealing with a ListBox full of settings, opening the dropdown box will cause the list to fall behind items below it. So you essentially have to carry over the open/close event, and assign the list (i.e. the box that "drops down") to a local variable within that parent class, in order for it to display properly. Yeah, it's very ugly....but my intent was to get it working for use in Palantir - and despite the ugliness, it works well If you plan on using it, let me know and I'll post some example code.
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote