EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-14-2007, 05:31 AM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default Need a little help with Startbutton mod

Hello,
had a quick question for you guys, basicly this mod is my first custom ui I have done other than installing others work. what I did was I took the startbutton xml (couldnt get my own new window to work) and I added 2 checkboxes, 2 text boxes, and 2 buttons. Its function is very simple.

Check1 Textbox1 and Button1 were all labeled MA (Main Assist) the next set labeled MT (Main Tank) I type in the names of the people check the box and it locks the box from being editable. I click the button and it issues /target (name in textbox) .

Everything works great except for one small detail. If I have the text box focused the only way I can get it unfocused is to hit enter which then makes my cursor go to a chat box and have to hit enter again. OR I just click the checkbox. Now this isnt a show stopper for me but was wondering if someone could tell me if there is a way to add something to it so I click with my mouse ANYWHERE outside of the tezt boxes they loose focus. Thanks!

-Lycaon
Reply With Quote
  #2  
Unread 06-14-2007, 08:14 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

I had something similar to this happen with a dropdown. What I did to keep the drop down from grabbing focus ever time the user would hit the space bar was to put the drop down in its own page and on the page I added the following code.

Code:
OnHoverIn="dorpdown.Enabled=True"
OnHoverOut="dropdown.Enabled=False"
You can not add this code to the Object in question because once you !Enable it it will no longer fire it's events.

It may or may not work with a text box, I've never tried with a textbox object.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #3  
Unread 06-14-2007, 10:41 PM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

Thanks for the reply! I will give that a shot and see if it works. Now that I think of it I think it will, cause I remember with eq2maps if i dont have the mouse over it i cant type.
Reply With Quote
  #4  
Unread 06-14-2007, 11:30 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

There are a couple ways to force textboxes and dropdowns to lose focus, since they like to hold onto it when you don't want them to.

Exactly when are they taking focus or holding onto focus when they shouldn't? Just after you press enter? Or, after you click the checkbox?

It sounds like they are normally disabled, so they wouldn't steal focus then. I do something similar in my browser window. There's an invisible button directly behind the textbox. When you click on the button it enables the the textbox and the textbox is disabled as soon as you move your mouse off of it.
Reply With Quote
  #5  
Unread 06-15-2007, 03:16 AM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

well the problem is the text box doesnt loose focus after i click in it to type.. The checkbox was my way of getting around it by making the textbox uneditable. I would click in it and have the cursor but when ever I click anywhere else it wouldnt give up focus. I could do the checkbox like i mentioned or hit enter twice cause the first enter takes focus to the chat box. Id like to just be able to click anywhere on the screen and it loose focus. But will try the onhover bit and see if that works.
Reply With Quote
  #6  
Unread 06-15-2007, 02:15 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Ok, there are a few ways of working around this. If any button has the property IsDefaultButton="true" that button will trigger when you press Enter. So, you may be able to use a hidden button that disables your textbox as soon as you press Enter. The property IsCancelButton="true" makes that button trigger when you press Esc.

