Tuesday, March 13, 2012

Finalizing TTSGrid

I finally finished TTSGrid

I went with my gut, and made the expandable detail field be an easy method.

I was having a bunch of struggle trying to get the detailField to draw,
and was trying to do something ugly like casting, which is what I ended doing :(

There are two
getAsExpandableListGridDetailField methods,
one sets the detailField as Text
and the other as a Canvas.

The canvas one does Casting to a canvas,
and the magic under the hood is

Canvas c = (Canvas) record.getAttributeAsObject("detailField");


So, "detailField" is a reserved special Attribute, that should only be used as
the key for D getDescription.

It was a hard battle, and it's got ugly scars,
but it draws an image automagically. For that matter, it would draw anything
that you store in a canvas.


I'm also still trying to design the Recycle bin

and I'm trying to make it work as perfectly and intuitive as possible.

But for now, I have a Recyclable interface, which is the type of object that
will live in the model in a set. I was also thinking, that to unrecycle things,
I need to know wether they are CompositeImageDefinitions or GameComponentDefinitions or game components... which means there will have to be some sort of map that knows where the objects came from... I'll have to discuss this with the crew.

No comments:

Post a Comment