22 #ifndef BAGEL_HODJNPODJ_LIBS_DIALOG_UNIT_H 23 #define BAGEL_HODJNPODJ_LIBS_DIALOG_UNIT_H 25 #include "common/rect.h" 26 #include "bagel/hodjnpodj/gfx/gfx_surface.h" 31 constexpr
double X_FACTOR = 4.6;
38 this->
x = (xx * s.getStringWidth(
"X")) / X_FACTOR;
39 this->
y = (yy * s.getStringHeight()) / 8;
43 s.setFontSize(fontSize);
44 this->
x = (xx * s.getStringWidth(
"X")) / X_FACTOR;
45 this->
y = (yy * s.getStringHeight()) / 8;
54 left = (x * s.getStringWidth(
"X")) / X_FACTOR;
55 top = (y * s.getStringHeight()) / 8;
56 right = left + (w * s.getStringWidth(
"X")) / X_FACTOR;
57 bottom = top + (h * s.getStringHeight()) / 8;
59 DialogRect(
int fontSize,
int x,
int y,
int w,
int h) {
61 s.setFontSize(fontSize);
62 left = (x * s.getStringWidth(
"X")) / X_FACTOR;
63 top = (y * s.getStringHeight()) / 8;
64 right = left + (w * s.getStringWidth(
"X")) / X_FACTOR;
65 bottom = top + (h * s.getStringHeight()) / 8;
int16 y
Definition: rect.h:49
int16 x
Definition: rect.h:48
Definition: dialog_unit.h:49
Definition: dialog_unit.h:33