gui/cursor pos, player.opened, pl. zoom , bonus_progress

Things that we aren't going to implement
Post Reply
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

gui/cursor pos, player.opened, pl. zoom , bonus_progress

Post by ownlyme »

1. set gui position:
i want to make a tooltip when you hover entities, but i couldn't find the position parameters in luagui

2. reading player.cursor_position:
i assume there is also no api for cursor coordinates or something like that? well i can still put it at the right border of the screen if #1 works

3. reading player.zoom
an alternative would be to use floating text, but those don't scale with player zoom level so i couldn't just make an entity for the background etc.

4. editing player.opened gui, set bonus_progress on any entity
i want to make an bonus production bar for a nuclear reactor (it outputs additional used fuel cells), but player.opened is only an entity and there seems to be no way to access this gui. (also it doesn't have the bonus_progress property)

i could make an entity for every digit, but that would result in at least 15 entities per tooltip... + 2 progress bars... so... over 30
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Bilka
Factorio Staff
Factorio Staff
Posts: 3130
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: gui/cursor pos, player.opened, pl. zoom , bonus_progress

Post by Bilka »

ownlyme wrote:1. set gui position:
i want to make a tooltip when you hover entities, but i couldn't find the position parameters in luagui
Not even the normal GUI can properly do this, so this cannot be implemented for the mod gui.
ownlyme wrote:2. reading player.cursor_position:
i assume there is also no api for cursor coordinates or something like that? well i can still put it at the right border of the screen if #1 works
The cursor position is currently not synced between players, and will probably never be synced because it would generate a lot of data. So, it is not deterministic, and as such not readable.
ownlyme wrote:3. reading player.zoom
an alternative would be to use floating text, but those don't scale with player zoom level so i couldn't just make an entity for the background etc.
Same as above.
ownlyme wrote:4. editing player.opened gui, set bonus_progress on any entity
i want to make an bonus production bar for a nuclear reactor (it outputs additional used fuel cells), but player.opened is only an entity and there seems to be no way to access this gui. (also it doesn't have the bonus_progress property)
You cannot access the vanilla GUI because it is not deterministic. Reactors don't and won't support bonus_progress because this would have to be saved in the save file, meaning that there would be overhead for a property that would only be used by mods.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Won't implement”