[Python Functions] DropBox + EasyButton !!

07/23/2015 06:58 DEMONKING.#1
hello there everybody

so i just finished this "little" new functions :D

and i wanted to share with you guys ;)

# 1: Drop Box

Quote:
ui.DropingBox(width, height, x, y, parent)
# 2 : Easy Button

Quote:
ui.CreateButton(parent, x, y, text, event(function), size ( xLarge, Large, Small, ..... etc)
watch the video here on youtube to checkout how it works ;) :

[Only registered and activated users can see links. Click Here To Register...]



download : [Only registered and activated users can see links. Click Here To Register...]


hope you guys like it :)
07/23/2015 08:36 KaMeR1337#2
Code:
def Button(self, parent, buttonName, x, y, func, UpVisual, OverVisual, DownVisual):
		button = ui.Button()
		if parent != None:
			button.SetParent(parent)
		button.SetPosition(x, y)
		button.SetUpVisual(UpVisual)
		button.SetOverVisual(OverVisual)
		button.SetDownVisual(DownVisual)
		button.SetText(buttonName)
		button.Show()
		button.SetEvent(func)
		return button

self.btn1 = Button(...)
self.btn2 = Button(...)
this is more simple. what for you use list. and there is already a class called ComboBox
07/23/2015 08:45 DEMONKING.#3
Quote:
Originally Posted by KaMeR1337 View Post
Code:
def Button(self, parent, buttonName, x, y, func, UpVisual, OverVisual, DownVisual):
		button = ui.Button()
		if parent != None:
			button.SetParent(parent)
		button.SetPosition(x, y)
		button.SetUpVisual(UpVisual)
		button.SetOverVisual(OverVisual)
		button.SetDownVisual(DownVisual)
		button.SetText(buttonName)
		button.Show()
		button.SetEvent(func)
		return button

self.btn1 = Button(...)
self.btn2 = Button(...)
this is more simple. what for you use list. and there is already a class called ComboBox

for this button you have to send : up visual . down visual bla bla bla
it will be really long line :3

for the ComboBox, i've never heard about it :O
07/23/2015 08:47 KaMeR1337#4
Quote:
Originally Posted by DEMONKING. View Post
for this button you have to send : up visual . down visual bla bla bla
it will be really long line :3
i just gave you a sample that shows, you added list for nothing
07/23/2015 08:52 DEMONKING.#5
Quote:
Originally Posted by KaMeR1337 View Post
i just gave you a sample that shows, you added list for nothing

So combobox is like a listbox, with board :O ?
07/23/2015 10:08 Poccix#6
You do not need to add the button to a list.
When you use:
self.button = ui.CreateButton(...)

The function KaMeR1337 posted is well.
With yours you can only use default images,
with the function from KaMeR1337 you can
use own images.
07/23/2015 12:01 DEMONKING.#7
Quote:
Originally Posted by Poccix View Post
You do not need to add the button to a list.
When you use:
self.button = ui.CreateButton(...)

The function KaMeR1337 posted is well.
With yours you can only use default images,
with the function from KaMeR1337 you can
use own images.

would be easier if you have both, so whenever you want to use own images, you can :pimp: :pimp: :pimp:
07/23/2015 13:42 DasSchwarzeT#8
Thanks, the simple Dropbox KS quiet useful.
07/23/2015 17:50 Nick#9
Functions like these are already a part of the common ui.py;


These are (partly) not quite mature but they are existing.

Greetings
07/23/2015 21:22 DEMONKING.#10
Quote:
Originally Posted by .JayZoN View Post
Functions like these are already a part of the common ui.py;


These are (partly) not quite mature but they are existing.

Greetings

well yea, but instead of sending the path and the images
you can just send the size ( only for normal(not custom) buttons ) :D
07/25/2015 20:58 Eigenartig#11
instead of creating a new dropbox you could use ui.ComboBox() and i think it would be better

[Only registered and activated users can see links. Click Here To Register...]