chicken panel prettifying - looking for simple background

chicken panel prettifying - looking for simple background

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
jivvz
Posts: 38
Joined: 04 May 2009, 00:03

chicken panel prettifying - looking for simple background

Post by jivvz »

Hi!

I'm working on the chicken panel for robot defense + hopefully planet defense. Feel free to reuse in your chicken mods.
I have human readable unitdef names and displaylist that shows up on hovering them with mouse, but I think I want some background (between list and chicken panel) or other easy thing to add. Maybe just black + alpha. Any tips? I am very limited in opengl.

Image

https://github.com/aronj/Robot-Defense/ ... hicken.lua

The hover/"dropdown" code is in

Code: Select all

function widget:IsAbove(x, y)
// his_face


edit: allright ill just fucking draw vertices!

Image

Code: Select all

local function DrawMyBox(minX,minY,minZ, maxX,maxY,maxZ)
   gl.BeginEnd(GL.QUADS, function()
      gl.Color(0,0,0,0.3)
      --// top
      gl.Vertex(minX, maxY, minZ);
      gl.Vertex(maxX, maxY, minZ);
      gl.Vertex(maxX, maxY, maxZ);
      gl.Vertex(minX, maxY, maxZ);
      --// bottom
      gl.Vertex(minX, minY, minZ);
      gl.Vertex(minX, minY, maxZ);
      gl.Vertex(maxX, minY, maxZ);
      gl.Vertex(maxX, minY, minZ);
   end);
   gl.BeginEnd(GL.QUAD_STRIP, function()
      --// sides
      gl.Vertex(minX, minY, minZ);
      gl.Vertex(minX, maxY, minZ);
      gl.Vertex(minX, minY, maxZ);
      gl.Vertex(minX, maxY, maxZ);
      gl.Vertex(maxX, minY, maxZ);
      gl.Vertex(maxX, maxY, maxZ);
      gl.Vertex(maxX, minY, minZ);
      gl.Vertex(maxX, maxY, minZ);
      gl.Vertex(minX, minY, minZ);
      gl.Vertex(minX, maxY, minZ);
   end);
end
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: chicken panel prettifying - looking for simple background

Post by Forboding Angel »

You should contribute advances to the repo: https://github.com/Spring-Helper-Projec ... en-Defense

Edit: It should be noted that a lot of the fixes have been happening in evo's side of them, and they're pretty much ready to go. I'm not done testing everything quite yet though, which is why the repo is a little out of date.

Edit2: Updated the repo
jivvz
Posts: 38
Joined: 04 May 2009, 00:03

Re: chicken panel prettifying - looking for simple background

Post by jivvz »

ok great. I am gonna look into it. I hope we havent diverged too much. as I said im focusing mostly on PD and RD mods, but i really like the idea of standalone code base. and honestly it probably will be forced upon it later on to work out compatibility.

final result:
Image
Post Reply

Return to “Lua Scripts”