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

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 1 reply
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...