Patch for replacing BuildDetailPanel with EncyclopediaDetail

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Patch for replacing BuildDetailPanel with EncyclopediaDetail

#1 Post by OndrejR »

In attachment there is patch for replacing BuildDesignatorWnd::BuildDetailPanel with EncyclopediaDetailPanel from programming work(Production screen).

Patch is zipped because is too big for forum post.
Attachments
replacing_patch.zip
(5.7 KiB) Downloaded 114 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Patch for replacing BuildDetailPanel with EncyclopediaDetail

#2 Post by Geoff the Medio »

A few comments...

If you're going to change the type of DisplayNamedBuildItemSignal to mutable boost::signal<void (const BuildingType*)> then you should change the name to DisplayBuildingTypeSignal, and similarly for the IDed display ship signal. They were the way they were in case we ever had another named or IDed type of thing that could be built.

Use spaces, not tabs, for indenting.

Why does EncyclopediaDetailPanel need to be friend of BuildDesignatorWnd?

Also, if you're in there, could you change the text that says "Ship Design" for ships and "Building" for buildings to say "Building Type" for buildings, on the encyclopedia detail panel? We should probably distinguish between the building type and specific building objects. I think this is just a stringtable tweak.

Edit: you might also want to do the same thing for the tech detail panel and tech tree wnd.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Patch for replacing BuildDetailPanel with EncyclopediaDetail

#3 Post by OndrejR »

Geoff the Medio wrote: If you're going to change the type of DisplayNamedBuildItemSignal to mutable boost::signal<void (const BuildingType*)> then you should change the name to DisplayBuildingTypeSignal, and similarly for the IDed display ship signal. They were the way they were in case we ever had another named or IDed type of thing that could be built.
Done. I intented, but Eclipse refactoring didn't work and then I forgot.
Geoff the Medio wrote:Use spaces, not tabs, for indenting.
Done. I always did the opposite, but OK. I also changed Eclipse wiki howto.
Geoff the Medio wrote:Why does EncyclopediaDetailPanel need to be friend of BuildDesignatorWnd?
Done. There is no need. BuildDesignatorWnd had private functions, but I changed them to public and removed friend(other windows will also access them)
Geoff the Medio wrote:Also, if you're in there, could you change the text that says "Ship Design" for ships and "Building" for buildings to say "Building Type" for buildings, on the encyclopedia detail panel? We should probably distinguish between the building type and specific building objects. I think this is just a stringtable tweak.
Done. Now there are specific types Ship Design and Building.
Geoff the Medio wrote:Edit: you might also want to do the same thing for the tech detail panel and tech tree wnd.
I intend to, but later after this one patch is in svn. Only one patch at the time.
Attachments
replacing_rev.zip
(5.94 KiB) Downloaded 122 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Patch for replacing BuildDetailPanel with EncyclopediaDetail

#4 Post by Geoff the Medio »

OndrejR wrote:
Geoff the Medio wrote:Also, if you're in there, could you change the text that says "Ship Design" for ships and "Building" for buildings to say "Building Type" for buildings, on the encyclopedia detail panel? We should probably distinguish between the building type and specific building objects. I think this is just a stringtable tweak.
Done. Now there are specific types Ship Design and Building.
I meant just change the text "Building" to "Building Type". I don't think we'll show information about a specific building object in the encyclopedia... (Or would we?)

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Patch for replacing BuildDetailPanel with EncyclopediaDetail

#5 Post by OndrejR »

Geoff the Medio wrote:I meant just change the text "Building" to "Building Type". I don't think we'll show information about a specific building object in the encyclopedia... (Or would we?)
It depends if there is special building type - special ship(scenario or mission) or building. For example in Imperium Galactica there are special ships. And also what does it mean building type if I don't know what it is for(unknown ship or building)?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Patch for replacing BuildDetailPanel with EncyclopediaDetail

#6 Post by Geoff the Medio »

OndrejR wrote:
Geoff the Medio wrote:I meant just change the text "Building" to "Building Type". I don't think we'll show information about a specific building object in the encyclopedia... (Or would we?)
It depends if there is special building type - special ship(scenario or mission) or building. For example in Imperium Galactica there are special ships.
We could still use the text "Building Type" or "Ship Design" in those cases... It's just be talking about the (unique or special) type or design of building or ship.

What you've done now will just show "Building Type Building" as the summary text... The strings were also oddly named, including "ENC_BUILDING_TYPE_SPECIFIC_SHIP_DESIGN". I've tweaked things a bit.

If we later have special or unique buildings or ships, we can make the specific text "(Unique)" or something similar, so the whole summary will be "Building Type (Unique)"

Edit: Committed changes.

Post Reply