÷と×ボタンの修正
諏訪子 <suwako@076.moe>、2026-01-17 23:58
コミット 78a1c061a7987b1210ccf177cd3aaa9ddf778a4d
・親 5f5f824
・ファイルを見る
1個のファイル、+4 -1
| @@ -256,7 +256,6 @@ | ||
| 256 | 256 | if (!btn) return; |
| 257 | 257 | |
| 258 | 258 | btn->pressed = 0; |
| 259 | - | |
| 260 | 259 | XftDraw *backdraw = XftDrawCreate(ui->display, ui->backbuf, |
| 261 | 260 | DefaultVisual(ui->display, DefaultScreen(ui->display)), |
| 262 | 261 | DefaultColormap(ui->display, DefaultScreen(ui->display))); |
| @@ -275,6 +274,10 @@ | ||
| 275 | 274 | const char *label = btn->text; |
| 276 | 275 | if (strcmp(label, "C") == 0) { |
| 277 | 276 | clear_calculator(ui); |
| 277 | + } else if (strcmp(label, "×") == 0) { | |
| 278 | + append_to_input(ui, '*'); | |
| 279 | + } else if (strcmp(label, "÷") == 0) { | |
| 280 | + append_to_input(ui, '/'); | |
| 278 | 281 | } else if (strcmp(label, "<") == 0) { |
| 279 | 282 | curinput[--input_pos] = '\0'; |
| 280 | 283 | strcpy(ui->resLabel.text, curinput[0] ? curinput : "0"); |