mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
50 lines
3.2 KiB
C#
50 lines
3.2 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.ImGui.Generator; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.ImGuiApi
|
|
{
|
|
public partial class ImGui
|
|
{
|
|
public unsafe partial class PInvoke
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Use NULL as a shortcut to keep current font. Use 0.0f to keep current size.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L528">imgui.h:528</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9508">imgui.cpp:9508</see>
|
|
/// <br/><c>void PushFont(ImFont* font, float font_size_base_unscaled)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Parameters stacks (font)
|
|
/// - PushFont(font, 0.0f) // Change font and keep current size
|
|
/// - PushFont(NULL, 20.0f) // Keep font and change current size
|
|
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
|
|
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
|
|
/// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
|
|
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
|
|
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
|
|
/// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
|
|
/// *IMPORTANT* global scale factors are applied over the provided size.
|
|
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
|
|
/// - If you want to apply a factor to the _current_ font size:
|
|
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
|
|
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
|
|
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
|
|
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
|
|
/// </code>
|
|
/// <para>
|
|
/// If you want to scale an existing font size! Read comments in imgui.h!
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial void PushFont(ImFont* font, float font_size_base_unscaled);
|
|
}
|
|
}
|
|
}
|