-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feedback welcome] fit chat_big/info/etc. in window #193
base: standalone
Are you sure you want to change the base?
Conversation
// newlines | ||
|
||
float font_fit_height(int max_width, float starting_height, char* text) { | ||
float scalex = max_width / 800.0F; // not sure if I should consider this a hacky solution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scalex feels hacky... dunno
int i = 0; | ||
while(chat_popup_line != NULL) { | ||
char* next_line = strchr(chat_popup_line, '\n'); | ||
char chat_popup_temp[256]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a better way?
strcpy(chat_popup_temp, chat_popup_line); | ||
chat_popup_line = NULL; | ||
} | ||
float text_pixel_width = font_length(chat_popup_height, chat_popup_temp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this value could be 'cached' too
aa1643e
to
1189a43
Compare
scalex situation in font_fit_height works but feels hacky