mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -169,6 +169,14 @@ void gui::DestroyContext() {
|
||||
gContext = nullptr;
|
||||
}
|
||||
|
||||
Context* gui::GetCurrentContext() {
|
||||
return gContext;
|
||||
}
|
||||
|
||||
void gui::SetCurrentContext(Context* context) {
|
||||
gContext = context;
|
||||
}
|
||||
|
||||
static void UpdateFontScale() {
|
||||
// Scale based on OS window content scaling
|
||||
float windowScale = 1.0;
|
||||
|
||||
@@ -14,6 +14,8 @@ extern "C" struct GLFWwindow;
|
||||
|
||||
namespace wpi::gui {
|
||||
|
||||
struct Context;
|
||||
|
||||
/**
|
||||
* Creates GUI context. Must be called prior to calling any other functions.
|
||||
*/
|
||||
@@ -24,6 +26,20 @@ void CreateContext();
|
||||
*/
|
||||
void DestroyContext();
|
||||
|
||||
/**
|
||||
* Gets GUI context.
|
||||
*
|
||||
* @return context
|
||||
*/
|
||||
Context* GetCurrentContext();
|
||||
|
||||
/**
|
||||
* Sets GUI context.
|
||||
*
|
||||
* @param context context
|
||||
*/
|
||||
void SetCurrentContext(Context* context);
|
||||
|
||||
/**
|
||||
* Initializes the GUI.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user