#Minimize grid menu lua, might require 2 separate lua's

1 messages · Page 1 of 1 (latest)

deep lagoon
#

So i am in my planning phase of creating my own compact and refined grid layout with 14 selections each page, but i might need to create one or two widgets to make it possible. the left sides consists of the geothermic powerplants(land and sea), while the top right consists of the Cerberus,.

The first step or lua will combine the icons of a land and sea varient, so much less space is taken on the grid menu. this will apply to all land/sea structures that switches automatically when you hover over land or sea. this should be easy.

The second step and/or lua would consist of two structures that have similar uses and prices, but have different situations where they are useful, for example, a wind generator, a a tier 1 solar generator, in this example, it is between geothermic powerplant and Cerberus(one provides more power from an air vent, and the other provides an extra turret), they will be the same icon, but you would have to press, the grid key corresponding the button twice to select the second option, or doubleclick.

And the third step would to combine both steps 1 and 2. This is the final example. only the tier 1 , power sources(wind , t1 solar, and tidal generator) and this tier 2 geo(geo power land/sea, and prude/Cerberus) are covered in this example, without the extra units option. For now i just want to figure out is this possible, because. one portion would need to be highlighted to convey to the player that it the one that it's selected, and the price labels would need to be reorganized to show for all options

after this is implemented, 28 icons would be the maximum number of structures that can be displayed, and with my redesigned grid, it will show 14 icons per page, which me their would be a maximum of only two pages per builder, the will reduce the number of key presses for anyone that uses the grid menu.

#

i could redesign the icons

night badge
deep lagoon
#

are these just the icons or the 3d renders as well?

deep lagoon
#

or is it the entire widget?

#

and excuse me what do you mean combined in the widget, as in 1 file?

deep lagoon
#

or to avoid a headache, where can I best reach IceXuick Floris and PtaQ for permission?

night badge
#

I accidentally linked to the icon license but the unitpic license is the same except I don't think PtaQ is on it. Basically to stay compliant with the license you can't distribute the pictures or derivatives. But you can distribute code that happens to use those assets. Or you can of course make your own.

#

I just wrote a widget that can create a texture out of 3 unitpics almost exactly like you're final grid menu item. I will post it in a minute.

deep lagoon
#

well thank you, i would have like to learn it myself

#

because i am planning to make a bigger scope change for a grid menu rework

night badge
deep lagoon
#

thank you for your assistance, i will start right away

#

well gigantic assistance

night badge
#

If you have any questions especially about opengl let me know

deep lagoon
deep lagoon
#

iam a nnob

night badge
#

The shader didn't compile.

#

could you send infolog.txt? search for minimal_fbo.lua

deep lagoon
#

could it be i used an older engine from a previous save?

night badge
#

Do you by chance have an amd card? sometimes they require floats in shaders to end with .0 or f which I didn't do.

#

It would have to be a pretty old version for that to happen

deep lagoon
#

the custom amd van gough in the steamdeck

night badge
#

I updated the gist which might help.

deep lagoon
#

testing

#

[t=00:37:42.435038][f=0003879] Loading: LuaUI/Widgets/minimal_fbo_example.lua
[t=00:37:42.444767][f=0003879] LuaShader: [Quad Shader] shader error(s):
0:15(19): error: invalid swizzle / mask xyza' 0:15(19): error: type mismatch 0:15(14): error: cannot construct vec4' from a non-numeric data type
0:15(14): error: operands to arithmetic operators must be numeric

[t=00:37:42.444976][f=0003879] vertex:19 coord = fma(coord, vec2(2.0), vec2(-1.0));
^^ 0:15(19): error: invalid swizzle / mask xyza' vertex:19 coord = fma(coord, vec2(2.0), vec2(-1.0)); ^^ 0:15(19): error: type mismatch fragment:14 fragColor = vec4(texture(img, vs_in.uv).xyza) + vec4(0.0, 0.0, 0.0, 0.5); ^^ 0:15(14): error: cannot construct vec4' from a non-numeric data type
fragment:14 fragColor = vec4(texture(img, vs_in.uv).xyza) + vec4(0.0, 0.0, 0.0, 0.5);
^^ 0:15(14): error: operands to arithmetic operators must be numeric

[t=00:37:42.444991][f=0003879] Quad Shader: compilation failed, false
[t=00:37:42.445039][f=0003879] LuaShader: [Quad Shader] shader error(s):
Attempt to use invalid shader object in Delete. Did you call :Compile() or :Initialize()
[t=00:37:42.445326][f=0003879]

#

that is my error

#

this is the update

#

[t=00:55:03.458698][f=0003545] Quad Shader: compilation failed, false
[t=00:55:03.458731][f=0003545] LuaShader: [Quad Shader] shader error(s):
Attempt to use invalid shader object in Delete. Did you call :Compile() or :Initialize()
[t=00:55:03.458929][f=0003545] Attempt to use invalid shader object in Delete. Did you call :Compile() or :Initialize()

[t=00:55:03.458977][f=0003545] Error in Shutdown()
[t=00:55:03.458983][f=0003545] Error in Shutdown(): [string "LuaUI/Widgets/minimal_fbo_example.lua"]:287: attempt to index upvalue 'quad' (a nil value)
[t=00:55:03.458988][f=0003545] Removed widget: A minimal FBO example
[t=00:55:03.459641][f=0003545] LuaShader: [Quad Shader] shader error(s):
Attempt to use invalid shader object in Delete. Did you call :Compile() or :Initialize()
[t=00:55:03.459814][f=0003545] Attempt to use invalid shader object in Delete. Did you call :Compile() or :Initialize()

[t=00:55:03.459839][f=0003545] Error in Shutdown()
[t=00:55:03.459848][f=0003545] Error in Shutdown(): [string "LuaUI/Widgets/minimal_fbo_example.lua"]:287: attempt to index upvalue 'quad' (a nil value)
[t=00:55:03.459903][f=0003545] Removed widget: A minimal FBO example
[t=00:55:03.460261][f=0003545] Error in Initialize(): [string "LuaUI/Widgets/minimal_fbo_example.lua"]:262: bad argument #1 to 'GetUniformLocation' (number expected, got nil)

night badge
#

maaaan
it works for me
I updated it again but idk. Nvidia lets you play fast and loose while amd actually follows the standard.

deep lagoon
#

yeah, yeah

#

intel must be worse though

deep lagoon
#

thanks it works now

trail hare
#

Threw this mock together for an ultra-compact UI

#

Higher res

gaunt grotto
deep lagoon
#

should i continue on this thread?