You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was creating a GuiPanel with a default font size of >24, and I noticed that everything scaled nicely except the panel header, where the text is overly crammed. I poked around the implementation and noticed that this is controlled by #define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT, which is only customizable at build time (also used in GuiWindowBox, GuiScrollPanel, etc). I'm currently scaling the default font size based on the window resolution, so it would be nice to modify this status bar height at runtime.
You can see the text Menu appears very crammed here:
Maybe this could be made into a raygui style setting, accessible via GuiGetStyle/GuiSetStyle?
The text was updated successfully, but these errors were encountered:
You can pre-define them in the same file where you put RAYGUI_IMPLEMENTATION.
// modifier for illustrationstaticfloat guiScale = 1;
// as needed by design
#defineRAYGUI_IMPLEMENTATION// make your "overrides"
#defineRAYGUI_WINDOWBOX_STATUSBAR_HEIGHT24 * guiScale
// #define RAYGUI_WINDOWBOX_CLOSEBUTTON_HEIGHT 18 * guiScale // -- does not exist yet (see PR below)
#defineRAYGUI_LINE_MARGIN_TEXT12 * guiScale
#defineRAYGUI_LINE_TEXT_PADDING4 * guiScale
#defineRAYGUI_MESSAGEBOX_BUTTON_HEIGHT24 * guiScale
#defineRAYGUI_MESSAGEBOX_BUTTON_PADDING12 * guiScale
#defineRAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT24 * guiScale
#defineRAYGUI_TEXTINPUTBOX_BUTTON_PADDING12 * guiScale
#defineRAYGUI_TEXTINPUTBOX_HEIGHT26 * guiScale
#defineICON_TEXT_PADDING4 * guiScale
// #define RAYGUI_COLORBARALPHA_CHECKED_SIZE 10 * guiScale // -- not sure if should be scaled
#defineRAYGUI_GROUPBOX_LINE_THICK (int)guiScale
#defineRAYGUI_PANEL_BORDER_WIDTH (int)guiScale
// can do the include now
#include"raygui.h"
You can find a complete version of this code here:
I was creating a
GuiPanel
with a default font size of >24, and I noticed that everything scaled nicely except the panel header, where the text is overly crammed. I poked around the implementation and noticed that this is controlled by#define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT
, which is only customizable at build time (also used inGuiWindowBox
,GuiScrollPanel
, etc). I'm currently scaling the default font size based on the window resolution, so it would be nice to modify this status bar height at runtime.You can see the text
![image](https://private-user-images.githubusercontent.com/11249051/380503243-1e00b1fc-3c38-4280-98f5-5ea110c3ef88.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjE0MTgsIm5iZiI6MTczOTIyMTExOCwicGF0aCI6Ii8xMTI0OTA1MS8zODA1MDMyNDMtMWUwMGIxZmMtM2MzOC00MjgwLTk4ZjUtNWVhMTEwYzNlZjg4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIwNTgzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxNTEzMWMxN2M1NTE1YmU3YzE0YmZhNzdjODg4ZDc1MmVjNzM2OGEwMWFlNmY5ZmJmOGNiMDg5YTJhNTgyZTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QbBvfJZ4ZfH_loaHMm6_T6Z9ZQBaPAbQEWgjbpfqeVw)
Menu
appears very crammed here:Maybe this could be made into a raygui style setting, accessible via
GuiGetStyle
/GuiSetStyle
?The text was updated successfully, but these errors were encountered: