Resulotion Scaling
Moderators: CEGUI MVP, CEGUI Team
Resulotion Scaling
Hey,
I wonder if anyone knows a good way to scale the window elements when resulotion change. I've searched the forum and google but I have not found any direct good answer to this question.
Here is an picture to visual my question.
Resulotion 1024*768, all the elements are 100% normal scale.
I change resulotion to 640*480 and all elements are scaled down not same size as 1024*768.
Thanks!
I wonder if anyone knows a good way to scale the window elements when resulotion change. I've searched the forum and google but I have not found any direct good answer to this question.
Here is an picture to visual my question.
Resulotion 1024*768, all the elements are 100% normal scale.
I change resulotion to 640*480 and all elements are scaled down not same size as 1024*768.
Thanks!
Last edited by metro on Sat Aug 18, 2012 23:05, edited 1 time in total.
-
- Just popping in
- Posts: 18
- Joined: Sat Aug 04, 2012 16:35
Re: Resulotion Scaling
That is how it works already by default? Assuming you call System->notifyDisplaySizeChanged(CEGUI::Size newSize);
Re: Resulotion Scaling
MorbidAngel wrote:That is how it works already by default? Assuming you call System->notifyDisplaySizeChanged(CEGUI::Size newSize);
Hello, yes I call notifyDisplaySizeChanged at resize callback, what that does is put all the elements in the right position, they retain the same size from 1024*768 to 640*480 and that is exactly what is wrong, the size should scale by resulotion too, something like an "zoom effect". What I can do is to manually change the size of all the elements inside the main sheet depending on the screen width and height, but not no luck so far.
Any help is appreciated
-metro
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Resulotion Scaling
Hi,
The problem is dude, you've posted no fucking useful information. No log file. No layouts. No code. You've posted exactly nothing. This is the kind of information we ask for in the forum guidelines, and we ask for that for a reason. The reason is not that it makes us feel special, but that it gives us a (small) chance of knowing what the user is doing, and, by that token, gives us a chance to offer advice to fix any issues the user is having.
Given the information provided thus far (i.e none). How are we supposed to offer any advice? We have no idea what you are trying to do nor how you are trying to do it. Anything we say would be purely guessing. Yes, we might get lucky, but just as likely you come back and say "no, that does not help. What else?" This is not a game. It's not 20 questions. We don't have fun trying to extract context and other information from the next round of users that come here. We want to be able to offer quick and easy advice, but the majority of people posting here asking for help make thisthe most difficult and frustrating job on earth.
CE.
The problem is dude, you've posted no fucking useful information. No log file. No layouts. No code. You've posted exactly nothing. This is the kind of information we ask for in the forum guidelines, and we ask for that for a reason. The reason is not that it makes us feel special, but that it gives us a (small) chance of knowing what the user is doing, and, by that token, gives us a chance to offer advice to fix any issues the user is having.
Given the information provided thus far (i.e none). How are we supposed to offer any advice? We have no idea what you are trying to do nor how you are trying to do it. Anything we say would be purely guessing. Yes, we might get lucky, but just as likely you come back and say "no, that does not help. What else?" This is not a game. It's not 20 questions. We don't have fun trying to extract context and other information from the next round of users that come here. We want to be able to offer quick and easy advice, but the majority of people posting here asking for help make thisthe most difficult and frustrating job on earth.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Resulotion Scaling
CrazyEddie wrote:Hi,
The problem is dude, you've posted no fucking useful information. No log file. No layouts. No code. You've posted exactly nothing. This is the kind of information we ask for in the forum guidelines, and we ask for that for a reason. The reason is not that it makes us feel special, but that it gives us a (small) chance of knowing what the user is doing, and, by that token, gives us a chance to offer advice to fix any issues the user is having.
Given the information provided thus far (i.e none). How are we supposed to offer any advice? We have no idea what you are trying to do nor how you are trying to do it. Anything we say would be purely guessing. Yes, we might get lucky, but just as likely you come back and say "no, that does not help. What else?" This is not a game. It's not 20 questions. We don't have fun trying to extract context and other information from the next round of users that come here. We want to be able to offer quick and easy advice, but the majority of people posting here asking for help make thisthe most difficult and frustrating job on earth.
CE.
The thing is that I made just a few tests to try to find a good way to scale elements, I have nothing to show or log to post, but if you really need an log to answer the question then I'll do a demo today that show the problem if that helps.
All I was wondering if you could scale interface elements depending on resulotion, thats all.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Resulotion Scaling
metro wrote:All I was wondering if you could scale interface elements depending on resulotion, thats all.
And the answer is yes.
This is basically what happens by default when using the appropriate values in UDims (as MorbidAngel already said). Since it's not working for you, you are doing something wrong - so you need to post the information requested in order we can point you in the right direction.
You don't need to post something fancy or any kind of Perfect Code™ - one of your tests is fine (along with the log from a run of that test), a description of what you see (maybe with screenshots) and a description of what you thought you would see. Then we should be able to offer some kind of advice.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Resulotion Scaling
Hey CE, now I hope I have some better information, sorry for last post, let me try explain.
1024*768 - box got normal scale.
640*480 - box got normal scale, here is the problem, I want the box to be smaler, scaled by resolution.
ps,
All Imagesets got autoscale disabled.
UI Core startup.
Window resize event.
Test Layout
CEGUI.log
1024*768 - box got normal scale.
640*480 - box got normal scale, here is the problem, I want the box to be smaler, scaled by resolution.
ps,
All Imagesets got autoscale disabled.
UI Core startup.
Code: Select all
// create bootstrap.
CEGUI::OgreRenderer::bootstrapSystem();
// resourceGroups.
CEGUI::Imageset::setDefaultResourceGroup("Imagesets");
CEGUI::Font::setDefaultResourceGroup("Fonts");
CEGUI::Scheme::setDefaultResourceGroup("Schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
// scheme.
CEGUI::SchemeManager::getSingleton().create("GuiLookSkin.scheme");
// set default sheet.
mSheet = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "root");
mSheet->setMousePassThroughEnabled(true);
CEGUI::System::getSingleton().setGUISheet(mSheet);
// load layout.
mLayout = CEGUI::WindowManager::getSingleton().loadWindowLayout("scaleTest.layout", _prefix.c_str());
mSheet->addChildWindow(mLayout);
Window resize event.
Code: Select all
/**
* Window event for resizing window.
* @param Screen width in pixels.
* @param Screen height in pixels.
*/
void Core::windowResized(int width, int height)
{
// notify CEGUI.
CEGUI::System::getSingleton().notifyDisplaySizeChanged(CEGUI::Size(width, height));
}
Test Layout
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="GuiLook/StaticImage" Name="Frame" >
<Property Name="Image" Value="set:GuiLook image:GrayLine" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{6.98492e-010,0},{1,0},{1,0}}" />
<Window Type="GuiLook/ItemText" Name="ScaleWindowTest" >
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.5,-190},{0.5,-128},{0.5,202},{0.556667,0}}" />
<Property Name="MousePassThroughEnabled" Value="True" />
</Window>
</Window>
</GUILayout>
CEGUI.log
Code: Select all
19/08/2012 12:47:02 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
19/08/2012 12:47:02 (Std) + Crazy Eddie's GUI System - Event log +
19/08/2012 12:47:02 (Std) + (http://www.cegui.org.uk/) +
19/08/2012 12:47:02 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
19/08/2012 12:47:02 (Std) CEGUI::Logger singleton created. (010C3520)
19/08/2012 12:47:02 (Std)
19/08/2012 12:47:02 (Std) ********************************************************************************
19/08/2012 12:47:02 (Std) * Important: *
19/08/2012 12:47:02 (Std) * To get support at the CEGUI forums, you must post _at least_ the section *
19/08/2012 12:47:02 (Std) * of this log file indicated below. Failure to do this will result in no *
19/08/2012 12:47:02 (Std) * support being given; please do not waste our time. *
19/08/2012 12:47:02 (Std) ********************************************************************************
19/08/2012 12:47:02 (Std) ********************************************************************************
19/08/2012 12:47:02 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
19/08/2012 12:47:02 (Std) ********************************************************************************
19/08/2012 12:47:02 (Std) ---- Version 0.7.6 (Build: Apr 24 2012 Debug Microsoft Windows MSVC++ 10.0 32 bit) ----
19/08/2012 12:47:02 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
19/08/2012 12:47:02 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
19/08/2012 12:47:02 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
19/08/2012 12:47:02 (Std) ---- Scripting module is: None ----
19/08/2012 12:47:02 (Std) ********************************************************************************
19/08/2012 12:47:02 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
19/08/2012 12:47:02 (Std) ********************************************************************************
19/08/2012 12:47:02 (Std)
19/08/2012 12:47:02 (Std) ---- Begining CEGUI System initialisation ----
19/08/2012 12:47:02 (Std) CEGUI::ImagesetManager singleton created (010C3408)
19/08/2012 12:47:02 (Std) CEGUI::FontManager singleton created. (010BC7D0)
19/08/2012 12:47:02 (Std) CEGUI::WindowFactoryManager singleton created
19/08/2012 12:47:02 (Std) CEGUI::WindowManager singleton created (010BE408)
19/08/2012 12:47:02 (Std) CEGUI::SchemeManager singleton created. (010BE6F8)
19/08/2012 12:47:02 (Std) CEGUI::MouseCursor singleton created. (010BEA60)
19/08/2012 12:47:02 (Std) CEGUI::GlobalEventSet singleton created. (010BEE40)
19/08/2012 12:47:02 (Std) CEGUI::AnimationManager singleton created (010BEFD0)
19/08/2012 12:47:02 (Std) CEGUI::WidgetLookManager singleton created. (010BFE50)
19/08/2012 12:47:02 (Std) CEGUI::WindowRendererManager singleton created (010C4880)
19/08/2012 12:47:02 (Std) CEGUI::RenderEffectManager singleton created (010C4A00)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'DefaultWindow' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'DefaultWindow' windows added. (010C4C38)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'DragContainer' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'DragContainer' windows added. (010C4E98)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'ScrolledContainer' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'ScrolledContainer' windows added. (010C5058)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'ClippedContainer' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'ClippedContainer' windows added. (010C5218)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Checkbox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Checkbox' windows added. (010C53D8)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/PushButton' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/PushButton' windows added. (010C55F0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/RadioButton' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/RadioButton' windows added. (010C57B0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Combobox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Combobox' windows added. (010C5970)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ComboDropList' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ComboDropList' windows added. (010C5B30)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Editbox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Editbox' windows added. (010C5CF0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/FrameWindow' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/FrameWindow' windows added. (010C5F20)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ItemEntry' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ItemEntry' windows added. (010C60E0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Listbox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Listbox' windows added. (010C62A0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ListHeader' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ListHeader' windows added. (010C6460)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (010C6620)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Menubar' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Menubar' windows added. (010C67E0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/PopupMenu' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/PopupMenu' windows added. (010C69A0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/MenuItem' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/MenuItem' windows added. (010C6B60)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/MultiColumnList' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/MultiColumnList' windows added. (010C6D20)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (010C6EE0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ProgressBar' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ProgressBar' windows added. (010C7150)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ScrollablePane' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ScrollablePane' windows added. (010C73B0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Scrollbar' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Scrollbar' windows added. (010C7570)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Slider' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Slider' windows added. (010C7730)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Spinner' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Spinner' windows added. (010C78F0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/TabButton' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/TabButton' windows added. (010C7AB0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/TabControl' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/TabControl' windows added. (010C7C70)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Thumb' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Thumb' windows added. (010C7E30)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Titlebar' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Titlebar' windows added. (010C7FF0)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Tooltip' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Tooltip' windows added. (010C8298)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/ItemListbox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/ItemListbox' windows added. (010C8458)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/GroupBox' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/GroupBox' windows added. (010C8618)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'CEGUI/Tree' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'CEGUI/Tree' windows added. (010C87D8)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'HorizontalLayoutContainer' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'HorizontalLayoutContainer' windows added. (010C8998)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'VerticalLayoutContainer' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'VerticalLayoutContainer' windows added. (010C8C28)
19/08/2012 12:47:02 (Std) Created WindowFactory for 'GridLayoutContainer' windows.
19/08/2012 12:47:02 (Std) WindowFactory for 'GridLayoutContainer' windows added. (010C8D00)
19/08/2012 12:47:02 (Std) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
19/08/2012 12:47:02 (Std) CEGUI::System singleton created. (010C3078)
19/08/2012 12:47:02 (Std) ---- CEGUI System initialisation completed ----
19/08/2012 12:47:02 (Std)
19/08/2012 12:47:02 (Std) Started creation of Scheme from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI GUIScheme name: GuiLook
19/08/2012 12:47:02 (Std) Started creation of Imageset from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI Imageset name: GuiLook
19/08/2012 12:47:02 (Std) ---- Source texture file: ui1.png in resource group: (Default)
19/08/2012 12:47:02 (Std) Started creation of Imageset from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI Imageset name: UIIcons
19/08/2012 12:47:02 (Std) ---- Source texture file: uiicons.png in resource group: (Default)
19/08/2012 12:47:02 (Std) Started creation of Imageset from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI Imageset name: ui2
19/08/2012 12:47:02 (Std) ---- Source texture file: ui2.png in resource group: (Default)
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: Serif
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: BRLNSDB.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 11
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: SerifBig
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: BRLNSDB.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 16
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: SerifHuge
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: BRLNSDB.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 32
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: SerifSmall
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: BRLNSDB.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 8
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: FrizQuadrata
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: Regular.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 11
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: FrizQuadrataSmall
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: Regular.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 6
19/08/2012 12:47:02 (Std) Started creation of Font from XML specification:
19/08/2012 12:47:02 (Std) ---- CEGUI font name: FrizQuadrataBig
19/08/2012 12:47:02 (Std) ---- Font type: FreeType
19/08/2012 12:47:02 (Std) ---- Source file: Regular.TTF in resource group: (Default)
19/08/2012 12:47:02 (Std) ---- Real point size: 15
19/08/2012 12:47:02 (Std) ===== Falagard 'root' element: look and feel parsing begins =====
19/08/2012 12:47:03 (Std) ===== Look and feel parsing completed =====
19/08/2012 12:47:03 (Std) No window renderer factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Button' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Button' added. (07960698)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Default' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Default' added. (0797AA68)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Editbox' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Editbox' added. (07809230)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/FrameWindow' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/FrameWindow' added. (01164E60)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ItemEntry' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ItemEntry' added. (07986C70)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ListHeader' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ListHeader' added. (079A5EC8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ListHeaderSegment' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ListHeaderSegment' added. (07957510)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Listbox' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Listbox' added. (07808C70)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Menubar' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Menubar' added. (0795E7F8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/MenuItem' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/MenuItem' added. (079A5BC0)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/MultiColumnList' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/MultiColumnList' added. (01155F90)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/MultiLineEditbox' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/MultiLineEditbox' added. (07985F08)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/PopupMenu' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/PopupMenu' added. (0797B1A0)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ProgressBar' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ProgressBar' added. (0797A898)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ScrollablePane' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ScrollablePane' added. (0795B490)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Scrollbar' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Scrollbar' added. (079730E8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Slider' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Slider' added. (010D1ED0)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Static' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Static' added. (07958268)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/StaticImage' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/StaticImage' added. (010CCD18)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/StaticText' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/StaticText' added. (07958340)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/SystemButton' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/SystemButton' added. (0799EEA8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/TabButton' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/TabButton' added. (0799F068)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/TabControl' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/TabControl' added. (0799F228)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Titlebar' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Titlebar' added. (079ACFE8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ToggleButton' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ToggleButton' added. (079AD1A8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Tooltip' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Tooltip' added. (07974CB8)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/ItemListbox' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/ItemListbox' added. (07974E78)
19/08/2012 12:47:03 (Std) Created WindowRendererFactory for 'Falagard/Tree' WindowRenderers.
19/08/2012 12:47:03 (Std) WindowRendererFactory 'Falagard/Tree' added. (07975038)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Button' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/Button' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/CloseButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/CloseButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Checkbox' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' Look'N'Feel 'GuiLook/Checkbox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ImageButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/ImageButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/StandardButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/StandardButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/StandardButtonSmall' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/StandardButtonSmall' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/RadioButton' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' Look'N'Feel 'GuiLook/RadioButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/FrameWindow' using base type 'CEGUI/FrameWindow', window renderer 'Falagard/FrameWindow' Look'N'Feel 'GuiLook/FrameWindow' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Titlebar' using base type 'CEGUI/Titlebar', window renderer 'Falagard/Titlebar' Look'N'Feel 'GuiLook/Titlebar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/SystemButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/SystemButton' Look'N'Feel 'GuiLook/Button' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Editbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' Look'N'Feel 'GuiLook/Editbox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/MultiLineEditbox' using base type 'CEGUI/MultiLineEditbox', window renderer 'Falagard/MultiLineEditbox' Look'N'Feel 'GuiLook/MultiLineEditbox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/MultiLineTextbox' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' Look'N'Feel 'GuiLook/MultiLineTextbox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Menubar' using base type 'CEGUI/Menubar', window renderer 'Falagard/Menubar' Look'N'Feel 'GuiLook/Menubar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/PopupMenu' using base type 'CEGUI/PopupMenu', window renderer 'Falagard/PopupMenu' Look'N'Feel 'GuiLook/PopupMenu' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/MenuItem' using base type 'CEGUI/MenuItem', window renderer 'Falagard/MenuItem' Look'N'Feel 'GuiLook/MenuItem' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/AlternateProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'GuiLook/AltProgressBar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'GuiLook/ProgressBar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/VUMeter' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'GuiLook/VUMeter' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/VerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'GuiLook/VerticalScrollbar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/HorizontalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'GuiLook/HorizontalScrollbar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/VerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/VerticalScrollbarThumb' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/HorizontalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/HorizontalScrollbarThumb' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/LargeVerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'GuiLook/LargeVerticalScrollbar' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/LargeVerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/LargeVerticalScrollbarThumb' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/TabButton' using base type 'CEGUI/TabButton', window renderer 'Falagard/TabButton' Look'N'Feel 'GuiLook/TabButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/TabControl' using base type 'CEGUI/TabControl', window renderer 'Falagard/TabControl' Look'N'Feel 'GuiLook/TabControl' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/TabContentPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/TabContentPane' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/TabButtonPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/TabButtonPane' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ComboDropList' using base type 'CEGUI/ComboDropList', window renderer 'Falagard/Listbox' Look'N'Feel 'GuiLook/ComboDropList' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ComboEditbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' Look'N'Feel 'GuiLook/ComboEditbox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Combobox' using base type 'CEGUI/Combobox', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/Combobox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Listbox' using base type 'CEGUI/Listbox', window renderer 'Falagard/Listbox' Look'N'Feel 'GuiLook/Listbox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ListHeader' using base type 'CEGUI/ListHeader', window renderer 'Falagard/ListHeader' Look'N'Feel 'GuiLook/ListHeader' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ListHeaderSegment' using base type 'CEGUI/ListHeaderSegment', window renderer 'Falagard/ListHeaderSegment' Look'N'Feel 'GuiLook/ListHeaderSegment' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/MultiColumnList' using base type 'CEGUI/MultiColumnList', window renderer 'Falagard/MultiColumnList' Look'N'Feel 'GuiLook/MultiColumnList' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Slider' using base type 'CEGUI/Slider', window renderer 'Falagard/Slider' Look'N'Feel 'GuiLook/Slider' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/SliderThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/SliderThumb' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ScrollablePane' using base type 'CEGUI/ScrollablePane', window renderer 'Falagard/ScrollablePane' Look'N'Feel 'GuiLook/ScrollablePane' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Spinner' using base type 'CEGUI/Spinner', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/Spinner' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/Tooltip' using base type 'CEGUI/Tooltip', window renderer 'Falagard/Tooltip' Look'N'Feel 'GuiLook/Tooltip' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/StaticImage' using base type 'DefaultWindow', window renderer 'Falagard/StaticImage' Look'N'Feel 'GuiLook/StaticImage' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/StaticText' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/StaticText' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/StaticTextOutline' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/StaticTextOutline' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/StaticTextBox' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' Look'N'Feel 'GuiLook/StaticTextBox' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ItemText' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/ItemText' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/CharacterSlot' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/CharacterSlot' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/CharacterSlotHighlight' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/CharacterSlotHighlight' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ItemTooltip' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/ItemTooltip' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/ItemTooltip2' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'GuiLook/ItemTooltip2' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/FishingButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/FishingButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/PetFeedButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/PetFeedButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/QuestRadioButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/QuestRadioButton' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/WeaponSwitch' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' Look'N'Feel 'GuiLook/WeaponSwitch' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/CloseTriangleLeft' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/CloseTriangleLeft' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/CloseTriangleRight' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'GuiLook/CloseTriangleRight' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) Creating falagard mapping for type 'GuiLook/RadioTab' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' Look'N'Feel 'GuiLook/RadioTab' and RenderEffect ''. (003BC54C)
19/08/2012 12:47:03 (Std) ---- Successfully completed loading of GUI layout from 'scaleTest.layout' ----
19/08/2012 12:47:03 (Std) Display resize: w=1024 h=768
19/08/2012 12:47:05 (Std) Display resize: w=640 h=480
Re: Resulotion Scaling
CE, check pm, sent some more information or more like comparisons.
I hope the explanation is better to solve my problem
Thanks.
I hope the explanation is better to solve my problem
Thanks.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Resulotion Scaling
Hi,
The issue is basically with the use of absolute pixel offsets in some of the dimensions, so for example:
This sets the left edge to 190 pixels back from the centre, the top 128 pixels up from the centre and the right edge 202 pixels to the right of the centre. A pixel is a pixel, which is why you end up with the same size at different resolutions.
If you had instead something like:
The box should scale appropriately.
The key thing is the two components of each sub-dimension. The first part is the 'scale' as is basically a percentage of the parent / containing element, the second part is the 'offset' and is in pixels. See also: http://www.cegui.org.uk/api_reference/f ... fiedsystem
HTH
CE.
The issue is basically with the use of absolute pixel offsets in some of the dimensions, so for example:
Code: Select all
<Property Name="UnifiedAreaRect" Value="{{0.5,-190},{0.5,-128},{0.5,202},{0.556667,0}}" />
This sets the left edge to 190 pixels back from the centre, the top 128 pixels up from the centre and the right edge 202 pixels to the right of the centre. A pixel is a pixel, which is why you end up with the same size at different resolutions.
If you had instead something like:
Code: Select all
<Property Name="UnifiedAreaRect" Value="{{0.314,0},{0.333,0},{0.685,0},{0.763,0}}" />
The box should scale appropriately.
The key thing is the two components of each sub-dimension. The first part is the 'scale' as is basically a percentage of the parent / containing element, the second part is the 'offset' and is in pixels. See also: http://www.cegui.org.uk/api_reference/f ... fiedsystem
HTH
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Resulotion Scaling
Appreciate your help CE, I will look into that.
Thanks.
Thanks.
Re: Resulotion Scaling
Btw, Is it possible to manual change the pixel sizes of windows?
lets say something like, (just an preview) but also calculate using current element size and offset from resolution change.
Any idea? or is it not possible to do this way?
Thanks.
lets say something like, (just an preview) but also calculate using current element size and offset from resolution change.
Code: Select all
for(int n=0; n < mSheet->getChildCount(); n++) {
CEGUI::Window *child = mSheet->getChildAtIdx(n);
if( child ) {
child->setSize(CEGUI::UVector2(CEGUI::UDim(0,width), CEGUI::UDim(0,height)));
}
}
Any idea? or is it not possible to do this way?
Thanks.
-
- Just popping in
- Posts: 18
- Joined: Sat Aug 04, 2012 16:35
Re: Resulotion Scaling
metro wrote:Btw, Is it possible to manual change the pixel sizes of windows?
lets say something like, (just an preview) but also calculate using current element size and offset from resolution change.Code: Select all
for(int n=0; n < mSheet->getChildCount(); n++) {
CEGUI::Window *child = mSheet->getChildAtIdx(n);
if( child ) {
child->setSize(CEGUI::UVector2(CEGUI::UDim(0,width), CEGUI::UDim(0,height)));
}
}
Any idea? or is it not possible to do this way?
Thanks.
Sure you could do something like that, but if you're really worried about scaling on different resolutions, why don't you use the scale size instead of the offset to begin with? seems a lot easier to me, and after all it's what its there for
Oh and for your example you would need to fetch the pixel size and then calculate what it should be based on the new size vs old size, not very efficient but if you really want to sure its possible.
Re: Resulotion Scaling
MorbidAngel wrote:metro wrote:Btw, Is it possible to manual change the pixel sizes of windows?
lets say something like, (just an preview) but also calculate using current element size and offset from resolution change.Code: Select all
for(int n=0; n < mSheet->getChildCount(); n++) {
CEGUI::Window *child = mSheet->getChildAtIdx(n);
if( child ) {
child->setSize(CEGUI::UVector2(CEGUI::UDim(0,width), CEGUI::UDim(0,height)));
}
}
Any idea? or is it not possible to do this way?
Thanks.
Sure you could do something like that, but if you're really worried about scaling on different resolutions, why don't you use the scale size instead of the offset to begin with? seems a lot easier to me, and after all it's what its there for
Oh and for your example you would need to fetch the pixel size and then calculate what it should be based on the new size vs old size, not very efficient but if you really want to sure its possible.
Hello, I have a lot of UI created already in pixel size :/ so I will try make it work with pixel size scale first.
Thanks
Re: Resulotion Scaling
MorbidAngel is right, this should be done with the scale component.
Also, there is no such thing as pixel size scale.
Also, there is no such thing as pixel size scale.
Re: Resulotion Scaling
Kulik wrote:MorbidAngel is right, this should be done with the scale component.
Also, there is no such thing as pixel size scale.
Hey,
I know this should be done with the scale component, but the thing is that the guy who made all the layouts made in this way and should be great to not remake all, basically, what I want is that if I reduce the screen resoulotion then all elements should decrease as much.
If it's possible to make it like this, I appreciate the help.
Idea is something like this (test for x position), I try change position depending on resolutions, any help is welcome to get the result I'm looking for.
Code: Select all
namespace
{
const float defaultSize = 1024;
std::unordered_map<CEGUI::Window*, CEGUI::UVector2> winSettings;
}
/**
* Window event for resizing window.
* @param Screen width in pixels.
* @param Screen height in pixels.
*/
void Core::windowResized(int width, int height)
{
// notify CEGUI.
float diff = (width - defaultSize);
auto iter = CEGUI::WindowManager::getSingleton().getIterator();
while(!iter.isAtEnd()) {
CEGUI::Window *window = iter.getCurrentValue();
if( window != mSheet ) {
auto it = winSettings.find(window);
if( it == std::end(winSettings) ) {
winSettings[window] = window->getPosition();
}
window->setPosition(winSettings[window] + CEGUI::UVector2(CEGUI::UDim(0, diff), CEGUI::UDim(0,0)));
}
iter++;
}
//notifyDisplay
CEGUI::System::getSingleton().notifyDisplaySizeChanged(CEGUI::Size(width, height));
}
Who is online
Users browsing this forum: No registered users and 6 guests