Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - V1ncam

Pages: [1]
1
Support / Re: The inner sizer of conainersizer and black edge around image
« on: February 26, 2014, 09:29:29 am »
It is a little bit late,

but thanks!

2
Support / The inner sizer of conainersizer and black edge around image
« on: February 21, 2014, 12:35:03 pm »
Hello I've got 2 questions/problems,

I can't determine whether my tk2dUILayoutContainerSizer is full. I just add a fixed tk2dUILayoutItem and then try to check if the container is full with
myTk2dUILayoutContainerSizer.GetInnerSize().y > 1.0f. However this doesn't work. Is there any other way I can make sure if the container is full or not? Or am I using this function wrong?

Secondly, every time I try to import a image file into my SpriteCollection it creates a little black line around the edge of the image. It even happened when I tried to import a demo image file. When I open the atlas it created it is already there. What am I doing wrong here?

[EDIT] Just to be clear, if I import a circle as image, it create a black edge around the circle.

Thank you.

3
Support / Re: Make 'tk2dUILayoutContainerSizer' fullscreen.
« on: February 06, 2014, 07:49:44 pm »
You are totally right. My fault!

And thanks  ;D

4
Support / Make 'tk2dUILayoutContainerSizer' fullscreen.
« on: February 05, 2014, 03:23:49 pm »
Hello,

I've been quite busy with 2DToolkit for the last couple of weeks. But the one thing I don't seem to understand is the size of a tk2dUILayout object.

Let us assume I have a Container object with the tk2dUILayoutContainerSizer component and lets say I want 3 row who, all added up, take up the whole screen. Since the size is not settable the only way to do this is manually. But even then there's always a slight error somewhere. Ideally I would like to do this at runtime. Is this possible, maybe with a little trick like putting it inside some other tk2d object and making that go fullscreen?

Kay


5
Support / Re: Adding new sprite to collection
« on: January 25, 2014, 08:10:56 pm »
Thank you very much! ;D

Does the demo scene also contains storing a sprite to a collection (maybe when the program closes) so the next time the program is started it is there? Sorry right now I am not anywhere near the code.

6
Support / Adding new sprite to collection
« on: January 24, 2014, 03:55:55 pm »
Hi,

I want to download and draw an image every now and then. Therefore I need to add an image to a SpriteCollection. The example in the demo uses an already pre-worked image. I need to be able to add an plain .png to the collection. Does someone know how to do this? (And is it possible to save these in that collection so I can use these the next time the program is started?)

[EDIT]: Okay, so I've found how to load and draw an image with 2DToolkit:

Code: [Select]
Texture2D tex = (Texture2D)Resources.Load("Image");
GameObject go = tk2dBaseSprite.CreateFromTexture<tk2dSprite>(tex, tk2dSpriteCollectionSize.Explicit(1, tex.height), new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0));
Instantiate(go);

But I feel like this isn't the 'right' way to go. It is not really using the mechanics of 2dToolkit. How can I integrate this more? For instance I really need the dimension in pixel units function, which seems to be missing right now.

V1ncam

Pages: [1]