Home Forum Downloads My Favorites Register FAQ Mark Forums Read

Go Back   EQInterface Forums > Developer Discussion > General authoring help / discussion
User Name
Password

Reply
 
Thread Tools Display Modes
Old 12-17-2012, 09:20 AM   #16
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 203
Interface Author - Click to view interfaces
Default

I am really looking forward to the end result of your work. I use SidlWidl currently, and it still is fairly useful.

One thing that you could keep in mind that would be very helpful is the fact that the EQ parser interprets <Style_Border>True</Style_Border> as false. It is case sensative, and SidlWidl always makes "true"s capitalized. I always have to edit it in a text editor after to make them all lower case.

If you could make sure that is correct, it would be totally awesome.
valaury3169 is offline   Reply With Quote
Old 12-20-2012, 03:45 AM   #17
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Had a (Nvidia) driver update screw up so badly that I was unable to figure out a sane solution. Spent 8 hours trying to clean up the mess it made, was unable to install any video drivers (not even Windows compatibility drivers). Not going to be using Nvidia's automatic update again.

In the end I had to reinstall Windows, which means I get the joy of reconfiguring everything how I like it. I used a Windows disc with most of my software, but that disc is two years old, and a lot has changed in my workflow since then.

Probably be a couple days before I get everything set up well enough that I feel comfortable coding again.
__________________

"Computers are like Air Conditioners, they stop working properly when you open Windows."
shillingworth is offline   Reply With Quote
Old 12-20-2012, 03:47 AM   #18
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Quote:
Originally Posted by valaury3169
I am really looking forward to the end result of your work. I use SidlWidl currently, and it still is fairly useful.

One thing that you could keep in mind that would be very helpful is the fact that the EQ parser interprets <Style_Border>True</Style_Border> as false. It is case sensative, and SidlWidl always makes "true"s capitalized. I always have to edit it in a text editor after to make them all lower case.

If you could make sure that is correct, it would be totally awesome.


Yeah, that's already handled by the way it's set up to output XML code. Wasn't intentional, just kinda worked out on it's own.
shillingworth is offline   Reply With Quote
Old 12-20-2012, 08:36 AM   #19
Drakah
Skinning Guru
 
Drakah's Avatar
 
Join Date: Jul 2002
Posts: 1,011
Interface Author - Click to view interfaces
Default

Sorry to hear that Shill I remember I had a similar issue and I had used "Driver Sweeper" to uninstall the nvidia drivers, which....If I remember right....found all of the leftover files and I was good to go with the previous version. The program is now replaced with "Driver Fusion", now that I google'd it. The other way that had worked for me was just rolling back the driver right from device manager. All null and void now for you though....but hope you get back on your feet soon!
__________________
Regards,

Drakah

shakahr.com
Remember...it is only a GAME
Drakah is offline   Reply With Quote
Old 12-20-2012, 06:49 PM   #20
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Yeah that was the first thing I tried Drakah. I spent about an hour or two after that figuring out how to get a command prompt into kernel mode to get rid of some files that not even admin could delete. I was very obstinate about not reinstalling Windows, but well couldn't avoid it.
shillingworth is offline   Reply With Quote
Old 12-27-2012, 04:37 AM   #21
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Well as it turned out, wasn't the driver update, that just a side effect of the real problem. Was playing Mass Effect series again, sure enough after I installed part three the problems came back. It turned out to be EA's client software, once I got rid of that the problems went away, but sadly it crippled the game (had to use a cheat to keep readiness up without it).
shillingworth is offline   Reply With Quote
Old 01-06-2013, 02:22 PM   #22
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Could use some help in determining the precedence of the following settings, as well as any strange behavior different combinations of settings on them has.

Location, Size, Min/Max Size, AutoStretch, AutoStretchHorizontal, AutoStretchVertical, RelativePosition, XAnchorToY, and AnchorOffsets to determine which direction positive and negative is from the respective edge they control.

I have a vague idea on how those should behave, but this is EQ we're talking about, it's loaded with strangeness and contradictions.
shillingworth is offline   Reply With Quote
Old 01-06-2013, 05:40 PM   #23
Drakah
Skinning Guru
 
Drakah's Avatar
 
Join Date: Jul 2002
Posts: 1,011
Interface Author - Click to view interfaces
Default

The only thing I can tell you is what they "do" (how they act in code) but I doubt that is what you are requesting to know.
Drakah is offline   Reply With Quote
Old 01-07-2013, 12:42 PM   #24
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 203
Interface Author - Click to view interfaces
Default

This is my best explanation. First, AutoStretch would have to be first because it determines whether size/location is used, or Anchors/Offsets are used. I have not specifically used the AutostretchVerticle/Horizontal, but I feel sure it is the same.

