Author Topic: [Fixed] Bug? Building names don't show up in command dialogue.  (Read 772 times)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
I have a feeling this might be a known issue since the new GUI stuff is still WIP, but here you go.



What is this building?  Who knows! :P
« Last Edit: 17 April 2011, 16:06:51 by silnarm »

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: [Fixed] Bug? Building names don't show up in command dialogue.
« Reply #1 on: 17 April 2011, 16:17:30 »
Yeah, bug of sorts...

Changed so if there is no sub-header on the command the name of the producible is used.

So, the new preferred way for two click commands is to include a sub-header in the name node,
Code: [Select]
<command>
   <type value="build"/>
   <name value="build_advanced" tip="build_advanced_tip" sub-header="build_subheader"/>
   ...
</command>

This is a lang key, the value in the lang file can include a '%s', which if present will be replaced by the separately translated producible name.

So if build_subheader is something simple like,
Code: [Select]
build_subheader=Build %s

and the building is 'Barracks' you end up with "Build Barracks" as the header.

The build commands on the worker in shibboleth are all hooked up this way now, if you need further reference.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

 

anything