Thanks. And not to get defensive, but if you meant to imply i wasn't searching the site properly for this information by "No comment", please keep note this question was posted about a week before those wiki links were created/updated.
Oh, and great job on the wiki, I notice you've filled in a lot of the missing stuff inside it
Not quite what I had in mind. For example I wanted to loop 9 times and have 9 dialogs appear at different anchors.
I could just input the literals directly and it would do it automatically. No extra assignments required, thus removing the need to allocate memory unnecessarily.
Say the literals for arrow key inputs are 73,75,77,79 and we wanted to assign key press trigger events.
Rather than assigning all the constants into an dummy array and iterating through the array. By using literals instead, There is the freedom to just loop it 4 times and use the formula 73+2*i to assign the events. This is the main advantage I see.
Yeah, I'm bought on the idea. It's unfortunate for me that I remember numbers easier than the lengthly constant names. A good example would be dialog control creation. I use them quite a lot so its easy for me to remember 3 = button, 2 = icon, 1 = label as opposed to c_dialogControlButton? etc etc... (can't remember) =/ In the end I suppose it all comes down to familiarity.
Thanks for the enlightenment. I'll keep this in mind when I'm working on my future codes, given that I expect someone else will work with it once I'm done with it.
Well, I can iterate literals. But constants? It's a little hard (maybe impossible?) to do.
Whoops.. I missed that natives page. It looks like it has everything I need. I guess this thread is redundant then.
Care to elaborate as to why it's horrible practice? I'd like to know. Though i can guess it's probably cos it makes it very hard for other people to work with your code.
I'm sure those of us who code with Galaxy are quite familiar with some of the constants that exist. The intent of this thread is to come up with a list of the values of all these constants so we can simply type 0, instead of c_blablablablablablabla. It makes coding so much faster see?
Unfortunately there are a hell of a lot of constants in the Galaxy editor and It gets pretty hard to use them without having to use the trigger editor to check them one by one when coding. I won't be able to find them all myself.
This is where I need help from anyone who is interested to help. If there are any constants you would like to see listed here, please post them, when I find the time, I'll update this post with them and hopefully in future we can just use this thread to Ctrl+F find the values we need, making our coding lives much easier.
If there's any mistakes, Please inform me.
Dialogs
Anchors
0 - c_anchorTopLeft
1 - c_anchorTop
2 - c_anchorTopRight
3 - c_anchorLeft
4 - c_anchorCenter
5 - c_anchorRight
6 - c_anchorBottomLeft
7 - c_anchorBottom
8 - c_anchorBottomRight
Now lets cross our fingers and hope this goes well.
If someone could provide me with a list of all the constants that would be great as well, I could just code an algorithm to check all their values so we can post them here directly. But please identify their type.. Because not everything is an integer.
@avogatro: Go
Thanks. And not to get defensive, but if you meant to imply i wasn't searching the site properly for this information by "No comment", please keep note this question was posted about a week before those wiki links were created/updated.
Oh, and great job on the wiki, I notice you've filled in a lot of the missing stuff inside it
@MotiveMe: Go
Ok.. guess it's time to start memorizing constant names.
@MotiveMe: Go
Not quite what I had in mind. For example I wanted to loop 9 times and have 9 dialogs appear at different anchors. I could just input the literals directly and it would do it automatically. No extra assignments required, thus removing the need to allocate memory unnecessarily.
Say the literals for arrow key inputs are 73,75,77,79 and we wanted to assign key press trigger events. Rather than assigning all the constants into an dummy array and iterating through the array. By using literals instead, There is the freedom to just loop it 4 times and use the formula 73+2*i to assign the events. This is the main advantage I see.
Its too bad its horrible practice.
@s3rius: Go
Yeah, I'm bought on the idea. It's unfortunate for me that I remember numbers easier than the lengthly constant names. A good example would be dialog control creation. I use them quite a lot so its easy for me to remember 3 = button, 2 = icon, 1 = label as opposed to c_dialogControlButton? etc etc... (can't remember) =/ In the end I suppose it all comes down to familiarity.
@caspersc: Go
Thanks for the enlightenment. I'll keep this in mind when I'm working on my future codes, given that I expect someone else will work with it once I'm done with it.
@caspersc: Go
Well, I can iterate literals. But constants? It's a little hard (maybe impossible?) to do.
Whoops.. I missed that natives page. It looks like it has everything I need. I guess this thread is redundant then.
Care to elaborate as to why it's horrible practice? I'd like to know. Though i can guess it's probably cos it makes it very hard for other people to work with your code.
Placeholder
Introduction
I'm sure those of us who code with Galaxy are quite familiar with some of the constants that exist. The intent of this thread is to come up with a list of the values of all these constants so we can simply type 0, instead of c_blablablablablablabla. It makes coding so much faster see?
Unfortunately there are a hell of a lot of constants in the Galaxy editor and It gets pretty hard to use them without having to use the trigger editor to check them one by one when coding. I won't be able to find them all myself.
This is where I need help from anyone who is interested to help. If there are any constants you would like to see listed here, please post them, when I find the time, I'll update this post with them and hopefully in future we can just use this thread to Ctrl+F find the values we need, making our coding lives much easier.
Dialogs
Anchors
Now lets cross our fingers and hope this goes well.
If someone could provide me with a list of all the constants that would be great as well, I could just code an algorithm to check all their values so we can post them here directly. But please identify their type.. Because not everything is an integer.