Quick Calculator

by imoth_f

A handy in-game pop-up calculator for quick math without leaving the game. Default hotkey Ctrl+Alt+C.

Utilities
11 days ago
2.0 - 2.1
532

i Consider adding history

a month ago

The best Factorio calculator mod, thanks!

One feature I am missing is calculation history: pressing up arrow to see the previous expression, would be great to have that. That is available in console via /qcalc, but would be nice to have in GUI as well!

a month ago

Thanks, I am glad you like it!

I actually thought about adding this. But I wasn't sure what to consider an entry as the expression is evaluated every keystroke. With the command it is when you press enter. But in GUI when you type an expression you can have many valid entries which can clutter the history.

For example, while typing 35 - 24 * 22 6 entries will be valid: 3, 35, 35 - 2, 35 -24, 35 - 24 * 2 and 35 - 24 * 22. I guess we can drop the first two as it is only a single number.

I guess it could be a valid expression when the window is closed.

a month ago

I have added history in 2.0.10/2.1.10. An entry is committed to history every time enter is pressed and there is a valid expression in the box.

a month ago

This is great! Love visual display of the history as well, thanks!

Consider also supporting up/down arrow to navigate the history, like in the console. That'll give a nice way to edit last expression: press the calc shortcut, then up arrow!

a month ago

Unfortunately, this isn't currently possible. While the textfield is in focus it consumes all keystrokes and the game does not expose them to the mod.

I also added an option to Mod settings to keep the last expression to persist when calculator re-opens.

New response