Differences From Artifact [9e1b20764c]:
- File src/menus.m — part of check-in [b787ad5a04] at 2025-03-22 23:10:13 on branch trunk — Clean up DynamicEntity (user: js, size: 3083) [annotate] [blame] [check-ins using]
To Artifact [9134766c32]:
- File
src/menus.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 3119) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
57 58 59 60 61 62 63 | OFString *title; if (vmenu > 1) title = [OFString stringWithFormat:@"[ %@ menu ]", m.name]; else title = m.name; int mdisp = m.items.count; int w = 0; | | < | < | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | OFString *title; if (vmenu > 1) title = [OFString stringWithFormat:@"[ %@ menu ]", m.name]; else title = m.name; int mdisp = m.items.count; int w = 0; for (int i = 0; i < mdisp; i++) { int x = text_width(m.items[i].text); if (x > w) w = x; } int tw = text_width(title); if (tw > w) w = tw; int step = FONTH / 4 * 5; int h = (mdisp + 2) * step; int y = (VIRTH - h) / 2; int x = (VIRTW - w) / 2; blendbox(x - FONTH / 2 * 3, y - FONTH, x + w + FONTH / 2 * 3, y + h + FONTH, true); draw_text(title, x, y, 2); y += FONTH * 2; if (vmenu) { int bh = y + m.menusel * step; blendbox( x - FONTH, bh - 10, x + w + FONTH, bh + FONTH + 10, false); } for (int j = 0; j < mdisp; j++) { draw_text(m.items[j].text, x, y, 2); y += step; } return true; } void |
︙ | ︙ |