If AutoStretch is set to false, then values in the anchors and offsets are ignored and only size/location is evaluated. If it is true, then the opposite is true; size and location are ignored and the anchors and offsets are evaluated. Autostretch is used to determine if an object within the window resizes with the parent container, or is fixed regardless of how the parent is resized. Autostretch=false means the object is fixed in position and size.

To understand the anchors and offsets you have to realize that all objects have 4 sides (I know, duh ) and each side can be set separately. Starting with the top (I don't think EQ cares which is evaluated first) first you determine if you want the top edge of the object to 'hook' to the top of the parent container or to the bottom. TopAnchorToTop=true 'hooks' the top edge of the parent container. False 'hooks' it to the bottom edge.

Next you use ToAnchorOffest to determine how far away (in pixels) the edge you just hooked is away from the edge you just hooked it to.

One thing to keep in mind is that even though Autostretch may be on, you can define the anchors and offsets to make things appears as if they are fixed positioned. You often find this with buttons.

Min/Max size is probably last, as it is only used when the container is actually resized. I have never set them, so I am not sure of their exact behavior.

A couple of other things to remember; all objects are rendered bottom to top based on their order in the <pieces> list. Also remember that anchors are fixed to their parent container and not the main window. Lastly, any property that is omitted, but indicated will be defaulted to false. So, if the xml for TopAnchorToTop is not present], but Autostretch=true, then TopAnchorToTop will be false meaning it will be 'hooked' to the bottom edge. And of course as I mentioned before, TopAnchorToTop=True (capital 'T') then it is actually interpretted by EQ to be false thereby 'hooking' it to the bottom edge.

Oh, one other thing, if you try and render something 'inside-out' it will not appear at all. By inside-out I mean that the top edge is below the bottom edge or the right edge is to the left of the left edge. This is only achievable by setting AutoStretch=true.

Hopefully this isn't a recap of stuff you already knew and it is actually useful.
valaury3169 is offline   Reply With Quote
Old 01-08-2013, 01:02 PM   #25
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Pretty much explained what it should work like val. You did provide a useful piece of info, that inverting the coordinates results in nothing being drawn. That makes sense given unless you tell Direct3D you want two-sided rendering, it will only draw the front side (which is determined by winding order). So that piece of info tells me EQ is drawing the entire UI with one-side rendering, which save me from having to dig through a graphics debug spew to find the UI draw calls and what state they have set.

Here's the code as it stands now in EQIA for dealing with the size/location. It's the order I'm most worried about.

