PDA

View Full Version : Irregular Windows?


Kid
16 Feb 2001, 03:02 PM
Hey guys, usually we build a window by writing:

<region type="rectangle" combinetype="or">

Is it possible to write region type as "circle", "oval"... or the ultimate "polygon"...?!!!

kwk
16 Feb 2001, 03:11 PM
Yup, there is support for rectangles, rounded rects and circles right now. I think I also put in support for polygons too, not 100% sure though, ill look at it tonight.

I will also give you a sample of an irregularly shaped window.

I had thought about just using a mask bitmap to make the region, however, things get more difficult when we start dealing with resizing. Most other programs just dont allow windows to resize and it makes life MUCH easier http://www.ceruleanstudios.com/ubb/smile.gif.

Ill let you know about the window shapes allowed when I get close to my source again.

-Kevin

kwk
16 Feb 2001, 04:38 PM
Ok, there isn't support yet for polygon, I just plain forgot. I may add it into 0.63 if I can get some time since it should be quick.

I think the region stuff needs a little bit of a rework at some point since it kind of depends on the ordering which I think goes against XML, so I would like to make it a little bit different.

But for right now you can add rectangles, elliptic and rounded rectangles into your skins. The combinetype thing should work, but I dont want to guarentee it yet until i test it out.

Below is an exerpt from the region for one of the windows in the 0.5x skin which I'm sure no one has seen but it will give you an idea of how the formatting is for each type of region.

-Kevin

<mainregion>
<!-- Title area -->
<region type="roundrect" combinetype="or">
<rect>
<left num="9" width="0"/>
<right num="83" width="1"/>
<top num="6" height="0"/>
<bottom num="27" height="0"/>
</rect>
<extra name="widthellipse" value="10"/>
<extra name="heightellipse" value="10"/>
</region>
<!-- Grey area -->
<region type="roundrect" combinetype="or">
<rect>
<left num="1" width="0"/>
<right num="6" width="1"/>
<top num="26" height="0"/>
<bottom num="32" height="1"/>
</rect>
<extra name="widthellipse" value="10"/>
<extra name="heightellipse" value="10"/>
</region>
<!-- Text area -->
<region type="roundrect" combinetype="or">
<rect>
<left num="15" width="0"/>
<right num="1" width="1"/>
<top num="38" height="1"/>
<bottom num="0" height="1"/>
</rect>
<extra name="widthellipse" value="10"/>
<extra name="heightellipse" value="10"/>
</region>
<!-- lagometer area -->
<region type="elliptic" combinetype="or">
<rect>
<left num="78" width="1"/>
<right num="19" width="1"/>
<top num="4" height="0"/>
<bottom num="59" height="0"/>
</rect>
</region>
<!-- min/close area -->
<region type="elliptic" combinetype="or">
<rect>
<left num="15" width="1"/>
<right num="1" width="1"/>
<top num="23" height="0"/>
<bottom num="37" height="0"/>
</rect>
</region>
<region type="elliptic" combinetype="or">
<rect>
<left num="15" width="1"/>
<right num="1" width="1"/>
<top num="36" height="0"/>
<bottom num="53" height="0"/>
</rect>
</region>

</mainregion>

Kid
16 Feb 2001, 05:04 PM
I think I wont make any more skins for 0.62... Although I have already prepared a few sets of bitmaps that are ready for converting into a skin by just adding codes, I know that there will be some great format changes in 0.63... so I'd like to make a new set of XML files instead of editing the old files (because by this I will make bugs easily). Now I'm just waiting for the new format and I'll start immediately once I get 0.63!! http://www.ceruleanstudios.com/ubb/smile.gif (But wait, the spring semester is going to begin...!)

-Kid of RISD

[This message has been edited by 037 (edited 02-16-2001).]

kwk
16 Feb 2001, 10:47 PM
The skin format shouldn't change much for the 0.63 release. Its just going to have some of the bugs/features you have requested from doing the whistler skin.

By the way, all inner controls should be 'transparent' to mouse clicks. So you should have been able to drag the medium icons even though they were in the lower right, I just never noticed it because of their old location. So, they will be draggable on all skins. I guess I can make this a flag for future releases.

Basically, dont stop skinning on us!! I can't wait for the next skin release http://www.ceruleanstudios.com/ubb/smile.gif.

-Kevin

[This message has been edited by kwk (edited 02-16-2001).]

Kid
20 Feb 2001, 04:33 AM
Hi Kevin,

I tried many times but RoundRect doesnt work:


<resize type="all">
<rtype type="upperleft">
<region type="roundrect" combinetype="or">
<rect>
<left num="0" width="0"/>
<right num="15" width="0"/>
<top num="0" height="0"/>
<bottom num="15" height="0"/>
<extra name="widthellipse" value="5"/>
<extra name="heightellipse" value="5"/>
</rect>
<extra name="widthellipse" value="5"/>
<extra name="heightellipse" value="5"/>
</region>
</rtype>
<rtype type="upperright">
<region type="roundrect" combinetype="or">
<rect>
<left num="15" width="1"/>
<right num="0" width="1"/>
<top num="0" height="0"/>
<bottom num="15" height="0"/>
<extra name="widthellipse" value="5"/>
<extra name="heightellipse" value="5"/>
</rect>
<extra name="widthellipse" value="5"/>
<extra name="heightellipse" value="5"/>
</region>
</rtype>
<rtype type="upper">
<region type="rectangle" combinetype="or">
<rect>
<left num="10" width="0"/>


What's the problem?

-Kid.

[This message has been edited by 037 (edited 02-20-2001).]

kwk
20 Feb 2001, 07:26 AM
UBB on my end kind of killed your code snippet. But, what i could get out of it is that it appeared that you had this all in your resize section.

The resize section allows you to specify where the window can be resized (basically where the cursor will change). So if you have a really funky window you wont not have an upper left resizing cursor, etc.

So if you just add that roundrect code into your <mainregion> section and take out the resizing parts of it, it should work.

Let me know how you make out

-Kevin

Kid
21 Feb 2001, 02:44 AM
Hi Kevin,

I finally did it! I DID IT!!!!
WOWW!!!

Ooops, a tiny problem:
http://www.techpole.com/037/private/badcorner.gif

My code is absolutely correct:
<mainregion>
< !-- Main Region -->
<region type="roundrect" combinetype="or">
<rect>
<left num="0" width="0"/>
<right num="0" width="1"/>
<top num="0" height="0"/>
<bottom num="30" height="0"/>
</rect>
<extra name="widthellipse" value="11"/>
<extra name="heightellipse" value="11"/>
</region>
<region type="rectangle" combinetype="or">
<rect>
<left num="0" width="0"/>
<right num="0" width="1"/>
<top num="11" height="0"/>
<bottom num="0" height="1"/>
</rect>
</region>
</mainregion>

so what can I do?

-Kid.

kwk
21 Feb 2001, 09:29 AM
Well, as a 'hack' i got it to work by putting a "-1" as the right hand of the round rect thing. Ill look into it more later to see why its actually doing it.

-Kevin

kwk
21 Feb 2001, 06:53 PM
I checked out the source really quick tonight and I seem to be doing everything right, I blame it on windows http://www.ceruleanstudios.com/ubb/smile.gif. So just use the -1 until I have more time to look at it for next release.

-Kevin