Jump to content
The Dark Mod Forums

Objectives Display Gui


Ishtvan

Recommended Posts

Well, there's no reason we can't grey out both of them.

 

But wait a minute. Gil, if the GUI code can detect the size of a text box, can we just make a scribble graphic and have it stretched to the size of the text box? Something like this:

 

cancelledob.jpg

Link to comment
Share on other sites

  • Replies 133
  • Created
  • Last Reply

Top Posters In This Topic

We could do something like that. The main problem is that the text has room for 3 lines of texts. If you do something like that when only 1/2 of a line is used it is going to end up looking silly, not to mention a single "random scratched out" graphic is going to look just as unrealistic as greying out or a strikethrough

Link to comment
Share on other sites

@Springheel: That's sort of what I was thinking... However, it's not possible to figure out how big a textbox you need: You specify the size of a textbox, and the scale of the text, but you don't know how much space the text will require, so it's entirely possible the text will not fit in the textbox you make.

 

Actually, I might have a solution... using the code from the news article Using Fonts in the ID dev site, we could construct a GUI command that calculates the required height for some text, or how long a line is. Then the GUI code could do something like:

 

set "gui::fontmetric_text" "Description of objective.";
set "gui::fontmetric_width" "500"; // width of the objective textbox
set "cmd" "fontmetric_height"; // call the SDK code
set "objectives5::height" "$gui::fontmetric_height";
// height is a float variable which objectives5::rect utilizes

Link to comment
Share on other sites

Yea Right now I just have that the failed objectives will grey out, we can change it later. Isht I'm sorry I'm taking so long, I'm trying to work out some visiblity problems with the second page, I'm working to finish it up right now though, and will get it on FTP ASAP.

Link to comment
Share on other sites

That may be possible, I guess my point is....Why spend extra time coding when we can do something much simpler.

 

Well, it depends how much extra time it takes, compared to how good it looks, I guess. But you're right, we shouldn't let this hold up the progress. We can always spruce up the appearance of things later.

Link to comment
Share on other sites

Oh, for the 'next page' buttons, I think simple arrows at the bottom is the best way to go. The down arrow moves to the next page, the up arrow moves back.

 

arrowsob.jpg

 

Ok, I've added the two images to guis/arrows.rar

Link to comment
Share on other sites

alright, whats the FTP password...I know it's changed but where is the "project info" and where is the thread that gives the new pass?

 

EDIT: Nevermind, im dumb.... Files are being upload under guis/objective.pk4, I'de advise unzipping em once you getem

Link to comment
Share on other sites

I got a bit sidetracked with the attaching models to arrow animation problem, so I haven't done much with this yet. I think I'm going to need Gildoran's help though to figure out how to bind a key to switch to the GUI ingame.

 

@Gildoran: I know you added some code to overlay a GUI, does that also work to switch to a full-screen GUI like the PDA for example, or would that require different code?

Link to comment
Share on other sites

Yes, it works just fine to switch to a full-screen GUI. (and in fact readables use this to dim the whole screen slightly) However I don't think I can recommend using it for objectives: First off, it doesn't pause the game. And secondly it can only handle one GUI at a time: If you're looking at a readable, and then switch the GUI overlay to the objectives screen (erasing the readable GUI) and back, the readable GUI will lose its state. Given that objectives can be viewed at any time, using the GUI overlay for them would make it a pain to use it for anything else.

 

I was thinking of setting up a more general-purpose feature that could allow any number of GUI overlays to be loaded simultaneously, but I had figured it would be unnecessily complicated. If you like, I can start planning out something to do that.

 

Though, to be honest, I think objectives are special-case enough to warrent their own code... unfortunately, I don't know how the code to load the main menu works at all. :( I only know how to draw things on screen.

Link to comment
Share on other sites

Yeah, the "go to main menu" code might not even be in the SDK. I've tried to trace it before and just found links to some console commands that aren't defined within the SDK. As for not pausing the game, someone was saying that's easy to do with a command in the gui?

 

What about the PDA? Does it work the same as your code and overlay the PDA gui on the HUD? I was going to test what happened if I was reading a readable and brought up the PDA, but then I found out we have no PDA in the mod. Is this intentional or a bug?

 

Also, maybe we could force the objectives to close any readables you're looking at before bringing them up? That almost makes sense from a game perspective, as in the character is going "I'm going to stop reading this and look at my TODO list" and then has to re-use the thing to read it once they're done looking at the objectives list.

Link to comment
Share on other sites

Yeah, the PDA and a readable can be up at the same time.

 

The GUI overlay code has an instance of a GUI. When the GUI overlay is changed, it clears its current GUI and loads up a new one into that instance. Since the PDA is using an entirely sepperate GUI instance, it has no effect on the overlay.

Link to comment
Share on other sites

Okay, well in that case, one thing we could do is just overload the PDA gui with the objectives gui, since I think other than the main menu, that's the only GUI people will be bringing up with a key ingame. (They may bring up a map too, but that's either going to be a portable readable or combined into one map/objectives GUI anyway).

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • 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
       
      · 5 replies
    • 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
×
×
  • Create New...