ES Recruitment Drive
[[As posted earlier this is because of echos while starting up i'll fix this with the next update by overriding the echo function]]
Thought it over: this should not happen anymore with the last update, because there are no echos.
Try redownloading. What does the stderr.txt say?
Last edited by DeFransen; Mar 22, 2010 at 08:31 AM. Reason: thought it over
"Wenn Sensei Tanaka sein Shodushi ist, dann soll er hingehen und uns den Dimak zeigen!"
Ha, I guess now I know why some people can't manage to get it work:
They hide known file extensions on windows.
So I reuploaded it to MegaUpload - no renaming needed
Also some updates:
- changed API and behavior of DeGUI.ListBox
- added .z attribute for GUI elements
- fixed a bug that prevented BoutInfo to count wins/defeats sometimes
- changed internals of keyboard input processing a little
- added error checking for some of the global functions, so that stderr does not say there is an error in DeScript.lua, but points to the real error location
- added the default events to the list of hookable events for completness
- fixed DeGUI:h() - DeGUI:w() bug; thanks Kyat
Last edited by DeFransen; Mar 25, 2010 at 02:38 PM.
"Wenn Sensei Tanaka sein Shodushi ist, dann soll er hingehen und uns den Dimak zeigen!"
Oh by the way, can the added table functions be called like x:find(a) as opposed to table.find(x,a)?
:D
Hey there
I've been trying to develop a replay viewer with the DeScript.
Developping is a hobby for me, and I'm not that used yet with object orienting developement.

I'm stuck at one part when trying to use DeGUI.Image.

local ARV = class(DeGUI.Frame,function(self)
	local w,h = DeGUI:size()
	local framew,frameh = 250, 50
	left_but = load_texture("images/arrowL.tga")
	right_but = load_texture("images/arrowR.tga")
	
	self._base.init(self,((w/2) - framew/2), h - 100 ,framew, frameh)
        --self:child('iLeftArrow',DeGUI.Image(5,5,40,40,'images/arrowL.tga'))
	--self:child('iLeftArrow',DeGUI.Quad(5,5,40,40))
				
end)
	function ARV:draw2D()
		self._base.draw2D(self)
		local x,y = self:abspos()
		set_color(unpack(DeScript.colors.Text))
		draw_quad(x+5,y+5,40,40,left_but)
		draw_quad(x+205,y+5,40,40,right_but)
	end
So my code there works. It does display two arrows in my created-frame.
I'm aware this does sucks. As you can see commented, at first I have tried to add a DeGUI.Image as a child of my gui.
The trouble is when loading the texture. I get this error message :
Lua script error: ./data/script/DeScript.lua:317: bad argument #1 to 'load_texture' (string expected, got nil)
(The .Quad does work though and displays a white square.)

Apparently I did something wrong, and DeScript is not able to load the texture.
Could you (DeFransen or anyone that could help) give me some sample of code that would allow me to "child" .Image correctly please ?

Also, this DeScript is HUGE. I mean this is really an incredible work. As I said, I'm just a hobbyist, and getting further and further in it, I'm just amazed, and some times overwhelmed.

@DeFransen : Can't wait to see what you will come up with for the mod creator ;)
Also if you want tips and feedback for the mod creator, I advise you to PM MrPoptart and/or visit this thread about Mod Team that might interest you.

See ya ;)


EDIT : Also a forum mod should rename the thread to v1.0.
Last edited by Kyat; Apr 20, 2010 at 01:04 AM.
[FROG] - [Toribash-FR] - [OLDA] - \m/
Français, english: Click
@Blam:
setmetatable(x,{__index=table})
should do it

@Kyat: Oh my .. this is a bug
To fix it change in function DeGUI.Image:draw2D()
the line:
		draw_quad(absx, absy, w, h, textureFunction(pAttrib(self,"texture")))
to
		draw_quad(absx, absy, w, h, textureFunction(self,pAttrib(self,"texture")))
The ModEditor is done and will be uploaded tomorrow, here a teaser:


Edit: uploaded now, description will follow
Last edited by DeFransen; Apr 24, 2010 at 12:55 AM.
"Wenn Sensei Tanaka sein Shodushi ist, dann soll er hingehen und uns den Dimak zeigen!"
Originally Posted by DeFransen View Post
@Kyat: Oh my .. this is a bug
To fix it change in function DeGUI.Image:draw2D()
the line:
		draw_quad(absx, absy, w, h, textureFunction(pAttrib(self,"texture")))
to
		draw_quad(absx, absy, w, h, textureFunction(self,pAttrib(self,"texture")))

The correction works. Looks like I'm your bug finder ;)
Anyway, it ensures the script does work.


Originally Posted by DeFransen View Post
The ModEditor is done and will be uploaded tomorrow, here a teaser:


Edit: uploaded now, description will follow

Oh nice GUI.
I'm eager to see the description and how you handled the "grouping" of solids.
I had a treeview in mind at first for this purpose.
Anyway, it looks good.
[FROG] - [Toribash-FR] - [OLDA] - \m/
Français, english: Click