Jump to content
The Dark Mod Forums

Need transparent gui


Fidcal

Recommended Posts

I'm trying to develop a general-purpose transparent gui for signs but immediately see the old problem of it not being lit by local light but is self-lit. Is this even solvable?

 

How do gui surfaces on readables do it?

 

post-400-1245221695_thumb.jpg

Link to comment
Share on other sites

Seems we can't have colour. Black works OK. Looking closely at the world readables we have, the only coloured readable gui is the ornate book one and that shows black actually on the model - barely noticeable - but coloured if you read it.

 

So, this simple gui provides at least black lettering of any transparency. Here I'm passing one line only from the map entity in entity inspector using text "gui::gui_parm1". Including \n or \\n for multi lines doesn't work here. The lines I've commented out are text directly in the gui (where you can use \n for multi lines) and also browsing through doom guis I found text "#str_04052" which displays prepared strings much like our xdata. Didn't search for exactly how and where that is stored. With this tiny gui it is probably easier just to clone this gui and modify it for text, font, font size.

 

post-400-1245251891_thumb.jpg

 

But for serious signs we need either custom materials like I think I did in Thief's Den for the stree sign and/or A-Z decals. I think I'll try to produce one decal because I need gold lettering for my FM. The doom ones are no use for our needs.

Link to comment
Share on other sites

#str_04052 is stored in strings/english.lang

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Thanks. So the format is just:

 

{
"#str_04052"	"The Union Aerospace Corporation is the largest"
}

 

Not sure it is of use since it is set in the gui. Might as well put the text directly in unless that same string is to be used over and over and might get changed later.

 

This is what I've come up with. The standard alphabet decal but if you make the decal patch a func_static you can use _color to set any color text. And of course, no problem with local lighting. I should say 'patches' because it still needs one patch for each letter. Some letters might fall together. Maybe these decal textures should not be in alpha order but in common groupings like EA STH QU. I guess it may be OK if you just want to put EXIT on a door or something.

 

Is this of any use?

 

post-400-1245262948_thumb.jpg

Link to comment
Share on other sites

Got this working pretty good now but I'm going to hold it back for Release 2 I think unless anyone wants this now. I want to do more work and testing on it and develop more fonts. This one is OK but not as the only one available.

 

It works like this.

 

  • You insert a prefab of multiple letter patches and line them up on the surface you want plus 0.125 so you don't get z-fighting. Optionally then while selected put them in a layer group.
  • Then you slide them to one side and select each letter you want.
  • Clone it and drag it into place lining up the base on the grid. I did 'Heart of Lone Salvation' in less than 5 minutes. (the image is not the latest - I had to redo.)
  • When done you delete the original letters and adjust your message.
  • You can resize them and even reshape them, eg, to get tall thin letters but this is a bit fiddly as you have to do each letter patch separately.
  • With all your message letters selected you convert them to a single func_static
  • You then use the color selector (_color) to set the colour you want. They show as white on black in the editor though.
  • If it's a door you just bind it to the door.
  • Obviously you can put a background decal at the back of the letters to make a better sign.

 

post-400-1245405016_thumb.jpg post-400-1245405027_thumb.jpg

Link to comment
Share on other sites

Well if it works pretty well now, then we can include it in the release, but I guess it can be a nice addition to release 2. I'm neutral on this one, I think it could be there but doesn't have to be.

Link to comment
Share on other sites

Clone it and drag it into place lining up the base on the grid. I did 'Heart of Lone Salvation' in less than 5 minutes. (the image is not the latest - I had to redo.)

 

Wouldn't it be a lot easier for a mapper to just make the text in a graphics editor? You wouldn't even need to save it with a transparent background if you just wanted black text. We could provide a material template on the wiki (with a blend filter stage) and mappers could just insert the name of the image file. That would seem to take a lot less than 5 minutes, and is a lot more flexible in terms of fonts.

Link to comment
Share on other sites

For black text they can use the gui (see above but also not yet committed.) All they need do is create a patch, give it a gui surface and the name of the gui then one liners they can type the text in as a spawnarg. Multi lines they can either make two or three patches or clone the gui and put the text in direct.

 

For coloured custom textures yes some can create their own. They need to know about custom textures and have a paint program and be familiar with how to use it then make the material def. Many will not know how nor want to do this so for those, these toy blocks seems an alternate quick and intuitive way to put in a quick message with no prior knowledge.

Link to comment
Share on other sites

Thanks. So the format is just:

 

{
"#str_04052"	"The Union Aerospace Corporation is the largest"
}

 

Not sure it is of use since it is set in the gui. Might as well put the text directly in unless that same string is to be used over and over and might get changed later.

 

The point of the language strings is that you can make a "German.strings" and it automatically translates the strings when it encounters them. Stuffing them into an XD makes translation harder.

 

(But I am pretty sure 99% here are native English speakers and wouldn't give any thought to translation :huh: )

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

@Fidcal: If it's a matter of the method being finished, but not having time to add more options to it, I wouldn't hold it off for release 2. You never know if there might be some obscure bug with the method used that will require re-thinking it and changing how things are input later, so it's better to get it in for the extensive testing period of release 1, IMO.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...