Change main window background color

Posted by DeerInHeadlights on Sun 26 May 2019 07:52 AM — 15 posts, 50,097 views.

#0
Is there a way to change the main window's background color? Preferably to a black to not detract from the contrast of the other windows.

I'm talking about the main MUSHclient window with the grey background. Not world or command windows.

Thanks
Australia Forum Administrator #1
I've added a new Lua function:


utils.setbackgroundcolour (ColourNameToRGB ("powderblue"))


You can make the background any colour you want by name or number. To go back to the default set it to 0xFFFFFFFF.

This is available in the 5.07 pre-release version. See here for how to get that:

http://www.gammon.com.au/forum/?id=13903
USA Global Moderator #2
Quote:
To go back to the default set it to 0xFFFFFFFF

That's a lot of Fs. Does that mean it supports an alpha channel?
Australia Forum Administrator #3
No. It means a valid colour won't have that many Fs.
Australia Forum Administrator #4
The latest pre-release version of MUSHclient 5.07 also supports a script function SetFrameBackgroundColour that can be called from any script language (not necessarily Lua):


SetFrameBackgroundColour (ColourNameToRGB ("powderblue"))
#5
Nick Gammon said:

The latest pre-release version of MUSHclient 5.07 also supports a script function SetFrameBackgroundColour


How easy/viable/practical at all is it (is it just an impossibility?) to have a few more core-colour-controls over the actual main-window elements, for example being able to change the command-input-area (background & input text colour), or the core titlebar colours of the main MUSHclient window itself?

Would that all be a real bugger/nightmare code-wise because of them being main window elements getting info from the main Windows colour-theme itself, or is there some hope? I'd love to be able to really customise the whole window a bit more (be it colouring things, or removing elements), ideally with LUA commands to be done via easily user-configurable plugins.

Thanks for the frame colour thing anyway!
USA Global Moderator #6
It's not impossible, but it is usually the sort of thing done using the operating system's theme settings.
Australia Forum Administrator #7
Quow said:

How easy/viable/practical at all is it (is it just an impossibility?) to have a few more core-colour-controls over the actual main-window elements, for example being able to change the command-input-area (background & input text colour), or the core titlebar colours of the main MUSHclient window itself?


You can already change the command-area background and text colour from the configuration dialog.

As for the rest (like menus), I suggest using your operating system to change that.

I don't really want to start fiddling with stuff that the operating system normally does - for one thing there are so many versions of Windows around that it would be a nightmare to test.
#8
Fiendish said:

It's not impossible, but it is usually the sort of thing done using the operating system's theme settings.


No, it makes sense, especially with MUSHclient as it is. I think on more modern OS that philosophy has changed - or, it seems to - I know nothing at all about official standards, but I know on Windows 10 now, if I open Chrome, all the titlebars and frames are black/dark... in Thunderbird, they are a light blue... Sublime text is grey... windows explorer is white... Steam is a very dark grey... Photoshop is a light grey...

It seems that there's been some recent trend for programs to all have their own colour themes rather than JUST use the Windows "system theme" BUT I suspect this might be down to how Windows 10 handles these things backend, and would NOT play nice with all the (I know there are MANY) users that have older Windows - and the quite a lot that use Wine to run MUSHclient on Macs and Linux, so I imagine things might get "messy".

It was more a passing thought, one of those "It'd be nice if..." but only if it were a simple world!
#9
Nick Gammon said:

You can already change the command-area background and text colour from the configuration dialog.


Would it be a pain for you to add LUA commands to change this? I only ask as for the Discworld MUD, my plugin-suite for it has a lot of colour-customisation for users (from miniwindow frames, backgrounds, highlights, fonts, all sorts), and it'd be nice if from plugin-end I could make the command-input colours change "automatically" based on what colour-scheme the user selects from menus all in one. (eg if they pick the dark green theme, the more things in the MUSHclient window I can change to match the theme, the better).

It's not a big issue, so don't put yourself out, only a request if it's a simple job, thank you!
USA Global Moderator #10
Quote:
I only ask as for the Discworld MUD, my plugin-suite for it...

I think your website is down?
Australia Forum Administrator #11
Quow said:

Would it be a pain for you to add LUA commands to change this?


It's Lua not LUA. It is a name, not an acronym. :)

All of the world configuration options can be changed in scripting using SetOption (for numbers) and SetAlphaOption (for strings).

In the case of the command window:


SetOption ("input_background_colour", ColourNameToRGB ("darkgreen"))
SetOption ("input_text_colour",       ColourNameToRGB ("yellow"))
Australia Forum Administrator #12
A possibility for you would be to go into full-screen mode (Ctrl+Alt+F) - see the View menu.

That hides the menus. Then if you hide the status bar, tool bars etc. you are just left with the main window. In full-screen mode the main menus are added to the menu that appears if you RH-click on the output window.

You can do that in code with:


DoCommand ("FullScreenMode")


However that is a toggle and I don't think you can find the current mode. I can add that to GetInfo if you like.

If you did that then with judicious use of miniwindows you can make the look-and-feel more-or-less what you want. You might want to add a little button somewhere to exit full-screen mode in case the user wants to do something else with their PC. :)
Australia Forum Administrator #13
I've added that test to the pre-release version.

This is available in the 5.07 pre-release version. See here for how to get that:

http://www.gammon.com.au/forum/?id=13903


GetInfo (125) returns true if the client is in full-screen mode.
#14
Nick Gammon said:

I've added that test to the pre-release version.
GetInfo (125) returns true if the client is in full-screen mode.


That's great, thanks Nick (for all the above). Any customisation stuff through Lua adds to the possibilities!

Fiendish said:

I think your website is down?


Sadly yes since yesterday, the joys of finding the cheapest host I could, they claimed yesterday it was "standard maintenance", we will see what they say today!