Home   Help Search Login Register  

Author Topic: Dialog: ST_MULTI  (Read 962 times)

0 Members and 2 Guests are viewing this topic.

Offline CrashDome

  • Members
  • *
Dialog: ST_MULTI
« on: 09 Jun 2003, 05:29:53 »
I noticed "\n" doesn't work in multi-line controls.

Anybody know what does?

vektorboson

  • Guest
Re:Dialog: ST_MULTI
« Reply #1 on: 10 Jun 2003, 20:50:31 »
Hi, did you include

Code: [Select]
lineSpacing = 1.0;
in your control class?

Offline CrashDome

  • Members
  • *
Re:Dialog: ST_MULTI
« Reply #2 on: 11 Jun 2003, 01:27:21 »
ack... :P

No I didn't. Will that allow "\n" or is there another "new line" character?


Another related question:
In the multiplayer screen when choosing sides/roles, there is -
1. a clickable picture (the computer AI)
2. a title above the selection (e.g. Group Alpha Black:)
3. the type (e.g. Soldier)
4. the Name of the player
5. and whether it is an "AI"
all located in a list box.

Is any of that reproducable using the available dialog commands?

if you notice only a part is selectable too....

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Dialog: ST_MULTI
« Reply #3 on: 11 Jun 2003, 03:03:18 »
To your related q:
1. found with the path "\Misc\compai" or "\DTA\Misc\compai", prolly w/o DTA. You can find all other lobby dialog pics there. Just unpbo. And it can be done with lbSetPicture, but I'm not sure it would be suitable. There is ST_Picture, but I haven't done anything with it yet...
2. When you hint format ["%1",ap] a unit named ap u get Alpha Black:1 or similar. It can be entered into an lb similarly, use
units ap select _i
to pick out the peeps in the right order (might come in it with other commands anyho), and _i+1 for the number of the unit.
3. Gee, typeOf would return ugleh classnames, maybe you should make 2 arrays, list the classname in other and in the same index of the other the string you wan't to show? Naw helluva work.
4. use (name ap).
5. use ? (units ap select _i != player) : ctrlSetText [12345,"omg AI!SCRAMLE!!!"]  ;D

...ok, ask a lil less at a time and I can take it to closer view if needed.
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Offline CrashDome

  • Members
  • *
Re:Dialog: ST_MULTI
« Reply #4 on: 12 Jun 2003, 23:30:48 »
vektorboson: No, that still didn't solve my issue.

MI_Fred: You didn't understand my question. I wasn't asking how to reproduce those exact things, but how to group something in a listbox LIKE those things.

Still unsolved.....
anyone? anyone?

vektorboson

  • Guest
Re:Dialog: ST_MULTI
« Reply #5 on: 13 Jun 2003, 01:24:05 »
vektorboson: No, that still didn't solve my issue.

MI_Fred: You didn't understand my question. I wasn't asking how to reproduce those exact things, but how to group something in a listbox LIKE those things.

Still unsolved.....
anyone? anyone?

Then post your multi-line class, I'm not a wizard that I can tell you with no information why it doesn't work!  ::)

Offline CrashDome

  • Members
  • *
Re:Dialog: ST_MULTI
« Reply #6 on: 13 Jun 2003, 02:07:23 »
Sure thing
Code: [Select]
class SOWRscListBox
{
   type = CT_LISTBOX;
   style = ST_MULTI;
   colorBackground[] = SOW_Background;
   colorText[] = SOW_LBText;
   colorSelect[] = SOW_HiText;
   colorSelectBackground[] = SOW_Background2;
   font = SOWFont;
   sizeEx = 0.025;
   rowHeight = 0.025
    lineSpacing = 1.00;
   text = ;
};

followed later by the dialog class:
Code: [Select]
class NameBox : SOWRscListBox
   {
      idc = 1110;
      x = 0.1; y = 0.25; w = 0.2; h = 0.3;
   };

I was just under the assumption I wasn't using the correct "new line" character in my string.

example:
_String = format["%1\n%2\n%3",name vehicle player,skill player,damage player]
_index=lbAdd [1110,_String]
in the listbox results in the complete string of:
    PlayerName\n1\n0
displayed in the listbox rather than:
    Playername
    1
    0
the idea being that the whole group of text is one selection

[EDIT:] I tested "\n" on a simple static textbox using same parameters (rather than a listbox) and it also doesn't work.
« Last Edit: 13 Jun 2003, 02:16:51 by CrashDome »

vektorboson

  • Guest
Re:Dialog: ST_MULTI
« Reply #7 on: 13 Jun 2003, 17:13:09 »
Hi,

as I tested, ST_MULTI does only work for CT_STATIC.

Offline CrashDome

  • Members
  • *
Re:Dialog: ST_MULTI
« Reply #8 on: 13 Jun 2003, 17:30:21 »
Thank you for confirming that.
 Looks like back to the drawing board!  :P

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:Dialog: ST_MULTI
« Reply #9 on: 16 Jun 2003, 06:02:41 »
I've been away for awhile but you CAN make a clickable picture.

My BWPP_BuyWeapons Menu uses.  I think this is how I did it:

Set the pic that you want then set clickable text underneath it.  The text is nothing (ie. "") and set the size of it to cover the pic.  Now when you click the area of the pic you will actually be clicking the invisible text, which is over the pic.

Hope this helps.

Ben