Sometimes you have to force focus to some other window. I've followed Zonx's recommendation and forced it to the player window (which doesn't have any text box or dropdown to grab focus) with the script "set_focus Parent.Parent.Parent.Player.FullPath" or something similar.
Reply With Quote
  #7  
Unread 06-15-2007, 04:09 PM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

With the hidden button, would just one work? cause i have both txt boxes and such on one page. I never tried hitting ESC while it had focus Ill try that and see what happens. OH and is it on this button somewhere i would do the set_focus script? I like the idea of forcing the focus to another window that doesnt take input. ill see if I can find the thread you refrenced to Zonx.

Sorry if this seems like simple stuff to you, Im actually surprised I managed to get what I have working .. I understand some programming its just getting used to the way this UI stuff is laid out and what the differnt values mean and where to put stuff im still kinda figuring out.

Thanks!!!

Last edited by dping28 : 06-15-2007 at 04:14 PM.
Reply With Quote
  #8  
Unread 06-15-2007, 09:01 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Well, if you attach what you have now I can tell you how I would put it together.

Any window with a textbox tends to have this same problem. If you open the community window, resize it or move it a little, and then try to run or turn, your keyboard input goes to the textbox. The same thing happened with my browser window mod so I ended up just disabling the textbox most of the time.

Hmm, you could probably have just one hidden button that would disable both text boxes. If needed you can put the set_focus command into the same script.
Reply With Quote
  #9  
Unread 06-16-2007, 12:08 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

The following didn't work?

Code:
<page OnHoverIn="Textbox1.Enabled=True Textbox2.Enabled=True" onHoverOut="Textbox1.Enabled=False Textbox2.Enabled=False">
<Textbox name="Textbox1"/>
<Textbox name="Textbox2"/>
</page>
You u just have to make sure the page only encapsulates the height and width of the two text box.

But if you happen to have your mouse over it when you decide to run or jump or what ever, then they will receive focus. The only way around this is to add that enabled or !enabled like Othesus said 2 or 3 post back.

I'd test it for you, but I'm on dial-up ATM and just trying to load the pages here are makin me want to kill myself....
__________________
Landiin's EQ2MAP Updater Discussion Download

Last edited by Landiin : 06-16-2007 at 12:12 AM.
Reply With Quote
  #10  
Unread 06-16-2007, 02:11 PM
dping28 dping28 is offline
A Grove Wisp
Interface Author - Click to view interfaces
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 26
Default

I havent gotten around to trying out either of your ideas yet. been pretty busy. But here is what I have:

Code:
<?xml version="1.0" encoding="utf-8"?>
<Page Activated="true" alwaysonbottom="false" eq2usescomwndcontrols="true" Location="203,427" MaximumSize="1024,1024" Name="StartButton" PackLocation="left,bottom" PackLocationProp="0203/0001,-341/0001" savessettings="true" ScrollExtent="248,74" Size="248,74" UserMovable="true">
<Page Location="55,8" Name="Assist" ScrollExtent="188,62" Size="188,62">
<Checkbox BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" Location="-3,34" MinimumSize="22,22" Name="MTCheck" OnSet="Parent.MTName.Editable=false" OnUnset="Parent.MTName.Editable=true" ScrollExtent="23,24" Size="23,24" Style="/CommonElements.Checkbox.data.style"></Checkbox>
<Textbox BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" Cursor="/Cursor.Text" Location="18,-2" MaximumSize="16384,30" MinimumSize="30,30" Name="MAName" RStyleActivated="Textfield.data.selected.rect" RStyleDefault="Textfield.data.default.rect" RStyleDisabled="Textfield.data.disabled.rect" RStyleDisabledActivated="Textfield.data.disabled.rect" RStyleMouseOver="Textfield.data.mouseover.rect" RStyleMouseOverActivated="Textfield.data.selected.rect" RStyleMouseOverSelected="Textfield.data.selected.rect" RStyleSelected="Textfield.data.selected.rect" ScrollExtent="130,30" Size="130,30" Style="/CommonElements.Textfield.data.style"></Textbox>
<Button LocalText="MA" Location="147,-3" MaximumSize="16384,32" MinimumSize="32,32" Name="MA" OnPress="target Parent.MAName.LocalText" ScrollExtent="38,32" Size="38,32" Style="/CommonElements.PushButton.data.style">MA</Button>
<Checkbox BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" Location="-3,1" MinimumSize="22,22" Name="MACheck" OnSet="Parent.MAName.Editable=false" OnUnset="Parent.MAName.Editable=true" ScrollExtent="23,24" Size="23,24" Style="/CommonElements.Checkbox.data.style"></Checkbox>
<Button LocalText="MT" Location="147,30" MaximumSize="16384,32" MinimumSize="32,32" Name="MT" OnPress="target Parent.MTName.LocalText" ScrollExtent="38,32" Size="38,32" Style="/CommonElements.PushButton.data.style">MT</Button>
<Textbox BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" Cursor="/Cursor.Text" Location="18,31" MaximumSize="16384,30" MinimumSize="30,30" Name="MTName" RStyleActivated="Textfield.data.selected.rect" RStyleDefault="Textfield.data.default.rect" RStyleDisabled="Textfield.data.disabled.rect" RStyleDisabledActivated="Textfield.data.disabled.rect" RStyleMouseOver="Textfield.data.mouseover.rect" RStyleMouseOverActivated="Textfield.data.selected.rect" RStyleMouseOverSelected="Textfield.data.selected.rect" RStyleSelected="Textfield.data.selected.rect" ScrollExtent="130,30" Size="130,30" Style="/CommonElements.Textfield.data.style"></Textbox>
</Page>
<Button Location="8,25" Name="Start" PackLocation="cfc,cfc" PackLocationProp="-095/0001,0008/0001" PackSize="fixed,fixed" PackSizeProp="0002/0003,0002/0003" PressSound="ui_pressed" ScrollExtent="42,41" Size="42,41" Style="data.style"></Button>
<Page AbsorbsInput="false" Name="WindowFrame" PackSize="absolute,absolute" PackSizeProp="0000/0001,0000/0001" ScrollExtent="248,74" Size="248,74">
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Frame" PackLocation="left,top" PackLocationProp="0000/0001,0000/0001" PackSize="absolute,absolute" PackSizeProp="0000/0001,0000/0001" RStyleDefault="/WindowElements.DesktopWindowFrame.data.frame.rect" ScrollExtent="248,74" Size="248,74"/>
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Bkg" PackLocation="left,top" PackLocationProp="0000/0001,0000/0001" PackSize="absolute,absolute" PackSizeProp="0000/0001,0000/0001" RStyleDefault="/WindowElements.DesktopWindowFrame.data.bkg.rect" ScrollExtent="248,74" Size="248,74"/>
</Page>
<Namespace Name="data">
<ButtonStyle Name="style" RStyleActivated="RStylePressed" RStyleDefault="RStyleNormal" RStyleDisabled="RStyleNormal" RStyleMouseOver="RStyleMouseover" RStyleMouseOverSelected="RStylePressed" RStyleSelected="RStylePressed"/>
<RectangleStyle Center="normal" CenterStretchH="false" CenterStretchV="false" EastStretch="false" Name="RStyleNormal" NorthStretch="false" SouthStretch="false" WestShrink="true"/>
<RectangleStyle Center="pressed" CenterStretchH="false" CenterStretchV="false" EastStretch="false" Name="RStylePressed" NorthStretch="false" SouthStretch="false" WestShrink="true"/>
<RectangleStyle Center="mouseover" CenterStretchH="false" CenterStretchV="false" EastStretch="false" Name="RStyleMouseover" NorthStretch="false" SouthStretch="false" WestShrink="true"/>
<ImageStyle Filter="true" Name="mouseover">
<ImageFrame Name="image" Source="images/mugshots_female.dds" SourceRect="442,53,484,95"/>
</ImageStyle>
<ImageStyle Filter="true" Name="pressed">
<ImageFrame Name="image" Source="images/mugshots_female.dds" SourceRect="442,102,484,144"/>
</ImageStyle>
<ImageStyle Filter="true" Name="normal">
<ImageFrame Name="image" Source="images/mugshots_female.dds" SourceRect="442,4,484,46"/>
</ImageStyle>
</Namespace>
</Page>
Thats the entire xml file.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:40 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI