« first day (3241 days earlier)      last day (1764 days later) » 

1:14 AM
@TheMattbat999 sorry you didn't win. I tried to bite for you but I didn't have the rep. :(
 
2:04 AM
@bruglesco oof. Thanks anyway.
 
2:41 AM
@DMGregory Working though my queue, I ran across an anonymous edit to your answer with the comment 'Code Error'. It looks suspect to me, but I figured maybe just ping you & get your thoughts.
 
@Pikalek I'd agree the edit does not look correct to my eye. I haven't run the code though, and it's late, so it's entirely possible that I'm missing something obvious.
 
 
8 hours later…
10:28 AM
There is an issue on Unity bugtracker that is directly related to my problem with vector icons:
https://issuetracker.unity3d.com/issues/ui-components-eg-image-component-is-no-longer-anti-aliasing-in-game-view-with-screen-space-overlay-canvas
> Won't fix
 
10:52 AM
@Almo YES!
 
11:30 AM
@Pikalek Ah, no, fresh eyes in the morning, there was indeed a typo. < should have been >. Looks like the confusing edit was to get around the restriction on single-character changes.
 
12:08 PM
there is a workaround however, maybe it will not break my buttons
 
12:59 PM
it did
 
1:12 PM
but probably it's just a layout system that cause lags
 
 
2 hours later…
3:40 PM
@DMGregory Ah, I hadn't considered the character limit. Sorry to stir things up unnecessarily.
 
4:08 PM
@Almo What's new from the land of Cognizeria?
 
 
1 hour later…
5:09 PM
i have a new project, but I haven't touched it in about 6 months
just too tired
design work is tiring in a different way than coding
still not really used to it
doing the IAP update for jon gallant's Picross Touch on iOS first
will actually get some money for that
how you doin?
 
 
2 hours later…
7:00 PM
How do you tell your software what command-line arguments it received? We have a class that distributes each argument to relevant 'Manager' through one of its static value, and once the manager is initialized, it checks that static value and use it to initialize its instance value. This has the advantage of having all of the command line arguments at one place, but this forces us to use a weird pattern relying on static variables.
 
7:50 PM
@AlexandreVaillancourt what language?
 
@Pikalek c++
 
You need a specialized main function declaration: main(int argc, char* argv[])
argc is the # of command line args - as I recall, the command used to launch the app counts as one of them
argv is an array that holds the string of the command line args
I think you can also do char** argv - not sure if one or the other has become de facto w/ modern C++
Back when I did C++, I had to parse them out by hand. Now days it looks like there is a getopt library to help with it.
If you're asking about getting the command line args from other places in the code, I'm not sure about that. I wouldn't be surprised if there's some sort of hack to do it, but I only familiar with passing them on from main.
 
I'd leave the weird pattern. Sounds like it's A) easy to use B) not code that changes often. So it's ok if it's a bit weird.
 
Honestly, if possible I would consider copying them to a singleton as the first thing thing done in main & just let what ever code needs them to pull them from the singleton as needed.
Or what @Almo said - those are valid points.
 
8:06 PM
That sounds decent, too
 
@Pikalek yeah, that's the second option I wa considering. Then the #inclues are done the other way around: the "MgrViewer" includes "MgrCmdLinOptions".
Was*
This still leaves an imperfection. Right now, the MgrCmdLineOption has acces to the many Managers (physics, viewing, shadowing, etc), so it can do the "translation" from a string (from argv) or an int to the "target" value (e.g. it can convert "-shadow1" to MgrShadowing::SHADOW_1). Not sure how I'd pull this off with it the other way around.
Hmm I think I have an idea. But I won't implement it because no bang for the buck for now.
 
8:48 PM
Another consideration of pulling the values out of a singleton is that sometimes options override those that have been set before e.g. with "-shadow0 -shadow1", the system should receive "shadow1" and not "shadow0".
 
 
1 hour later…
10:14 PM
@AlexandreVaillancourt One option is to have the singleton act as a glorified global variable. In that case, it only holds the command line args as originally presented & it's up to the calling code to know if it needs to resolved "shadow1" with anything else.
Another option is to turn the singleton into a sort of command line args manager. In that case either directly or indirect it resolves things like "shadow0" vs. "shadow1" and holds the result.
Although in the latter case, I would still have it keep a copy of the args as originally presented at launch for diagnostic purposes.
As for converting "-shadow1" to MgrShadowing::SHADOW_1, I would probably push that which ever manager deals with that.
But as you said, if there's no big payoff for reworking the code, leaving it as is sounds very reasonable.
 

« first day (3241 days earlier)      last day (1764 days later) »