Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Apr 18, 2024
1 parent 83f3ae8 commit f3c8771
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
24 changes: 15 additions & 9 deletions src/hello_imgui/doc_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ See [hello_imgui_font.h](https://github.com/pthom/hello_imgui/blob/master/src/he
ImFontConfig fontConfigFontAwesome = ImFontConfig();
};
// A font that will be automatically resized to account for changes in DPI
// (use LoadAdaptiveFont instead of LoadFont to get this behavior)
struct FontDpiResponsive
{
ImFont* font = nullptr;
std::string fontFilename;
float fontSize = 0.f;
FontLoadingParams fontLoadingParams;
};
// A font that will be automatically resized to account for changes in DPI
// Use LoadAdaptiveFont instead of LoadFont to get this behavior.
// Fonts loaded with LoadAdaptiveFont will be reloaded during execution
// if ImGui::GetIO().FontGlobalScale is changed.
struct FontDpiResponsive
{
ImFont* font = nullptr;
std::string fontFilename;
float fontSize = 0.f;
FontLoadingParams fontLoadingParams;
};
// Loads a font with the specified parameters
Expand Down Expand Up @@ -290,6 +292,10 @@ ImGuiTestEngine* GetImGuiTestEngine();
// "Sdl - Vulkan"
std::string GetBackendDescription();
// `ChangeWindowSize(const ScreenSize &windowSize)`: sets the window size
// (useful if you want to change the window size during execution)
void ChangeWindowSize(const ScreenSize &windowSize);
```

----
Expand Down
10 changes: 7 additions & 3 deletions src/hello_imgui/doc_params.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ struct SimpleRunnerParams

// `windowSize`: _ScreenSize, default={800, 600}_.
// Size of the window
// The size will be handled as if it was specified for a 96PPI screen
// (i.e. a given size will correspond to the same physical size on different screens, whatever their DPI)
ScreenSize windowSize = DefaultWindowSize;

// `fpsIdle`: _float, default=9_.
Expand Down Expand Up @@ -151,9 +153,6 @@ struct RunnerParams
// Only useful when multiple rendering backend are compiled and available.
RendererBackendType rendererBackendType = RendererBackendType::FirstAvailable;

// --------------- RemoteParams -------------------
RemoteParams remoteParams;


// --------------- Settings -------------------

Expand Down Expand Up @@ -217,6 +216,9 @@ struct RunnerParams
// Set the application refresh rate
// (only used on emscripten: 0 stands for "let the app or the browser decide")
int emscripten_fps = 0;

// Parameters for Remote display (experimental, unsupported)
RemoteParams remoteParams;
};
```

Expand Down Expand Up @@ -605,6 +607,8 @@ struct WindowGeometry

// Size of the application window
// used if fullScreenMode==NoFullScreen and sizeAuto==false. Default=(800, 600)
// The size will be handled as if it was specified for a 96PPI screen
// (i.e. a given size will correspond to the same physical size on different screens, whatever their DPI)
ScreenSize size = DefaultWindowSize;

// If sizeAuto=true, adapt the app window size to the presented widgets.
Expand Down
18 changes: 9 additions & 9 deletions src/hello_imgui/hello_imgui_font.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ namespace HelloImGui
ImFontConfig fontConfigFontAwesome = ImFontConfig();
};

// A font that will be automatically resized to account for changes in DPI
// Use LoadAdaptiveFont instead of LoadFont to get this behavior.
// A font that will be automatically resized to account for changes in DPI
// Use LoadAdaptiveFont instead of LoadFont to get this behavior.
// Fonts loaded with LoadAdaptiveFont will be reloaded during execution
// if ImGui::GetIO().FontGlobalScale is changed.
struct FontDpiResponsive
{
ImFont* font = nullptr;
std::string fontFilename;
float fontSize = 0.f;
FontLoadingParams fontLoadingParams;
};
struct FontDpiResponsive
{
ImFont* font = nullptr;
std::string fontFilename;
float fontSize = 0.f;
FontLoadingParams fontLoadingParams;
};


// Loads a font with the specified parameters
Expand Down

0 comments on commit f3c8771

Please sign in to comment.