zoom buttons?

This is the place to request new mods or give ideas about what could be done.
sparr
Smart Inserter
Smart Inserter
Posts: 1520
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

zoom buttons?

Post by sparr »

I vaguely recall having a mod, back around 0.9, that gave me UI buttons for zooming to specific zoom levels. I can't find it. Does it exist? Is it updated? Should I write a new one?
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: zoom buttons?

Post by steinio »

You. could use the ui scaling in the graphic options menu.

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts
sparr
Smart Inserter
Smart Inserter
Posts: 1520
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: zoom buttons?

Post by sparr »

UI scaling isn't related to game zoom, afaik. I'm talking about the zooming you normally do with the mouse wheel.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: zoom buttons?

Post by daniel34 »

I don't recall seeing a mod that allows you to zoom using buttons, but then again I wasn't around when 0.9 was released.

It shouldn't be too difficult to write a mod that does this, it's basically a one-liner:

Code: Select all

/c game.local_player.zoom = 0.5
Instead of local_player you should use the player_index you get from the on_gui_click event.
quick links: log file | graphical issues | wiki
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: zoom buttons?

Post by binbinhfr »

The only problem is that zoom variable is Write-Only. So your mod could not know which is the current zoom level you last choose with your mousewheel... I already ask the devs for that, but they don't want to make it readable for obscure desync questions (infact, in case your mod would do something specific with this zoom value, it could cause desync).
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Ideas and Requests For Mods”