EDITBOX problem with text

nevarim

19-03-2012 21:42:04

hi all

i have a problem with editbox,

with this layout

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="ImageBox" skin="ImageBox" position="0 0 1440 900" align="Stretch" layer="Back" name="LOGBG">
<Property key="Visible" value="true"/>
<Property key="Texture" value="ifc_login.png"/>
<Property key="ImageTexture" value="ifc_login.png"/>
<Widget type="EditBox" skin="EditBox" position="512 200 280 32" align="Default" name="LOGBGUSER">
<Property key="Enabled" value="true"/>
<Property key="ReadOnly" value="false"/>
</Widget>
<Widget type="EditBox" skin="EditBox" position="512 240 280 32" align="Default" name="LOGBGPWD">
<Property key="Enabled" value="true"/>
<Property key="ReadOnly" value="false"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="728 280 24 32" name="LOGBGCHKUSR"/>
<Widget type="Button" skin="Button" position="504 336 112 56" align="Default" name="LOGBGEXIT">
<Property key="Caption" value="Esci"/>
</Widget>
<Widget type="Button" skin="Button" position="648 336 112 56" align="Default" name="LOGBGENTER">
<Property key="Caption" value="Entra"/>
</Widget>
</Widget>
</MyGUI>


and this code for load it

MyGUI::LayoutManager::getInstance().loadLayout("ifc_login.layout");

MyGUI::StaticImagePtr LOGBG = mGUI->findWidget<MyGUI::StaticImage>("LOGBG");
LOGBG->setSize(vp->getActualWidth(),vp->getActualHeight());

LOGBGUSER = mGUI->findWidget<MyGUI::EditBox>("LOGBGUSER");
SetGuiSetScale(LOGBGUSER,vp,mWindow);
LOGBGUSER->setEnabled(true);

LOGBGPWD = mGUI->findWidget<MyGUI::EditBox>("LOGBGPWD");
SetGuiSetScale(LOGBGPWD,vp,mWindow);
LOGBGPWD->setCaption("ciao");

LOGBGCHKUSR = mGUI->findWidget<MyGUI::Button>("LOGBGCHKUSR");
SetGuiSetScale(LOGBGCHKUSR,vp,mWindow);
LOGBGCHKUSR->eventMouseButtonClick += MyGUI::newDelegate(this, &bc_gui::guibuttonpressed);

LOGBGEXIT = mGUI->findWidget<MyGUI::Button>("LOGBGEXIT");
SetGuiSetScale(LOGBGEXIT,vp,mWindow);
LOGBGEXIT->eventMouseButtonClick += MyGUI::newDelegate(this, &bc_gui::guibuttonpressed);

LOGBGENTER = mGUI->findWidget<MyGUI::Button>("LOGBGENTER");
SetGuiSetScale(LOGBGENTER,vp,mWindow);
LOGBGENTER->eventMouseButtonClick += MyGUI::newDelegate(this, &bc_gui::guibuttonpressed);



in mode text in layouteditor when i write in editbox words appears, but in my code doesn't appear when i writ in anything...


anyone can help me?

thanks

Nevarim

nevarim

20-03-2012 10:04:38

anyone can help me? :D

nevarim

23-03-2012 20:00:45

is there anyone on forum? :(

Altren

28-03-2012 12:52:35

Your layout is fine, code that you provided is correct as well (at least what you showed here).

First of all check, that edit box gain keyboard input - cursor blinks and edit box is highlighted.
Then check that you properly call injectKeyPressed / Released functions (check, that they are actually called and proper key codes used) if this is your first attempt to use keyboard input in MyGUI.

nevarim

28-03-2012 20:03:52

thanks for reply :D

when i click on editbox its highlighted and cursor blink on it, and i made a silly error, i don't recall properly inject function.....


thaks for help and thanks again for all your work :D i hope that with donation you can go far in mygui project^^

thanks

Nevarim