Page 1 of 1

chicken panel prettifying - looking for simple background

Posted: 08 Jan 2017, 11:30
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

Re: chicken panel prettifying - looking for simple background

Posted: 08 Jan 2017, 20:27
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

Re: chicken panel prettifying - looking for simple background

Posted: 08 Jan 2017, 21:19
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