Small Widgets Size in LayoutEditor

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

kintaro
Just popping in
Just popping in
Posts: 6
Joined: Fri Aug 04, 2006 16:56

Small Widgets Size in LayoutEditor

Postby kintaro » Tue Oct 24, 2006 14:40

Hi, I am developing a skin for my project and a have to deal with small buttons sizes.

I noticed that in CEGUI Layout Editor when I resize some widget, there is a minimum size, and the only way to reduce even more is setting scale, like "Bottom Scale", but when I do that, I can move anymore the widget with mouse.

So the feature request is that CEGUI Layout Editor could resize the widget to any size with mouse pointer and it could move the widget indenpendent of size it has.

I am using CEGUI Layout Editor 0.5 RC2.

Thanks

User avatar
Dalfy
CEGUI Team (Retired)
Posts: 130
Joined: Tue Oct 11, 2005 16:13
Location: Paris, FRANCE
Contact:

Postby Dalfy » Sun Oct 29, 2006 07:30

I move the topic to the tool forum which is best suited for your request

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Sun Oct 29, 2006 10:43

Hi kintaro,

removing that limitations shouldn't be a problem. The reason they're in-place, is more a matter of convenience, so you cannot accidently 'hide' your widgets for example ;-)

I'll have a look, thanks for the suggestion :-)

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Sun Dec 03, 2006 11:35

For the record: this has been added to mantis:
http://www.cegui.org.uk/mantis/view.php?id=130

Colbey
Just popping in
Just popping in
Posts: 4
Joined: Tue Mar 06, 2007 10:28

Postby Colbey » Mon Apr 23, 2007 13:30

I'm trying to alter the CEGUI Layout editor code to tweak the default minimum widget size, and also prevent the window sizing area from being disabled after manually entering a size in the property sheet.

Could someone explain exactly where I can set/manipulate these settings within the code? I can't seem to trace where these settings are defined.....

Thanks.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Apr 24, 2007 10:08

Hi,

tweaking min- and max widget sizes can be done in this method:

Code: Select all

void SelectionMover::UpdateWindowAreas


Search for the line:

Code: Select all

// Avoid negative widths and heights


There you could tweak (in pixels) that if-statement to only allow larger sizes for example.

As you can see in that method too, it will deny 'locked' widgets. Locking was added to prevent editing of widgets which are calculated by their parent, such as menu items and tab controls. However you could add some logic to this method:

Code: Select all

bool EditorDocument::SetProperty
, such as a parameter which defines whether the touched widget should become locked from now on.

Good luck! :)

Colbey
Just popping in
Just popping in
Posts: 4
Joined: Tue Mar 06, 2007 10:28

Postby Colbey » Tue Apr 24, 2007 11:22

Thanks for that info, I found this section of code and edited it to achieve what I wanted, however I had to change the call

Code: Select all

CoordConverter::windowToScreen()
to

Code: Select all

Window::getUnclippedPixelRect()

as the returned pixel area was incorrect, do you know what would be affecting the result returned from this function?

Thanks.


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 11 guests