|
You last visited: Today at 09:29
Advertisement
[Python Functions] DropBox + EasyButton !!
Discussion on [Python Functions] DropBox + EasyButton !! within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
07/23/2015, 06:58
|
#1
|
elite*gold: 5
Join Date: Oct 2012
Posts: 290
Received Thanks: 357
|
[Python Functions] DropBox + EasyButton !!
hello there everybody
so i just finished this "little" new functions
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  :
download :
hope you guys like it
|
|
|
07/23/2015, 08:36
|
#2
|
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
|
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
|
#3
|
elite*gold: 5
Join Date: Oct 2012
Posts: 290
Received Thanks: 357
|
Quote:
Originally Posted by KaMeR1337
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
|
#4
|
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
|
Quote:
Originally Posted by DEMONKING.
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
|
#5
|
elite*gold: 5
Join Date: Oct 2012
Posts: 290
Received Thanks: 357
|
Quote:
Originally Posted by KaMeR1337
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
|
#6
|
elite*gold: 44
Join Date: Dec 2009
Posts: 1,696
Received Thanks: 3,833
|
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
|
#7
|
elite*gold: 5
Join Date: Oct 2012
Posts: 290
Received Thanks: 357
|
Quote:
Originally Posted by Poccix
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
|
|
|
07/23/2015, 13:42
|
#8
|
elite*gold: 399
Join Date: Sep 2011
Posts: 5,323
Received Thanks: 3,937
|
Thanks, the simple Dropbox KS quiet useful.
|
|
|
07/23/2015, 17:50
|
#9
|
wild wild son
elite*gold: 0
Join Date: Feb 2011
Posts: 5,996
Received Thanks: 3,391
|
Functions like these are already a part of the common ui.py;
Code:
def MakeSlotBar(parent, x, y, width, height):
slotBar = SlotBar()
slotBar.SetParent(parent)
slotBar.SetSize(width, height)
slotBar.SetPosition(x, y)
slotBar.Show()
return slotBar
def MakeImageBox(parent, name, x, y):
image = ImageBox()
image.SetParent(parent)
image.LoadImage(name)
image.SetPosition(x, y)
image.Show()
return image
def MakeTextLine(parent):
textLine = TextLine()
textLine.SetParent(parent)
textLine.SetWindowHorizontalAlignCenter()
textLine.SetWindowVerticalAlignCenter()
textLine.SetHorizontalAlignCenter()
textLine.SetVerticalAlignCenter()
textLine.Show()
return textLine
def MakeButton(parent, x, y, tooltipText, path, up, over, down):
button = Button()
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(path + up)
button.SetOverVisual(path + over)
button.SetDownVisual(path + down)
button.SetToolTipText(tooltipText)
button.Show()
return button
These are (partly) not quite mature but they are existing.
Greetings
|
|
|
07/23/2015, 21:22
|
#10
|
elite*gold: 5
Join Date: Oct 2012
Posts: 290
Received Thanks: 357
|
Quote:
Originally Posted by .JayZoN
Functions like these are already a part of the common ui.py;
Code:
def MakeSlotBar(parent, x, y, width, height):
slotBar = SlotBar()
slotBar.SetParent(parent)
slotBar.SetSize(width, height)
slotBar.SetPosition(x, y)
slotBar.Show()
return slotBar
def MakeImageBox(parent, name, x, y):
image = ImageBox()
image.SetParent(parent)
image.LoadImage(name)
image.SetPosition(x, y)
image.Show()
return image
def MakeTextLine(parent):
textLine = TextLine()
textLine.SetParent(parent)
textLine.SetWindowHorizontalAlignCenter()
textLine.SetWindowVerticalAlignCenter()
textLine.SetHorizontalAlignCenter()
textLine.SetVerticalAlignCenter()
textLine.Show()
return textLine
def MakeButton(parent, x, y, tooltipText, path, up, over, down):
button = Button()
button.SetParent(parent)
button.SetPosition(x, y)
button.SetUpVisual(path + up)
button.SetOverVisual(path + over)
button.SetDownVisual(path + down)
button.SetToolTipText(tooltipText)
button.Show()
return button
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 )
|
|
|
07/25/2015, 20:58
|
#11
|
elite*gold: 0
Join Date: Sep 2012
Posts: 219
Received Thanks: 123
|
instead of creating a new dropbox you could use ui.ComboBox() and i think it would be better
|
|
|
 |
Similar Threads
|
[C++] Run Python Function Functions Metin2
05/10/2014 - C/C++ - 5 Replies
Hat sich geklärt.
|
Metin2 DE [GF-Official] Python Functions
04/03/2014 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 3 Replies
Hey :)!,
mir war heute stink langweilig und dachte mir ich release mal die Python functions für den Metin2 DE Server. Vielleicht kann der eine oder andere damit etwas anfangen, der ein H-Shield Bypass hat, oder sonst wie xD.
Credits: coldzer0 - Link zum Post.
Update: Damit kann man übrigens auch ohne HS-Shield tolle Tools "basteln" ;).
Die Funktionen sollten eigentlich auch mit anderen GF-Servern funktionieren.
Wie auch immer genug gelabert, hier nun die Funktionen:
|
Python 2.7 For New Functions
01/29/2013 - Metin2 PServer Guides & Strategies - 24 Replies
Dont need anything just add to m2 path.
|
Python Functions von Mt2 per C++ Code Inject ausführen?
12/02/2011 - C/C++ - 5 Replies
Hallo, wollte fragen, ob mir eventuell jemand beantworten kann, wie man Python Functions nützt, welche in den Metin2 - pack Files gespeichert sind.
Und ob das überhaupt so wie ich mir das vorstelle möglich ist.
|
[5173] - Python bot interface with loadable memory functions. (w/ Melee demo)
12/10/2009 - CO2 Programming - 41 Replies
M O V E D _ T O _ C O D E X P L O S I O N
|
All times are GMT +1. The time now is 09:30.
|
|