View previous topic :: View next topic |
|
Author |
Message |
USS Frontier
Sovereign-Class Cadet 1st Class


Joined: 19 Sep 2005
Posts: 76

|
|
|

|
|
|
It's a problem i'm having, i've got a button that shows a window, then i created a STSubPane inside it. and inside this subpane, i need to show various icons in a specific coordinate, to make a map.
But how do I show an icon inside this subpane, in the X,Y coordinate?
I've already created an IconGroup with the icons I made, plus the rest of the Icons I need are from the game.
|
_________________ "Revenge is a dish best served cold"
Old Klingon Proverb
Orca Class WIP <----Needing some help
|
|
Back to top |
|
 |
Imperial_Destroyer
Rear Admiral

Age: 26
Zodiac: 
Joined: 01 Nov 2004
Posts: 1604
Location: Georgia

|
|
|

|
|
|
how i don't know, just that the x-y plane starts in the upper left corner and is positive in the down and right directions
|
_________________ did you hear the one where a lawyer had to teach a priest about ethics?
|
|
Back to top |
|
 |
USS Frontier
Sovereign-Class Cadet 1st Class


Joined: 19 Sep 2005
Posts: 76

|
|
|

|
|
|
Actually how i've already find out, i was having problem in showing the icon.
But then i've also find out that the problem was the icon number, it was wrong. So i just gotta see what is the icon number of the icon i'm looking for.
|
_________________ "Revenge is a dish best served cold"
Old Klingon Proverb
Orca Class WIP <----Needing some help
|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|
|
Back to top |
|
 |
USS Frontier
Sovereign-Class Cadet 1st Class


Joined: 19 Sep 2005
Posts: 76

|
|
|

|
|
|
The Icon Number wasn't wrong after all, the problem is that when it created the icon, for some reason, that icon group didn't existed... So i added a
Code: |
App.g_kIconManager.RegisterIconGroup("GravityFXIcons", "GravityFXIcons", "GravityFXIcons") |
to the function that was creating the icon group and it worked... I have no clue to what are these 3 strings needed, nor why i needed to put this line to work, i saw a bunch of other scripts that created icon groups in the same way as i was doing and none of them had this line, and yet all of them are working...
Also, MLeo, that bFront arg is to make the icon in front of the window/pane?
EDIT:
And how can i get the object/instance of the Map Window? So then after it i can check to see if it is enabled, meaning that the user is using the MapWindow.
|
_________________ "Revenge is a dish best served cold"
Old Klingon Proverb
Orca Class WIP <----Needing some help
|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|

|
|
|
The gravity well idea?
I've had a case once where I didn't put a 1 at the end (usually you can leave it at 0) and the object appeared at the back of a couple of other elements.
Setting it to 1 (or use pParent.MoveToFront(pElement)) solved it.
To get the map window:
Code: | pTopWindow = App.TopWindow_GetTopWindow()
pMapWindow = App.MapWindow_Cast(pTopWindow.FindMainWindow(App.MWT_TACTICAL_MAP)) |
If you look closely at those strings, and compare them to the icons directory (and it's files), you will see that it's the name, the file and the function to be called to load it.
Also, it's usually a good idea (just as the default icons do) to try and get the group, and if it isn't created, create it.
|
_________________
How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"
|
|
Back to top |
|
 |
USS Frontier
Sovereign-Class Cadet 1st Class


Joined: 19 Sep 2005
Posts: 76

|
|
|

|
|
|
lol yeah the gravity well idea
Thanks about the Map stuff, and the explanation of AddChild.
I saved the icon group when it was created to a global variable, then ingame when it were to show an icon and it didn't appeared I opened the console and checked the value of that global variable, the icon group had been created.
|
_________________ "Revenge is a dish best served cold"
Old Klingon Proverb
Orca Class WIP <----Needing some help
|
|
Back to top |
|
 |
|