 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
7 #include <Strings/components/utils/saferelease/saferelease.h>
13 #define STACKTYPE_GENERIC StackType::Generic
14 #define STACKTYPE_IMGUI StackType::ImGUI
15 #define STACKTYPE_RECT StackType::ST_Rectangle
16 #define STACKTYPE_ROUNDED_RECT StackType::RoundedRect
17 #define STACKTYPE_DWTEXT StackType::DWText
18 #define STACKTYPE_ELLIPSE StackType::ST_Ellipse
19 #define STACKTYPE_LINE StackType::Line
20 #define STACKTYPE_BITMAP StackType::Bitmap
21 #define STACKTYPE_GEOMETRY StackType::Geometry
22 #define STACKTYPE_GLYPHRUN StackType::GlyphRun
23 #define STACKTYPE_FILLEDMESH StackType::FilledMesh
24 #define STACKTYPE_BITMAP_TEXT StackType::BitmapText
25 #define STACKTYPE_FPS_COUNTER StackType::FPSCounter
26 #define STACKTYPE_CONSOLE StackType::Console
27 #define STACKTYPE_STATS StackType::Stats
28 #define STACKTYPE_DEBUG_MENU StackType::DebugMenu
29 #define STACKTYPE_TEXT StackType::Text
33 #define DRAWMODE_FILL StackItemDrawMode::Fill
34 #define DRAWMODE_OUTLINE StackItemDrawMode::Outline
35 #define DRAWMODE_BOTH StackItemDrawMode::Both
37 #define DEFAULT_DRAWMODE DRAWMODE_OUTLINE
49 #define AREA_DEBUG_THICKNESS 2
100 namespace RenderStack
102 class StackObjectBase;
218 unique_id =
"item_" + std::to_string(rand());
252 void SetArea(
float new_area[4]);
262 void SetArea(
float top,
float bottom,
float left,
float right);
269 void SetArea(D2D1_RECT_F new_area);
286 void SetColor(
float r,
float g,
float b);
296 void SetColor(
float r,
float g,
float b,
float a);
336 void SetSize(
float new_width,
float new_height);
686 void SetText(std::string new_text);
693 void SetFont(std::string new_font_name);
751 std::wstring
text = L
"generic text";
788 void ShowImPropertyEditor();
905 bool font_exists =
false;
936 void SetFont(std::string new_font_id);
956 std::string
text =
"the quick brown fox jumped over the lazy dog";
StackItemDrawMode draw_mode
The drawing mode of the object.
Definition: render_stack.h:373
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:963
void Draw()
Draws the stack object.
Definition: Text.cpp:163
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:851
Class containing data for a text object using DirectWrite.
Definition: render_stack.h:656
int resource_id
The resource ID of the bitmap.
Definition: render_stack.h:592
bool visible
Whether or not the object is visible.
Definition: render_stack.h:375
float x
Definition: imgui.h:194
bool crash_report_started
Whether or not the process to submit data to Sentry has been started.
Definition: render_manage.cpp:61
BLAM std::vector< StackType > GetStackTypesList()
Retrieves a list of all available stack types.
Definition: render_stack.cpp:191
void SetText(std::string text)
Sets the text to display.
Definition: Text.cpp:39
UI_API ImVec4 crash_col()
Definition: debug_ui_colors.cpp:21
BLAM ImVec4 * GetClearColor()
Retrieves the current color used to clear the render target.
Definition: render_manage.cpp:613
Line()
Sets the stack type, default starting/ending points, and default zone color.
Definition: render_stack.h:605
@ Both
The item will have both a fill and outline drawn.
Definition: render_stack.h:89
float font_size
The size of the text.
Definition: render_stack.h:753
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:855
void ImGui_ImplDX11_InvalidateDeviceObjects()
Definition: imgui_impl_dx11.cpp:483
float c_scale_factor
Cachced copy of the ui_scale_factor global.
Definition: render_stack.h:889
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: ImGUIObject.cpp:11
void Draw()
Draws the stack object.
Definition: DWText.cpp:12
BLAM std::vector< StackObjectBase * > * GetStack()
Retrieves the render stack contents.
Definition: render_stack.cpp:65
@ ST_Rectangle
Direct2D Rectangle.
Definition: render_stack.h:61
D2D1_RECT_F text_area
The area to use for the text bitmap.
Definition: render_stack.h:859
@ Stats
Stats widget.
Definition: render_stack.h:78
bool show_zone
Whether or not to show the line area.
Definition: render_stack.h:648
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: RoundedRectangle.cpp:33
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:765
float thickness
The current border thickness.
Definition: render_stack.h:511
bool c_show_zone
Cached copy of show_zone
Definition: render_stack.h:884
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:764
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
BLAM void ShutdownRenderThread()
Instructs the rendering thread to stop running.
Definition: render_manage.cpp:331
BLAM HRESULT GetLastFrameTextureAlt(ID3D11Texture2D *texture)
Retrieves the last frame that was rendered.
Definition: render_manage.cpp:647
DWText()
Sets the stack type and default zone color.
Definition: render_stack.h:662
std::string font_id
The ID of the font.
Definition: render_stack.h:844
int width
Definition: bgfx.cpp:19
D2D1_COLOR_F c_shadow_color
Cached copy of shadow_color
Definition: render_stack.h:883
float c_zone_thickness
Cached copy of zone_thickness
Definition: render_stack.h:886
int bitmap_height
The height of the bitmap.
Definition: render_stack.h:862
std::string GetDrawModeLabel()
Retrieves the current drawing mode of the object.
Definition: StackObjectBase.cpp:130
float c_y
Cached copy of y
Definition: render_stack.h:878
Specialized class for rendering ImGUI using the render stack.
Definition: render_stack.h:388
void SetArea(float new_area[4])
Sets the area of the object.
Definition: StackObjectBase.cpp:6
bool auto_calculate_area
Whether or not to automatically calculate the area for the text.
Definition: render_stack.h:767
ID2D1Bitmap * text_bitmap
The bitmap containing the fully rendered representation of the object.
Definition: render_stack.h:858
HRESULT Initialize(UINT const *collectionKey, UINT32 keySize)
Initializes a the enumerator.
Definition: MFFontFileEnumerator.cpp:16
void UpdateAllProperties()
Applies any modified parent properties to the appropriate child object.
Definition: Text.cpp:74
float z
Definition: imgui.h:194
#define STACKTYPE_ROUNDED_RECT
Definition: render_stack.h:16
D2D1_POINT_2F start_point
The starting point of the line.
Definition: render_stack.h:643
void SetZOrder(int z)
Sets the Z-Order of the object.
Definition: StackObjectBase.cpp:50
~ImGUIObject()
Empty destructor.
Definition: render_stack.h:402
std::string GetFont()
Retrieves the ID of the active font.
Definition: Text.cpp:151
@ Geometry
Direct2D Geometry (NYI)
Definition: render_stack.h:67
void Draw()
Draws the stack object.
Definition: ellipse.cpp:10
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:756
#define STACKTYPE_DWTEXT
Definition: render_stack.h:17
@ GlyphRun
Direct2D Glyph Run (NYI)
Definition: render_stack.h:68
virtual HRESULT __stdcall GetCurrentFontFile(IDWriteFontFile **fontFile)
Retrieves the current font file.
Definition: MFFontFileEnumerator.cpp:91
D2D1_ROUNDED_RECT rounded_rect
The data for the rounded rectangle.
Definition: render_stack.h:513
BLAM IDWriteFactory * GetDWriteFactory()
Retrieves the DirectWrite factory.
Definition: render_manage.cpp:573
Namespace containing things relating to the MF font loader.
Definition: FontLoader.h:44
std::string GetType()
Retrieves the type of item that this stack object is.
Definition: StackObjectBase.cpp:125
std::string crash_message
The message to display on the crash screen.
Definition: render_manage.cpp:62
@ BitmapText
Bitmap-based text, uses Blamite font system.
Definition: render_stack.h:72
void Draw()
Draws ImGUI to the screen.
Definition: ImGUIObject.cpp:6
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:977
void RefreshTranslation()
Refreshes any translation data and applies them to the child objects.
Definition: Text.cpp:55
BLAM ID2D1DeviceContext * GetD2DRenderTarget()
Retrieves the Direct2D render target.
Definition: render_manage.cpp:598
@ Console
Console widget.
Definition: render_stack.h:77
@ ST_Ellipse
Direct2D Ellipse.
Definition: render_stack.h:64
StackType type_label
The type of the object.
Definition: render_stack.h:372
BLAM void DisplaySignalCrashScreen(int signal)
Displays a signal-based engine crash screen.
Definition: render_manage.cpp:464
BLAM ConfigFile * GetConfig()
Retrieves the engine configuration file.
Definition: compat.cpp:5
~StackObjectBase()
Empty destructor.
Definition: render_stack.h:224
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: render_manage.cpp:567
#define STACKTYPE_RECT
Definition: render_stack.h:15
@ Generic
Generic stack type - should probably not be used.
Definition: render_stack.h:57
float zone_thickness
The thickness of the line area border.
Definition: render_stack.h:650
bool shutting_down
Used to indicate whether or not we are preparing to shut down.
Definition: render_stack.cpp:10
BLAM std::vector< StackItemDrawMode > GetDrawModesList()
Retrieves a list of all available drawing modes.
Definition: render_stack.cpp:216
D2D1_POINT_2F end_point
The ending point of the line.
Definition: render_stack.h:644
Namespace containing things relating to the Render Stack.
Definition: drawing.h:14
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:850
BLAM void DisplayDetailedCrashScreen(const char *expression, const char *file, int line, std::string details)
Displays a detailed engine crash screen.
Definition: render_manage.cpp:443
float thickness
The current border thickness.
Definition: render_stack.h:452
std::string c_font
Cached copy of font
Definition: render_stack.h:875
StackObjectBase()
Sets default values and provides a default ID to be used if none is provided.
Definition: render_stack.h:200
void SetFontSize(float new_size)
Sets the size to use for the font.
Definition: DWText.cpp:91
D2D1_COLOR_F c_color
Cached copy of color
Definition: render_stack.h:879
Class containing data for a Rectangle object.
Definition: render_stack.h:418
float thickness
The current border thickness.
Definition: render_stack.h:565
virtual ULONG __stdcall Release()
Releases the object.
Definition: MFFontFileEnumerator.cpp:56
virtual HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject)
Queries the interface.
Definition: MFFontFileEnumerator.cpp:36
BLAM HRESULT GetLastFrameHResult()
Unused.
Definition: render_manage.cpp:642
BLAM HRESULT Initialize(HWND hWnd)
Initializes DirectX 11.
Definition: render_manage.cpp:74
Ellipse()
Sets the stack type, default fill color, ellipse origin point, and ellipse radius.
Definition: render_stack.h:527
std::wstring font_name
The current font name. Defaults to Comic Sans MS. :lmao:
Definition: render_stack.h:752
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:969
bool force_regenerate
If enabled, will force the bitmap to regenerate on the next frame.
Definition: render_stack.h:864
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:961
bool ImGui_ImplDX11_CreateDeviceObjects()
Definition: imgui_impl_dx11.cpp:341
virtual HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject)
Queries the interface.
Definition: MFFontCollectionLoader.cpp:5
D2D1_ELLIPSE ellipse
The data for the ellipse.
Definition: render_stack.h:567
int z_order
The Z-Order of the object.
Definition: render_stack.h:371
Unfinished class.
Definition: render_stack.h:773
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:856
D2D1_COLOR_F zone_color
The color of the line area border.
Definition: render_stack.h:649
BLAM HRESULT Initialize()
Initializes the Windows Imaging Component (WIC).
Definition: wic.cpp:12
D2D1_COLOR_F c_zone_color
Cached copy of zone_color
Definition: render_stack.h:885
void Draw()
Draws the stack object.
Definition: Rectangle.cpp:10
BLAM BlamColor * GetGlobalAsColor(std::string name)
Retrieves a global's value as a BlamColor.
Definition: globals.cpp:419
BLAM ID3D11Texture2D ** GetLastFrameTexture()
Retrieves the last frame that was rendered.
Definition: render_manage.cpp:626
virtual HRESULT __stdcall CreateEnumeratorFromKey(IDWriteFactory *factory, void const *collectionKey, UINT32 collectionKeySize, IDWriteFontFileEnumerator **fontFileEnumerator)
Creates a new Font File Enumerator.
Definition: MFFontCollectionLoader.cpp:37
bool use_background
Whether or not to draw a background behind the text.
Definition: render_stack.h:972
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:53
void SetFont(std::string new_font_name)
Sets the font to use for the text.
Definition: DWText.cpp:51
bool c_replace_color_codes
Cached copy of c_replace_color_codes.
Definition: render_stack.h:890
void ReleaseRenderTarget()
Release the DirectX render target.
Definition: render_manage.cpp:228
IDWriteFontCollection * font_collection
The thickness of the zone border.
Definition: render_stack.h:761
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Rectangle.cpp:28
std::string text
The text to display.
Definition: render_stack.h:846
BLAM HRESULT LoadFontFromFile(std::string id, std::string file_path)
Loads a TrueType font from the specified file into the list of loaded font collections.
Definition: render_manage.cpp:555
BLAM DXGI_SWAP_CHAIN_DESC GetSwapChainDesc()
Retrieves the current Direct3D Swap Chain description.
Definition: render_manage.cpp:618
MFFontFileEnumerator(IDWriteFactory *factory)
Sets reference counts and indexes to 0.
Definition: MFFontFileEnumerator.cpp:9
@ ImGUI
Specialized stack type to wrap ImGUI.
Definition: render_stack.h:58
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
HRESULT screenshot_hr
The result of the screenshot capture attempt. Should be removed.
Definition: render_manage.cpp:47
int c_bitmap_height
Cached copy of bitmap_height
Definition: render_stack.h:888
Class containing data for a Rounded Rectangle object.
Definition: render_stack.h:463
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:968
BLAM std::pair< float, float > GetEngineDpi()
Retrieve the game engine's DPI.
Definition: utilities.cpp:17
void SetText(std::string new_text)
Sets the text to display.
Definition: DWText.cpp:46
BLAM HRESULT HandleWindowResize(LPARAM lParam)
Handles a window resize event.
Definition: render_manage.cpp:306
float y
The Y coordinate of the object.
Definition: render_stack.h:378
Class containing data for a Bitmap object.
Definition: render_stack.h:573
Text()
Sets the stack type, creates the needed resources, and sets some default colors.
Definition: Text.cpp:12
void SetZoneColor(float new_color[3])
Sets the color to use for the zone edge.
Definition: DWText.cpp:63
@ FilledMesh
Direct2D Filled Mesh (NYI)
Definition: render_stack.h:69
void SetFont(std::string new_font_id)
Sets the font to use for the text.
Definition: Text.cpp:134
Class containing data for an Ellipse object.
Definition: render_stack.h:521
#define BLAM
Definition: render_stack.h:46
virtual HRESULT __stdcall MoveNext(BOOL *hasCurrentFile)
Moves to the next item in the enumerator.
Definition: MFFontFileEnumerator.cpp:68
BLAM void TakeScreenshot()
Captures the current frame and saves it to a file.
Definition: screenshot.cpp:101
~Rectangle()
Empty destructor.
Definition: render_stack.h:440
float c_x
Cached copy of x
Definition: render_stack.h:877
int c_bitmap_width
Cached copy of bitmap_width
Definition: render_stack.h:887
void Draw()
Draws the stack object.
Definition: BitmapText.cpp:13
@ Line
Direct2D Line.
Definition: render_stack.h:65
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1249
BLAM ID2D1Factory * GetD2DFactory()
Retrieves the Direct2D factory.
Definition: render_manage.cpp:603
bool ready_to_submit_report
Whether or not the crash screen has been displayed.
Definition: render_manage.cpp:60
@ FPSCounter
FPS Counter widget.
Definition: render_stack.h:76
#define DEFAULT_DRAWMODE
Definition: render_stack.h:37
virtual ULONG __stdcall AddRef()
Acquires a new reference to the object.
Definition: MFFontFileEnumerator.cpp:51
void PokeSize()
Updates the area of the object to account for any width/height changes.
Definition: StackObjectBase.cpp:119
~Bitmap()
Empty destructor.
Definition: render_stack.h:587
virtual void HandleResize()
Called upon window resize events.
Definition: render_stack.h:244
BLAM std::vector< MFFontList > & getFontFileLists()
Retrieves the list of font lists.
Definition: FontLoader.cpp:95
@ CrashScreen
Indicates the build string should be formatted for the crash screen.
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:872
BLAM void ScreenshotDone()
Informs DirectX that the screenshot has finished being captured.
Definition: render_manage.cpp:664
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Bitmap.cpp:28
#define STACKTYPE_ELLIPSE
Definition: render_stack.h:18
BitmapText()
Sets the stack type, default shadow color, and default zone color.
Definition: render_stack.h:800
~Ellipse()
Empty destructor.
Definition: render_stack.h:548
int bitmap_width
The width of the bitmap.
Definition: render_stack.h:861
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:566
HRESULT CreateD2DTarget()
Creates the Direct2D render target. Should only ever be called in CreateRenderTarget()
Definition: render_manage.cpp:507
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:757
#define STACKTYPE_LINE
Definition: render_stack.h:19
void SetThickness(float new_thickness)
Sets the thickness of the ellipse's border.
Definition: ellipse.cpp:29
#define STACKTYPE_BITMAP
Definition: render_stack.h:20
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:852
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:755
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:962
HRESULT SetupDXGI(HWND hWnd)
Initialize DXGI.
Definition: render_manage.cpp:188
void ShowZoneEdge(bool show)
Enables or disables the display of the text area bounds.
Definition: DWText.cpp:56
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
Structure to contain data for a Font.
Definition: fonts.h:134
std::string unique_id
The unique ID of this object.
Definition: render_stack.h:382
void Draw()
Draws the stack object.
Definition: Bitmap.cpp:13
~Line()
Empty destructor.
Definition: render_stack.h:626
BLAM ID3D11RenderTargetView * GetD3DRenderTargetView()
Retrieves the current Direct3D Render Target.
Definition: render_manage.cpp:593
BLAM IDXGISwapChain * GetDXGISwapChain()
Retrieves the current DXGI Swap Chain.
Definition: render_manage.cpp:588
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: DWText.cpp:96
BLAM int ShowErrorDialog(std::string message, HRESULT hr, bool allow_continue, bool allow_safemode)
Shows an Error dialog with the specified error details and result handle.
Definition: errors.cpp:150
void ValidateSizeAndTranslation()
Validates X/Y coordinates and Width/Height sizes after the area has been modified.
Definition: StackObjectBase.cpp:135
BLAM void DisplayBasicCrashScreen()
Displays a basic engine crash screen.
Definition: render_manage.cpp:456
void SetThickness(float new_thickness)
Sets the thickness of the rectangle's border.
Definition: Rectangle.cpp:23
BLAM ID3D11Device * GetD3DDevice()
Retrieves the current Direct3D device.
Definition: render_manage.cpp:578
@ RoundedRect
Direct2D Rounded Rectangle.
Definition: render_stack.h:62
UI_API ImVec4 crash_text_shadow_col()
Definition: debug_ui_colors.cpp:23
sock planetquake com All rights reserved Quake III Arena is a registered trademark of id Inc This level may be electronically distributed only at NO CHARGE to the recipient in its current MUST include this txt file
Definition: chiropteraDM.txt:95
void PokeTranslation()
Updates the area of the object to account for any x/y coordinate changes.
Definition: StackObjectBase.cpp:97
void SetTranslation(float new_x, float new_y)
Sets the translation of the object.
Definition: StackObjectBase.cpp:55
#define STACKTYPE_BITMAP_TEXT
Definition: render_stack.h:24
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
bool replace_color_codes
Whether or not to replace any instances of %& with 0xB00B for color codes.
Definition: render_stack.h:868
RoundedRectangle()
Sets the stack type and specified default fill color and radius values.
Definition: render_stack.h:469
bool use_engine_font
Whether to use a font within the engine or a system font.
Definition: render_stack.h:759
BLAM int AddToStack(std::string id, StackObjectBase *object)
Adds an item to the render stack.
Definition: render_stack.cpp:12
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: BitmapText.cpp:120
int c_shadow_x
Cached copy of shadow_x
Definition: render_stack.h:881
float width
The width of the object.
Definition: render_stack.h:379
int height
Definition: bgfx.cpp:20
Namespace for things relating to rendering.
Definition: primitives.h:24
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:854
void Draw()
Draws the stack object.
Definition: RoundedRectangle.cpp:10
virtual ULONG __stdcall AddRef()
Acquires a new reference to the object.
Definition: MFFontCollectionLoader.cpp:20
float w
Definition: imgui.h:194
virtual void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: render_stack.h:239
bool currently_locked
While drawing, this is used to prevent deletion.
Definition: render_stack.h:866
BLAM std::string GetCrashUploadStateMessage()
Retrieves the state of the Sentry data upload.
Definition: sentry.cpp:21
bool crash_screen
Whether or not to show the crash screen.
Definition: render_manage.cpp:59
ImGUIObject()
Sets the stack type.
Definition: render_stack.h:394
Rectangle()
Sets the stack type and specifies default fill color values.
Definition: render_stack.h:424
virtual ULONG __stdcall Release()
Releases the object.
Definition: MFFontCollectionLoader.cpp:25
BLAM void RenderLoop(bool debug)
Renders everything to the screen.
Definition: render_manage.cpp:370
@ Outline
The item will be drawn as an outline, with no fill color.
Definition: render_stack.h:88
BLAM std::string GetDrawModeLabel(StackItemDrawMode type)
Retrieves a string representation of the specified drawing mode.
Definition: render_stack.cpp:176
BLAM ID3D11DeviceContext * GetD3DContext()
Retrieves the current Direct3D context.
Definition: render_manage.cpp:583
HRESULT HandleWindowResizeMain()
Main function to handle window resize events. Should only be called by BlamRendering::DirectX::Handle...
Definition: render_manage.cpp:267
bool auto_calculate_area
Whether or not to automatically calculate the text area.
Definition: render_stack.h:979
void SetZoneThickness(float new_thickness)
Sets the thickness of the zone edge.
Definition: DWText.cpp:86
ImVec4 clear_col
The color to use for render target clearing.
Definition: render_manage.cpp:65
Class used to wrap around BitmapText and DWText, making the usage of both of them directly unnecessar...
Definition: render_stack.h:896
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:849
const char * resource_type
The resource type of the bitmap.
Definition: render_stack.h:593
BLAM void RemoveFromStack(std::string id)
Removes an item from the render stack.
Definition: render_stack.cpp:26
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:512
@ Fill
The item will be drawn as a fill with no outline.
Definition: render_stack.h:87
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:871
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:964
BLAM D2D1_COLOR_F D2DColorFromBlamColor(BlamColor color)
Converts a BlamColor object into its equivalent D2D1_COLOR_F object.
Definition: color.cpp:46
D2D1_COLOR_F bg_color
The color to use for the text background.
Definition: render_stack.h:973
bool c_use_shadow
Cached copy of use_shadow
Definition: render_stack.h:880
std::vector< BlamRendering::RenderStack::StackObjectBase * > stack
The render stack contents.
Definition: render_stack.cpp:8
std::string c_text
Cached copy of text
Definition: render_stack.h:876
BLAM void UploadCrashData()
Definition: sentry.cpp:144
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Text.cpp:188
BLAM std::string GetStackTypeLabel(StackType type)
Retrieves a string representation of the specified stack type.
Definition: render_stack.cpp:133
#define IDB_THEME_DEFAULT_ICON
Definition: resource.h:32
@ Bitmap
Direct2D Bitmap.
Definition: render_stack.h:66
HRESULT SetupDirect2D(HWND hwnd)
Definition: render_manage.cpp:473
std::string GetString(std::string option)
Retrieves a string option from a configuration file.
Definition: compat.cpp:58
BLAM HRESULT CreateFontCollection(MFFontList &newCollection, std::string font_id)
Creates a new font collection.
Definition: FontLoader.cpp:26
float height
The height of the object.
Definition: render_stack.h:380
#define STACKTYPE_GENERIC
Definition: render_stack.h:13
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: errors.cpp:120
std::wstring text
The current text to display.
Definition: render_stack.h:751
void PokeEllipseTranslation()
Updates the ellipse origin point based on the x/y coordinates.
Definition: ellipse.cpp:23
Class representing text drawn using a Bitmap-based engine font.
Definition: render_stack.h:794
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Line.cpp:53
Base class for all render stack objects.
Definition: render_stack.h:194
Class to implement the DirectWrite Font File Enumerator interface.
Definition: FontLoader.h:163
BLAM void Shutdown()
Shuts down the Windows Imaging Component (WIC).
Definition: wic.cpp:47
HRESULT CreateRenderTarget()
Creates the render targets for Direct2D and Direct3D.
Definition: render_manage.cpp:133
~Text()
Deletes any used resources.
Definition: Text.cpp:32
float y
Definition: imgui.h:194
BLAM void Cleanup()
Cleans up all DirectX data.
Definition: render_manage.cpp:237
void PokeRoundedRectArea()
Updates the area of the rounded rectangle after area modification.
Definition: RoundedRectangle.cpp:23
BLAM bool ContainsImGUIObject()
Determines whether or not an ImGUI stack object has been added.
Definition: render_stack.cpp:102
BLAM void ShowBasicCrashScreen()
Shows a basic crash screen to the user.
Definition: crash.cpp:64
void updateCachedProperties()
Updates the currently cached properties.
Definition: BitmapText.cpp:50
BLAM bool HasRenderThreadStopped()
Determines whether or not the render thread has finished stopping.
Definition: render_manage.cpp:326
BLAM void Cleanup()
Cleans up any render stack data.
Definition: render_stack.cpp:123
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: ellipse.cpp:34
StackItemDrawMode
Enumerator to specify the stack item draw mode.
Definition: render_stack.h:85
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
void SetSize(float new_width, float new_height)
Sets the size of the object.
Definition: StackObjectBase.cpp:110
@ DebugMenu
Debug menu.
Definition: render_stack.h:79
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:976
void SetThickness(float new_thickness)
Sets the thickness of the line.
Definition: Line.cpp:48
BLAM bool * RenderTargetClearing()
Retrieves whether or not to enable render target clearing.
Definition: render_manage.cpp:608
StackType
Enumerator to determine the type of render stack item.
Definition: render_stack.h:54
@ DWText
DirectWrite Text, does not utilize our font system - probably dont use this.
Definition: render_stack.h:63
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:453
~BitmapText()
Releases the rendered bitmap containing the text.
Definition: render_stack.h:821
Bitmap()
Sets the stack type.
Definition: render_stack.h:579
UI_API ImVec4 crash_text_col()
Definition: debug_ui_colors.cpp:22
std::string engine_font_id
The ID of the font collection to use.
Definition: render_stack.h:760
#define STACKTYPE_IMGUI
Definition: render_stack.h:14
bool hasAnyPropertyChanged()
Determines if any current properties differ from their cached copies.
Definition: BitmapText.cpp:71
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:347
BLAM StackObjectBase * GetStackItem(std::string id)
Retrieves an item from the render stack.
Definition: render_stack.cpp:75
void SetThickness(float new_thickness)
Sets the thickness of the rectangle's border.
Definition: RoundedRectangle.cpp:28
int c_shadow_y
Cached copy of shadow_y
Definition: render_stack.h:882
float thickness
The line thickness.
Definition: render_stack.h:646
BLAM void RenderThread(bool debug)
Instructs the engine to start rendering on a separate thread.
Definition: render_manage.cpp:337
~RoundedRectangle()
Empty destructor.
Definition: render_stack.h:488
void Draw()
Draws the stack object.
Definition: Line.cpp:14
~DWText()
Empty destructor.
Definition: render_stack.h:677
float x
The X coordinate of the object.
Definition: render_stack.h:377
void PokeLineTranslation()
Pokes the line start/end points to match the coordinates/area.
Definition: Line.cpp:37
const char * details
Definition: error_notice.cpp:17
float font_size
The size of the font. Only used with TrueType fonts.
Definition: render_stack.h:957
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:967
std::string text
The text to display.
Definition: render_stack.h:956
BLAM std::string GetEventID()
Retrieves the Event ID generated by Sentry, used to cross-reference bug reports and Sentry data.
Definition: sentry.cpp:37
Class containing data for a Line object.
Definition: render_stack.h:599
virtual void Draw()
Draws the stack object.
Definition: render_stack.h:231
void SetColor(float new_color[3])
Sets the color of the object.
Definition: StackObjectBase.cpp:25