Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine 4.x Scripting with C++ Cookbook

You're reading from   Unreal Engine 4.x Scripting with C++ Cookbook Develop quality game components and solve scripting problems with the power of C++ and UE4

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher
ISBN-13 9781789809503
Length 708 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Stephen Whittle Stephen Whittle
Author Profile Icon Stephen Whittle
Stephen Whittle
William Sherif William Sherif
Author Profile Icon William Sherif
William Sherif
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. UE4 Development Tools FREE CHAPTER 2. Creating Classes 3. Memory Management, Smart Pointers, and Debugging 4. Actors and Components 5. Handling Events and Delegates 6. Input and Collision 7. Communication Between Classes and Interfaces: Part I 8. Communication Between Classes and Interfaces: Part II 9. Integrating C++ and the Unreal Editor: Part I 10. Integrating C++ and the Unreal Editor: Part II 11. Working with UE4 APIs 12. Multiplayer Networking in UE4 13. AI for Controlling NPCs 14. User Interfaces - UI and UMG 15. Other Books You May Enjoy

Changing the code font and color in Visual Studio

Customizing the font and color in Visual Studio is not just about flexibility. Due to monitor resolutions being too high or low, it may become a necessity!

Getting ready

Visual Studio is a highly customizable code editing tool. You might find the default fonts too small for your screen. This is easily adjustable by holding down the Ctrl key and using the mouse wheel to increase or decrease the size, but you may want to change the default value. Or, perhaps you may want to have more control, as you may want to change your code's font size and color. You may also want to completely customize the coloration of keywords and the text background colors. The Fonts and Colors dialog box, which we'll show you how to use in this section, allows you to completely customize every aspect of the code editor's font and color:

How to do it...

  1. From within Visual Studio, go to Tools | Options...:
  1. Select Environment | Fonts and Colors from the dialog that appears. It will look like what's shown in the following screenshot:
  1. Play around with the font and font size of Text Editor/Plain Text. Click OK on the dialog, and see the results in the code-text editor:
Modified font and colors

Text Editor/Plain Text describes the font and size that's used for all code text within the regular code editor. If you change the size of the font, the size changes for any text that's entered into the coding window (for all languages, including C, C++, C#, and others).

To return to what the menu has by default based on your theme, click on the Use Defaults button to the right of the Show Settings for: option.

The color (foreground and background) is completely customizable for each item. Try this for the Text Editor/Keyword setting (affects all languages), or for items specific to C++, such as Text Editor/C++ Functions. Click OK, and you will see the changed color of the item reflected in the code editor.

You may also want to configure the font size of the Output Window, under the Show settings for: option, so click on the drop-down and select Output Window, as shown in the following screenshot:

The Output Window is the little window at the bottom of the editor that displays build results and compiler errors.

You can't save-out (export) or bring in (import) your changes to the Fonts and Colors dialog. But you can use something called the Visual Studio Theme Editor Extension. To learn more, refer to the Extension – changing the color theme in Visual Studio recipe of this chapter, to learn how to export and import customized color themes.

For this reason, you may want to avoid changing font colors from this dialog. You must use this dialog to change the font and font size, however, for any setting (at the time of writing).

How it works...

The Fonts and Colors dialog simply changes the appearance of code in the text editor as well as for other windows, such as the output window. It is very useful for making your coding environment more comfortable.

There's more...

Once you have customized your settings, you'll find that you may want to save your customized Fonts and Colors settings for others to use, or to put into another installation of Visual Studio, which you have on another machine. Unfortunately, by default, you won't be able to save-out your customized Fonts and Colors settings. You will need something called the Visual Studio Theme Editor extension to do so. We will explore this in the next recipe.

See also

  • The Extension – changing the color theme in Visual Studio recipe describes how to import and export color themes
You have been reading a chapter from
Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition
Published in: Mar 2019
Publisher:
ISBN-13: 9781789809503
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image