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
Small Widgets Size in LayoutEditor
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
For the record: this has been added to mantis:
http://www.cegui.org.uk/mantis/view.php?id=130
http://www.cegui.org.uk/mantis/view.php?id=130
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.
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.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
tweaking min- and max widget sizes can be done in this method:
Search for the line:
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:
, such as a parameter which defines whether the touched widget should become locked from now on.
Good luck!
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
Good luck!
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 to
as the returned pixel area was incorrect, do you know what would be affecting the result returned from this function?
Thanks.
Code: Select all
CoordConverter::windowToScreen()
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 2 guests