Canvas gui element

Things that we aren't going to implement
Post Reply
adamius
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Mar 19, 2018 9:18 am
Contact:

Canvas gui element

Post by adamius »

I'd like to draw graphs and arbitrary lines in a canvas like gui element.

Use it for utilisation, custom shapes, lines circles etc. Essentially I'd like to have the equivalent of the luarendering API but instead targetting an gui element to draw into.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Canvas gui element

Post by Rseding91 »

I don't see this as ever happening sorry.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Canvas gui element

Post by eradicator »

Use a camera gui element on a black surface. Then use LuaRendering to draw to that surface *cough*. I need to go now.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

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

Re: Canvas gui element

Post by Bilka »

eradicator wrote:
Sat Jun 22, 2019 1:02 pm
Use a camera gui element on a black surface. Then use LuaRendering to draw to that surface *cough*. I need to go now.
That is the use case of the modding interface request that initially led to the addition of LuaRendering so don't think I'm unaware of the hacks that people are doing with it :p
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

adamius
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Mar 19, 2018 9:18 am
Contact:

Re: Canvas gui element

Post by adamius »

eradicator wrote:
Sat Jun 22, 2019 1:02 pm
Use a camera gui element on a black surface. Then use LuaRendering to draw to that surface *cough*. I need to go now.
My plan exactly. I need high contrast text and a way to draw graphs. So Plan B it is.

BlackCap
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Oct 04, 2019 4:52 am
Contact:

Rendering GuiElement

Post by BlackCap »

Add a blank GUI element that can be rendered using the LuaRendering API.

This is already possible using cameras, but cameras require you to create a surface, which feels dirty:

Code: Select all

local surf = game.create_surface(surface_name, game.default_map_gen_settings)
local cam = container.add
  { type = 'camera'
  , surface_index = surf.index
  , position = { x = ix, y = 0 }
  , zoom = scale
  }
Intuitively this has a fair bit of overhead: I am creating a new universe that can have entities and pollution and wind and a day/night cycle and stuff, but all I wanted was to draw a snazzy button. How often is it redrawn? Presumably 60 times a second!

Ideally there would be a RenderingBuffer object that is decoupled from the game world. Something I can render once and display in a gui render element.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Rendering GuiElement

Post by eradicator »

Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

BlackCap
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Oct 04, 2019 4:52 am
Contact:

Re: Rendering GuiElement

Post by BlackCap »

eradicator wrote:
Fri Oct 04, 2019 9:42 am
Duplicate: viewtopic.php?p=438089#p438089
Can I close/delete my own thread?

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Canvas gui element

Post by Koub »

[Koub] Merged the newer topic into the older :).
Koub - Please consider English is not my native language.

Post Reply

Return to “Won't implement”