Just so you can read this, I use short-hand if's in this code which have the format 'condition ? true-side : false-side'
Code:
Rectangle dest = new Rectangle(); if (RelativePosition) { int left = 0, right = 0, top = 0, bottom = 0; if (AutoStretch) { // anchored all the way around? left = LeftAnchorToLeft ? parentRectangle.Left + LeftAnchorOffset : parentRectangle.Right - LeftAnchorOffset; right = RightAnchorToLeft ? parentRectangle.Left + RightAnchorOffset : parentRectangle.Right - RightAnchorOffset; top = TopAnchorToTop ? parentRectangle.Top + TopAnchorOffset : parentRectangle.Bottom - TopAnchorOffset; bottom = BottomAnchorToTop ? parentRectangle.Top + BottomAnchorOffset : parentRectangle.Bottom - BottomAnchorOffset; } else { if (AutoStretchHorizontal) { // anchored X and Width left = LeftAnchorToLeft ? parentRectangle.Left + LeftAnchorOffset : parentRectangle.Right - LeftAnchorOffset; right = RightAnchorToLeft ? parentRectangle.Left + RightAnchorOffset : parentRectangle.Right - RightAnchorOffset; } else { // relative X and Width left = parentRectangle.Left + Location.X; right = left + Size.Width; } if (AutoStretchVertical) { // anchored Y and Height top = TopAnchorToTop ? parentRectangle.Top + TopAnchorOffset : parentRectangle.Bottom - TopAnchorOffset; bottom = BottomAnchorToTop ? parentRectangle.Top + BottomAnchorOffset : parentRectangle.Bottom - BottomAnchorOffset; } else { // relative Y and Height top = parentRectangle.Top + Location.Y; bottom = top + Size.Height; } } dest = new Rectangle(left, top, right - left, bottom - top); } else { // absolute location and size dest.X = Location.X; dest.Y = Location.Y; dest.Width = Size.Width; dest.Height = Size.Height; }
shillingworth is offline   Reply With Quote
Old 01-08-2013, 03:40 PM   #26
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 203
Interface Author - Click to view interfaces
Default

I have never used the AutoStretchHorizontal/Vertical, so I can't say if they take precident over AutoStretch, but approaching it logically, your order seems the most correct.

I don't know if your psuedo-code is comprehensive, but don't forget to factor in the property RelativePositioning. True behaves just as we have been talking about. False, however, ignores the parent container. I have never observed the behavior of an element within another container and having RelativePositioning set to false, but I have accidently done it for top level elements. I have on many occassions placed buttons at 0,0, only to find them at the top-left corner of EQ. Honestly, I can't even imagine why anyone would not use relative postioning for elements.

As a note, I am a coder for a living, so unless you're writing this in Delphi or Fortran, I can most likely read any code you paste
valaury3169 is offline   Reply With Quote
Old 01-10-2013, 02:14 AM   #27
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

That's not psuedo-code, that's actual C# code. The RelativePosition stuff is in the else clause of AutoStretchHorizontal and AutoStretchVertical, my assumption is AutoStretch trumps Location/Size but does nothing if RelativePosition is false.
shillingworth is offline   Reply With Quote
Old 01-10-2013, 11:38 AM   #28
valaury3169
Enhanced Imperial Golem
 
Join Date: Jun 2008
Posts: 203
Interface Author - Click to view interfaces
Default

RelativePostion is independent of Autostretch. Normally, if you set the location for an element at a position outside the current window size, it will be hidden (for example 100, 100 when the window is 50,50). However, relativePositioning=false ignores the current container, but still applies Autostretch.

So, for example, if I have a button in the GroupWind and:

<Autostretch>false</Autostretch>
<relativeposition>true<RelativePostion>
<Location>
<CX>0</CX>
<CY>0</CY>
</Location>

the button will appear in the top left corner of the GroupWnd. However, if I have:

<Autostretch>false</Autostretch>
<relativeposition>false<RelativePostion>
<Location>
<CX>0</CX>
<CY>0</CY>
</Location>

that button will be in the top-left corner of the screen (up where the latency meter shows when you hit F12). It doesn't matter where you place the GroupWnd, it will stay in the top-left corner of the screen.

Setting Autostretch to true, and say you anchor the button to the right and bottom, but have RelativePositioning=false, then it will hook to the right side of the screen, not the GroupWnd. If you are playimg in windowed mode, and resize EQ, that button will anchor to the right and bottom.

In other words, that button will 'float' in no-mans land.

I realize that when you are in a GUI, you are dealing with a specific window, and technically everything is relative to it. But, I use SIDLWIDL now, and if I accidently set relativepositioning to false, it shows in the window in the GUI, but when I load EQ it is MIA (in that window piece anyway). Sometimes it takes a while to discover where the element has gone because there is no indication in SIDLWIDL that the element will render outside the window.

Not sure how you want to handle that property.

I did recognize the C# (it technically could be C++ or Java as well). I didn't want to make any assumptions though
valaury3169 is offline   Reply With Quote
Old 01-10-2013, 03:54 PM   #29
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Thanks val, the examples you gave made it clear how EQ is handling the anchors in relation to RelativePosition.

Now onto the part I was dreading. Filling in the drawing code on all the templates. FrameTemplate is a real PITA to get right, think last time I took a shot at making an editor that alone took me a couple weeks to get the behavior spot on with how EQ does it.
shillingworth is offline   Reply With Quote
Old 01-12-2013, 09:17 PM   #30
shillingworth
Enhanced Imperial Golem
 
Join Date: Dec 2002
Server: Bertoxxulous
Posts: 209
Interface Author - Click to view interfaces
Default

Well I think I have it how the FrameTemplate works but not certain.

What the FrameTemplate is doing currently is:
- Draw TopLeft and TopRight while measure their rectangles, then fill the space between with Top. Use the maximum height out of those three (if present) to adjust the Middle rectangle's top edge downward.
- Draw the BottomLeft and BottomRight while measure their rectangles, then fill the space between with Bottom. Use the maximum height out of those three (if present) to adjust the Middle rectangle's bottom edge upward.
- Draw the LeftTop and LeftBottom while measure their rectangles, then fill the space between with Left. Use the maximum width out of those three (if present) to adjust the Middle rectangle's left edge rightward.
- Draw the RightTop and RightBottom while measure their rectangles, then fill the space between with Right. Use the maximum width out of those three (if present) to adjust the Middle rectangle's right edge leftward.
- Adjust the Middle rectangle edges based on the four Overlap values, then fill the rectangle with Middle.
- Return that rectangle to the UI piece being drawn as it's area for it's contents to draw into.

The part I'm not sure about:
- The Right pieces start at the right-most edge, then move leftward based on their Width. This means if any of the right pieces are smaller (width-wise) than the others, it'll be aligned on the right edge.
- Same as above with the Bottom pieces against the bottom-most edge.

I couldn't remember if the Right pieces align to the right edge of the middle or right edge of the frame. Nor whether the Bottom pieces align to the bottom edge of middle or bottom edge of frame.
shillingworth is offline   Reply With Quote
Reply



Thread Tools
Display Modes

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


All times are GMT -5. The time now is 03:25 AM.


vBulletin Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© MMOUI