User Details
- User Since
- Mar 30 2024, 10:25 PM (16 w, 6 d)
Yesterday
Yes. There needs to be a linebreak character at the end of the last line.
Yep. Just make sure to add a newline to the end of all the files.
Thanks @Stan
@ShadowOfHassen you have the necessary permissions. Just click the "Update Diff" button in the top right of the page.
I'll see if I can help with D1730 as well. Maybe we can finish both now.
Thu, Jul 4
Well, it was just an idea and is (of course) not technically necessary by any means.
Wed, Jul 3
What do you think about that?
Yeah, my bad. Not sure how I missed those.
Tue, Jul 2
No problem, I understand that. Just meant as a friendly reminder:)
This ready to be commited, no?
I've already written the olist page for the wiki and added a reference to this revision into the official mod porting guide.
Fri, Jun 28
Thu, Jun 27
This would work in CList.cpp but not in COList.cpp. Specifically because of
return selected && *m_TextColorSelected ? m_TextColorSelected : m_TextColor;
This is because in olists each column has its own textcolor and textcolorselected properties (column.m_TextColor and column.m_TextColorSelected) that need to be used in place of m_TextColor and m_TextColorSelected (see COList.cpp:443). So, if we used a GetTextColor function we'd need to pass those to it as well.
Jun 23 2024
Are you sure that's worth it? The function would execute exactly one single line and we'd need to pass TextColor, TextColorSelected, i, (and possibly DrawSelected) to it.
Ok, I rebased it and changed colorSelected to textcolor_selected.
Jun 22 2024
Nice, thanks
Jun 21 2024
@phosit @sera @Stan @vladislavbelov Hey, sorry for the ping. Is there anything left to change here or in D5269? If not, can someone please review the diffs and commit them?
After that, I can also update the guide for porting mods to A27.
Jun 19 2024
This diff is pretty simple. I don't think there's much to discuss here. Is it ready to be merged?
Jun 12 2024
Is there anything else left to change?
I added D5278 as a parent and will update this diff as soon as that is committed.
Sure, I can do that.
Jun 10 2024
Sorry for the late reply.
I just succesfully tested it. These should now be all files that need to be changed. As far as I can tell it's complete.
Jun 3 2024
Jun 2 2024
Not that many. From a quick count, there are around 10 files with olists in the game whose column's property would have to be changed, plus around 3 files implementing the feature.
Jun 1 2024
Ok. How about I leave it at "colorSelected" for now and then open a new diff to rename "color" to "textcolor" and "colorSelected" to "textcolor_selected"?
Does the font color of columns have to named color though? For all other GUI elements it is textcolor. What about renaming it to this? We could then also use the name textcolor_selected.
Ok, that makes sense.
But I don't quite understand what you're getting at...
May 31 2024
The textcolor attribute of columns is just called "color", so I figured its selected variant should be called "colorSelected"
May 30 2024
Ok, I changed it accordingly.
May 29 2024
So you are recommending to not pass m_TextColorSelected to DrawList and instead read it directly? Isn't this way a bit inconsistent when compared to the handling of all other properties?
@phosit Why not? Wouldn't that be the most logical solution?
May 25 2024
In this patch i wouldn't change *::Draw at all. And i wouldn't change the signature of *::DrawList.
Are you sure? That would mean accessing m_TextColorSelected directly but all other properties (including m_TextColor) through parameters of the function.
We don't need both the functions COList:Draw() and COList:DrawOList, we can merge them into one overriding CList:Draw().
We can do that in a future diff.
I mean, it's not unrelated to this diff. The diff is editing COList::Draw(O)List anyway.
I think the awkward calls and overrides of the two functions Draw() and DrawList() are done, so the dropdown can execute code before drawing the list.
Ok, I changed that.
Code which previously called COList::DrawList doesn't find that anymore and calls CList::DrawList instead. Which is wrong i think.
As far as I'm understand, the code calls the Draw() function first for each GUI object. CList::Draw() then calls CList::DrawList(). COList previously ìnherited Draw()and only overrode DrawList(). But now with the extra property textColorSelected that OList doesn't need, we can remove that parameter from its drawing function. I therefore made COList also override Draw() to now call the new function COList:DrawOList() instead, with parameter less than previously CList:DrawList().
May 24 2024
I did. See COList.cpp line 305 and COList.h line 76.
Ok, I wrote the page (https://trac.wildfiregames.com/wiki/GUI_-_OList) and also added the missing properties here: https://trac.wildfiregames.com/wiki/GUI_-_Properties and the reference here:https://trac.wildfiregames.com/wiki/GUI_-_Scripting_Reference
Is the code fine as it is or does something else need to be changed?
May 21 2024
removed the extra parameter textColorSelected from COList::DrawList()
This should prevent the compiler warnings.
May 20 2024
updated the copyright years
May 19 2024
Ok. I removed the whitespace.
Thanks.
Are the problematic whitespaces still there? I couldn't find them in the files, but the inline comment is gone now.
May 18 2024
May 9 2024
Nice. Is there anything else you want me to change?
May 8 2024
May 7 2024
Apr 28 2024
Apr 26 2024
Apr 24 2024
I addressed most of the suggestions.
Ok, updated the diff. Is this how you wanted the comments?
Apr 23 2024
Like this?
I added/updated the comments. Do you also want a comment before line 95? This.CountLabel is already marked for translation at this point (and has a comment explaining what it is).
Apr 21 2024
Ok, nice. Made the change and added the trac ticket.
Apr 20 2024
Ok, I made the change.
Apr 19 2024
OK, and what's preferred?
Apr 18 2024
Not sure what you mean by this, though. What should I change?
Apr 17 2024
Apr 8 2024
The Mauryan emperors were sorted chronologically. I put them in alphabetical order too.
When the AINames are empty or don't exist, the game already throws errors before the step of choosing the names.
changing three let to const