VOGONS

Common searches


Title Bar

Topic actions

First post, by RetroGameLover

User metadata
Rank Newbie
Rank
Newbie

I was wondering if it is possible to configure the title bar to display specific text. Example could be, instead of:

DOSBox 0.74, Cpu speed: 3000 cycles, Frameskip 0, Program: SIERRA

Display:

King's Quest I: Quest for the Crown

Once I get a program setup to run the way I like, their isn't much need to see all of the other information. If this can be set in the config, updated by a patch, or even added to as a feature request, I think it would enhance the overall feel of DOSBox.

Thanks everyone!

Reply 1 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Here's a patch for a user caption. It sort of follows the "Application - Document" approach seen in Windows apps, but easy enough to change; and the pause status is still added to the end. Also made the caption changeable at runtime for extra flexibility; change it to nothing (caption=) to reset to normal status info.

Kinda doubt the devs will incorporate the feature, but enjoy the patch, anyway. 😀

Attachments

  • user_caption.png
    Filename
    user_caption.png
    File size
    5.36 KiB
    Views
    2537 views
    File license
    Fair use/fair dealing exception
  • Filename
    user_caption.diff
    File size
    1.68 KiB
    Downloads
    267 downloads
    File license
    Fair use/fair dealing exception

Reply 2 of 7, by collector

User metadata
Rank l33t
Rank
l33t

How about reversing it to "Document - Application". That way if you have more than one DOSBox instance you can tell which is which on the taskbar at a glance. Firefox and some other applications do this. And the window would still be branded with DOSBox.

Reply 3 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I do think this is a good addition to Dosbox for people who like to bundle software. For example for Collectors SierraHelp installers this would be a nice touch. Definitely NOT essential but nice to have 😉

Maybe a mod can at least move this to the patches forum?

(btw, collector, I haven't given up on the mac installer, just needed a little break 😉)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 5 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
collector wrote:

How about reversing it to "Document - Application". That way if you have more than one DOSBox instance you can tell which is which on the taskbar at a glance. Firefox and some other applications do this. And the window would still be branded with DOSBox.

I kept DOSBox "branded" at the beginning for consistency, and also because (playing devil's advocate) one could use a very long caption to cause the DOSBox name to be clipped off the end of the title bar. However, it is trivial to change the sprintf() to whatever.

An additional benefit to making a runtime init routine for options in the SDL section of the config: adding the fullscreen setting.

 void GUI_Init(Section * sec) {
Section_prop * section=static_cast<Section_prop *>(sec);
sdl.desktop.caption=section->Get_string("caption");
+ bool fullscreen=section->Get_bool("fullscreen");
+ if (fullscreen!=sdl.desktop.fullscreen) GFX_SwitchFullScreen();
}

With this it's possible to switch in and out of fullscreen from the command line, which could be useful in some ways, like in batch files. I think it's possible to do something similar with config -r (restart), but that wouldn't work as well in the context of a batch file.

Reply 6 of 7, by collector

User metadata
Rank l33t
Rank
l33t

If it is really a concern to keep the window branded, could it be done in a way to limit the number of characters that can be used, so that it is the custom title that still gets clipped and the last few would be reserved for DOSBox? In other words,

"Really Long Title Name Here... - DOSBox SVN".

Reply 7 of 7, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well, it's complicated to do calculations on what will "fit" in the title bar, because the font is configurable and usually proportional. However, if you only set a limit on the number of characters allowed in the user caption to a "safe" amount that generally precludes pushing the DOSBox name and version off the title bar, that's easy enough to do.