English OOP Container/Layout icon

6 comments
13.01.16 10:19:30 am
like 5 like it!
11 kb, 93 Downloads
tontonEd
User
Offline Off
hello, I'm posting my implementation of gui container/Layouts.

I have no time nor desire to explain basic principle from scratch so to fully get this file, you have to know android Layout principle or web layout principle.
And java polymorphism if you want create your own layout.

all is containers, when you apply a layout on a container, this return you multiple containers depending the layout you used.

Container(int Id,Image bg, int dimx, int dimy, int x, int y,Color color)
Id - not used
dimx - dimmension x of the container
dimy - dimmension y of the container
x - position on screen of the container
y - position on screen of the container

Methods :
- addElement(Id, Image or string).
Id - not used
note : when you had an Element to a container, image or a string, don't create layout to this container after - that's is no sense. use bg container parametter for images instead.

-createLayout(Id,Layout,cpt)
Id - not used
Layout - Layout (meh)
cpt - int - global increment, important !
----------------------------------------------------------
all layout admit 4 parametters :
Layout(Int Id, Image bg, Int div or Int Heigt, Int space)
Id : the id - not used - put what you want
gb : background - type Image

the 3dr parametter is a int, but depending the nature of the layout this int mean something different,
1st case : div : numbers of divisions
2nd case : height : the number of division is set to 2, the height of the 1st or the 2nd containers.

space : the space between the containers.
-------------------------------------------------------------

Image(int Id, string path, int dimx, int dimy, boolean resize, float alpha)

Id - not used.
rest are obivius.

--------------------------------------------------------------

1st - you have to create a container :
local bg =Image(1,"gfx/pcsmix/window.png",272,440,false,1)
Color ={}
Color.BLUE = {52,152,219}

container1 =Container(1,bg,272,440,484,241,Color.BLUE)

2nd - add a windowsLayout to this container - you have to, that's the only contraint.

local WindowsLayout = WindowsLayout(1,"Create")
container1:createLayout(id,WindowsLayout,cptview[id])
aHeadContainerList:addHeadContainer(container1)

3rd - add element into container or again layout to infiniteee

here exemples : https://github.com/edwinmrtn/pcs_mixmatch/blob/master/view/create.lua

I wish the 3-4 people able to enjoy my file to enjoy my file
imageimageimageimage
ok This file has been reviewed and approved by Rainoth (13.01.16 11:01:43 am)

Comments

6 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
20.01.16 10:42:14 pm
like I like it!
Up
Nekomata
User
Offline Off
U da real mvp
19.01.16 01:15:50 pm
like I like it!
Up
Exist
User
Offline Off
Cool Bro
13.01.16 03:59:43 pm
like I like it!
Up
BcY
Reviewer
Offline Off
It's looking really cool.Good job.
13.01.16 03:16:45 pm
like I like it!
Up
Cebra
User
Offline Off
It's a great idea
13.01.16 02:16:03 pm
like I like it!
Up
Gaios
Security Supporter
Offline Off
I think this script is very good and clear
13.01.16 11:01:14 am
Up
Rainoth
Moderator
Offline Off
Violet*
To the start Previous 1 Next To the start