*** tpb has joined #freeorion | 00:00 | |
*** JohnSGalt has quit IRC | 01:33 | |
CIA-32 | FreeOrion: geoffthemedio * r4583 /trunk/FreeOrion/ (3 files in 2 dirs): Slightly tweaked patch by fixIt to add an options screen toggle for showing planet renders on sidepanel. | 01:34 |
---|---|---|
fixIt | for the function DesignWnd::MainPanel::AddPart() how exactly do you want it to intelligently find an open slot? So right now it just loops through all the slots and puts the part in the first open slot that can mount the part type | 01:42 |
GeofftheMedio | up to you to figure out | 01:42 |
GeofftheMedio | maybe move a part if doing so would open a slot for the new part? | 01:42 |
GeofftheMedio | also: from yesterday: fixit: you might add an options screen ui toggle, defaulting to on, to hide the ERROR sitreps | 01:43 |
fixIt | Ah okay so by intelligently you just mean find an open slot faster? I wasn't sure if there was some specific better way to order the parts | 01:43 |
fixIt | Alright I'll put that on the todo list | 01:44 |
GeofftheMedio | no, I mean alter the existing design to make room for a part by moving an already-placed part around | 01:44 |
GeofftheMedio | eg from an internal to an external slot | 01:44 |
GeofftheMedio | or the other way | 01:44 |
GeofftheMedio | for a part that can only go in one or the other | 01:45 |
fixIt | Hmm okay thanks I think I just don't know enough about ship design. I'll have to play around with it | 01:46 |
fixIt | first | 01:46 |
fixIt | And when you say hide the ERROR sitreps do you mean toggle the code that makes an ERROR sitrep not display? | 01:47 |
GeofftheMedio | there's one or two lines that skips a sitrep if it doesn't validate | 01:49 |
GeofftheMedio | turn that skipping on or off as appropriate, so that ERROR sitreps will still display if the user wants them | 01:50 |
GeofftheMedio | where in this case, user is probably programmer | 01:50 |
fixIt | Okay sounds good. Should that go in the UI tab under Content Descriptions? | 01:51 |
GeofftheMedio | at the bottom, yeah | 01:54 |
*** StrangerDanger has joined #freeorion | 02:09 | |
*** STalKer-Y has joined #freeorion | 04:37 | |
*** STalKer-X has quit IRC | 04:37 | |
CIA-32 | FreeOrion: geoffthemedio * r4584 /trunk/FreeOrion/ (3 files in 2 dirs): Slightly tweaked patch by fixIt to add an optionsWnd toggle for showing / hiding sitrep messages with errors in them. | 04:41 |
*** _Maru_ has joined #freeorion | 04:42 | |
CIA-32 | FreeOrion: geoffthemedio * r4585 /trunk/FreeOrion/universe/Condition.cpp: Fix for GCC compile error due to "and" being sort-of a C++ keyword. | 05:06 |
*** Digit01 has quit IRC | 06:17 | |
*** Digit_01 has joined #freeorion | 06:17 | |
*** Digit01 has joined #freeorion | 06:34 | |
*** Digit_01 has quit IRC | 06:35 | |
*** StrangerDanger has quit IRC | 08:13 | |
*** neoneurone has joined #freeorion | 09:07 | |
*** neoneurone has quit IRC | 10:18 | |
*** VargaD has joined #freeorion | 10:54 | |
*** Digit_01 has joined #freeorion | 11:40 | |
*** Digit01 has quit IRC | 11:40 | |
*** neoneurone has joined #freeorion | 12:21 | |
*** neoneurone has quit IRC | 12:51 | |
*** Digit_01 has quit IRC | 13:34 | |
*** VargaD has quit IRC | 15:40 | |
*** fdfdfd has joined #freeorion | 16:22 | |
*** Digit01 has joined #freeorion | 17:49 | |
fixIt | are file scope functions supposed to be inside of the anonymous namespace? | 18:27 |
GeofftheMedio | usually | 18:37 |
fixIt | Hey Geoff so I redid the AddPart patch and broke the logic into functions AddingPartAnySlot() and AddingPartSwapSlots() which both take a parttype and a bool indicating whether to actually set the part. They both also return a bool of a result | 19:14 |
fixIt | As of now they are apart of DesignWnd::MainPanel() class | 19:14 |
fixIt | So it would be better though to make them static "file scoped" functions in the anonymous namespace? | 19:15 |
fixIt | I don't really know much about anonymous namespaces and their purpose/design advantages and was hoping you could clue me in on them | 19:15 |
GeofftheMedio | Rename those to something like CanPartBeAddedAnyEmptySlot and CanPartBeAddedWithSwapping | 19:26 |
GeofftheMedio | And have a separate function to do that actual adding | 19:27 |
GeofftheMedio | like AddPartEmptySlot and AddPartWithSwapping | 19:27 |
GeofftheMedio | or at least those should be the functions that are publically available | 19:28 |
GeofftheMedio | if you want to have those functions you wrote as the internal implementation, then put them in the .cpp file and not in the header | 19:28 |
GeofftheMedio | and stick them in an anonymous namespace, just to avoid any potential name collisions with other functions in other namespaces | 19:29 |
*** StrangerDanger has joined #freeorion | 19:30 | |
GeofftheMedio | probably not an issue for these function names, but a good habit, I gather... | 19:31 |
fixIt | So are AddPartEmptySlot and AddPartWithSwaping supposed to be static functions but still apart of the DesignWnd::MainPanel() class? And DesignWnd::MainPanel() I guess is already totally internal implementation since its declaration and defintions are both in the cpp. | 19:52 |
fixIt | As of right now I have the logic broken down into those 2 functions and then the AddPart() and CanBeAddedToHull() use them, addpart with the set_part as true and false when calling from CanBeAddedToHull() | 19:53 |
fixIt | So by adding something to an anonymous namespace in the .cpp and public, it just makes it publically avaliable only to things implemented in the .cpp? | 19:54 |
GeofftheMedio | no, I think the AddPart functions would be member functions of MainPanel just like the existing AddPart function | 19:55 |
GeofftheMedio | yes, things in anonymous namespaces in cpp files are only callable from that cpp | 19:56 |
fixIt | Okay. And so the original AddPart() which is hooked up to the signal would use those two new static AddPart() functions to add the part if possible? | 19:58 |
fixIt | What would the reasons be for making the original AddPart() not static? | 19:58 |
GeofftheMedio | why are you making anything static? I said the addpart stuff should all be member functions | 19:58 |
GeofftheMedio | it doesn't make sense to make them static; they're modifying a particular instance of mainpanel | 19:59 |
fixIt | Oh alright sorry for some reason I associated file scope with static, so file scope just means in the .cpp then | 19:59 |
GeofftheMedio | file scope means only visible within that file | 20:00 |
GeofftheMedio | so not declared in a header file, just declared / defined in the cpp | 20:00 |
fixIt | Okay. So isn't everything already file scope then? Since that whole class's declaration/definition is in the .cpp. Would that imply that since the whole class is file scope it all should go into the anonymous namespace? | 20:02 |
GeofftheMedio | MainPanel and a few other classes are forward declared in DesignWnd | 20:04 |
GeofftheMedio | in the header | 20:04 |
fixIt | Ahhh okay I think I understand now. Thus making the class not file scope since DesignWnd needs a ptr to them. However all of the functions are file scope and could be defined in the anonymous namespace if you wanted to? | 20:08 |
GeofftheMedio | define "the functions" ? | 20:10 |
fixIt | any of DesignWnd::MainPanel's function definitions could go into the anonymous namespace. However not the class declaration/function declarations? | 20:11 |
GeofftheMedio | the mainpanel functions are in the mainpanel class namespace | 20:13 |
fixIt | Yea I get that, so this would be the definition of a mainpanel function: const std::string& DesignWnd::MainPanel::FunctionName(){}. I guess is what I am confused about is the anonymouse namespace's use in relation to the mainPanel functions.. So the MainPanel class is NOT file scope. Therefore the class declaration although in the cpp cannot be inside of the anonymous namespace. All of MainPanels functions would however be file sc | 20:20 |
fixIt | ope is this correct? Meaning that you could define all of MainPanel()s functions within the anonymous namespace? | 20:20 |
GeofftheMedio | the mainpanel's functions are all declared in the mainpanel class, so they can't be put into an anonymous namespace | 20:24 |
GeofftheMedio | (their definitions) | 20:24 |
fixIt | Ah alright. So basically anonymous namespace is irrelevant to what I am doing at the moment since I am dealing with file scope functions within a class. Thanks for the explanations. I'll just finish up the patch then and post it so you can take a look and see if I set things up the way you were looking for...that will probably be faster | 20:36 |
*** em3 has joined #freeorion | 21:38 | |
fixIt | Okay I just submitted a new version of the patch | 21:40 |
fixIt | Also just to let you know under UI improvements from the programming wiki: | 21:40 |
fixIt | Rename those to something like CanPartBeAddedAnyEmptySlot and CanPartBeAddedWithSwapping | 21:40 |
fixIt | <GeofftheMedio> And have a separate function to do that actual adding | 21:40 |
fixIt | <GeofftheMedio> like AddPartEmptySlot and AddPartWithSwapping | 21:40 |
fixIt | <GeofftheMedio> or at least those should be the functions that are publically available | 21:40 |
fixIt | <GeofftheMedio> if you want to have those functions you wrote as the i | 21:40 |
fixIt | oops wrong copy and paste lol, from the programming wiki: The sitrep message for a ship being produced just says the name of the ship and its location. It would be good to add an indication of the ship's design to that message. This would require modifying CreateShipBuiltSitRep in C++ and the corresponding stringtable entry. | 21:41 |
fixIt | can be removed | 21:41 |
*** VargaD has joined #freeorion | 21:50 | |
GeofftheMedio | replied | 22:09 |
*** Digit_01 has joined #freeorion | 22:19 | |
*** guini_ has joined #freeorion | 22:22 | |
CIA-32 | FreeOrion: geoffthemedio * r4586 /trunk/FreeOrion/UI/ (ClientUI.cpp ClientUI.h): (log message trimmed) | 22:28 |
CIA-32 | FreeOrion: -Added ZoomToObject functions to ClientUI which take the id or name and look for an object with that id or name, and then show that object in the GUI. | 22:28 |
CIA-32 | FreeOrion: -Added ZoomToContent function to ClientUI which takes a string and looks up | 22:28 |
CIA-32 | FreeOrion: anything it can find that has that name. An optional parameter specifies | 22:28 |
CIA-32 | FreeOrion: whether the string is user-readable (eg. The Physical Brain, rather than the | 22:28 |
CIA-32 | FreeOrion: internal untranslated tech name and stringtable index like LRN_PHYS_BRAIN). If | 22:28 |
CIA-32 | FreeOrion: reverse lookup is true, various types of content are scanned through in order to | 22:28 |
CIA-32 | FreeOrion: geoffthemedio * r4587 /trunk/FreeOrion/UI/ChatWnd.cpp: Added basic text command parser for messages window entered text, with a / prefix indicating a command (as opposed to chat). Just zooming to content or objects is implemented so far. | 22:38 |
*** StrangerDanger has quit IRC | 22:38 | |
*** Digit01 has quit IRC | 22:38 | |
*** guini has quit IRC | 22:38 | |
CIA-32 | FreeOrion: eleazzaar * r4588 /trunk/FreeOrion/default/eng_stringtable.txt: reworded ship production message to: A %shipdesign%,'%ship%' has been produced at %system%. | 22:49 |
*** VargaD has quit IRC | 22:56 | |
*** StrangerDanger has joined #freeorion | 22:56 | |
CIA-32 | FreeOrion: geoffthemedio * r4589 /trunk/FreeOrion/ (AI/AIInterface.cpp UI/DesignWnd.cpp): | 23:03 |
CIA-32 | FreeOrion: -Patch by fixIt to make automatically adding parts to designs more flexible | 23:03 |
CIA-32 | FreeOrion: -Line ending tweak (?) to AIInterface.cpp | 23:03 |
CIA-32 | FreeOrion: geoffthemedio * r4590 /trunk/FreeOrion/ (UI/DesignWnd.cpp changelog.txt): | 23:15 |
CIA-32 | FreeOrion: -Minor grooming | 23:15 |
CIA-32 | FreeOrion: -changelog.txt update | 23:15 |
*** em3 has quit IRC | 23:17 | |
*** GeofftheMedio has quit IRC | 23:21 | |
*** GeofftheMedio has joined #freeorion | 23:24 | |
*** dansan has joined #freeorion | 23:41 | |
*** dansan_ has quit IRC | 23:42 | |
*** dansan has quit IRC | 23:48 | |
*** dansan_ has joined #freeorion | 23:48 | |
*** dansan has joined #freeorion | 23:54 | |
*** dansan_ has quit IRC | 23:54 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!