Posted By
|
Message
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
6th May, 2014 at 06/05/2014 23:59:03 -
I'm trying to make a settings screen for an app I've been working on. The settings screen is comprized of 30 editboxes all set up in a qualifier group 0. Each individual edit box has two string variables. The first is the text that should appear in the individual editboxes on level start, and the second is a tooltip which I want to display under the editboxes when they have focus.
The first part is working just fine. On level start, each editbox pulls a string from Alterable String A. When a user clicks one of the editboxes, the text disappears. If the user types something in, the edited text remains, but if they type nothing, each editbox is reset to display AlterableStringA again. I did this so I wouldn't need to create seperate label items. Each edit box contains it's lable until the user fills it with data. Problem is, once a user fills an edit box with data, obviously the label disappears so I wanted to ALSO show a tooltip under each editbox.
Start of frame:
Group.0 set text Alterable String A.
Group.0 have input focus +
Edittext$ (Group.0) = Alterable String A (Group.0):
Group.0 set text = "".
Group.0 set internal flag 0 on.
Group.0 internal flag 0 is on+
Edittext$ (Group.0) <> ""+
Edittext$ (Group.0) <> Alterable String A+
(negated) Group.0 have input focus:
Group.0 set internal flag 0 off.
Group.0 internal flag 0 is on+
Edittext$ (Group.0) = ""+
(negated) Group.0 have input focus:
Group.0 set text = Alterable Sting A
Group.0 set internal flag 0 off.
----------------------------------------------------------
Works great. My problem is the tooltip text. I don't want the tooltip to appear when the user mouses over the editboxes, but instead when the user clicks a 16x24 area to the right of each editobject. I could use buttons, but then I'm adding another 30 buttons beside each edit object. Bleh.
The problem I'm having is trying to make each editbox flip a flag when the user clicks next to them, not on them. Eventually, I'd like to make a background object which looks like a button, but won't dramatically increase the apps RAM usage.
XMouse > X(Group.0) + Edit X size (Group.0) +
XMouse < X(Group.0) + Edit X size (Group.0)+16 +
YMouse > Y(Group.0) +
YMouse < Y(Group.0)+Edit Y size (Group.0) +
User clicks with left button:
String set X position = X(Group.0)
String set Y position = Y(Group.0)+Edit Y size (Group.0)
String set alterable string = Alterable String B (Group.0)
The tooltip string only appears when the user clicks within the tested area next to the very first editbox and won't appear otherwise. I know what the equation is missing. I need to figure out some way to flip a flag on each editbox when the user clicks beside them. Since the user won't actually be clicking on an object and won't be clicking on the editbox to display the tooltip, I don't know how to associate clicking in a tested space to toggle a switch on the editbox next to it.
The easy way out would be making buttons. Anybody know any other solutions?
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
7th May, 2014 at 07/05/2014 02:52:24 -
There's probably an easier way of asking this question.
I have 30 editboxes all in a qualifier group.
I want to display a unique tool tip beneath each edit box when the user clicks the area to the left of each editbox.
I don't want to add thirty string objects, thirty buttons, or thirty active objects.
Instead, I'm trying to test mouse position next to the qualifier group, but how do I toggle a flag on just one editbox if I'm just testing for a mouseclick in a defined area relative to every qualifier object? Possible, or am I stuck making 30 clickable objects?
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
|
|