nevarim
20-08-2011 17:31:03
hi all
i have some problemson mygui layout:
this is on layouteditor

this is on game

p.s. image is stretched from a 4:3 monitor to a 16/9 monitor
here's layout file
here's code for to use it
where i made error for to see in correct mode editbox for username e password??
any idea?
thanks
Nevarim
i have some problemson mygui layout:
this is on layouteditor
this is on game
p.s. image is stretched from a 4:3 monitor to a 16/9 monitor
here's layout file
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="ImageBox" skin="ImageBox" position="0 0 1280 1024" align="Default" layer="Back" name="LG_BG">
<Property key="Visible" value="true"/>
<Property key="Enabled" value="true"/>
<Property key="ImageTexture" value="backgroung_login.png"/>
<Property key="NeedMouse" value="true"/>
<Property key="NeedKey" value="true"/>
<Property key="InheritsAlpha" value="true"/>
<Widget type="EditBox" skin="EditBox" position="565 255 410 23" align="Stretch" name="LG_BG_UN_ED">
<Property key="Visible" value="true"/>
</Widget>
<Widget type="EditBox" skin="EditBox" position="565 330 410 23" align="Stretch" name="LG_BG_PW_ED">
<Property key="Visible" value="true"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="720 405 25 25" align="Stretch" name="LG_BG_UN_CK">
<Property key="Visible" value="true"/>
</Widget>
</Widget>
</MyGUI>
here's code for to use it
MyGUI::OgrePlatform* mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(mWindow, mSceneMgr); // mWindow is Ogre::RenderWindow*, mSceneManager is Ogre::SceneManager*
mGUI = new MyGUI::Gui();
mGUI->initialise();
const OIS::MouseState &mouseState = mMouse->getMouseState(); // mMouse is type of OIS::Mouse*
mouseState.width = 1024; // your rendering area width
mouseState.height = 768; // your rendering area height
MyGUI::LayoutManager::getInstance().loadLayout("login.layout");
MyGUI::StaticImagePtr window = mGUI->findWidget<MyGUI::ImageBox>("LG_BG");
window->setSize(vp->getActualWidth(),vp->getActualHeight());
where i made error for to see in correct mode editbox for username e password??
any idea?
thanks
Nevarim