.HaveGone 81 Posted April 10, 2013 Boas comunidade! Venho apresentar-vos uma partner window em python feita por mim! Imagem Final: Imagem do Código: Código: #################################### By Luis Bizarro #### Release 10 Abril 2013 11:58 #### Todos os direitos reservados #### Cyber-Gamers Original ####################################import uiimport dbgimport appclass Dialog1(ui.Window):def __init__(self): ui.Window.__init__(self) self.BuildWindow()def __del__(self): ui.Window.__del__(self)def BuildWindow(self): self.Board = ui.Board() self.Board.SetSize(395, 150) self.Board.SetCenterPosition() self.Board.AddFlag('movable') self.Board.AddFlag('float') self.Board.Show() self.__BuildKeyDict() self.comp = Component() self.Primeiro = self.comp.ExpandedImage(self.Board , 8, 6, 'guieditor/woc.tga') self.Segundo = self.comp.ExpandedImage(self.Board , 14, 70, 'guieditor/bizarro.tga')def __BuildKeyDict(self): onPressKeyDict = {} onPressKeyDict[app.DIK_F5] = lambda : self.OpenWindow() self.onPressKeyDict = onPressKeyDictdef OnKeyDown(self, key): try: self.onPressKeyDict[key]() except KeyError: pass except: raise return TRUEdef OpenWindow(self): if self.Board.IsShow(): self.Board.Hide() else: self.Board.Show()def Close(self): self.Board.Hide()class Component:def Button(self, parent, buttonName, tooltipText, 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.SetToolTipText(tooltipText) button.Show() button.SetEvent(func) return buttondef ToggleButton(self, parent, buttonName, tooltipText, x, y, funcUp, funcDown, UpVisual, OverVisual, DownVisual): button = ui.ToggleButton() if parent != None: button.SetParent(parent) button.SetPosition(x, y) button.SetUpVisual(UpVisual) button.SetOverVisual(OverVisual) button.SetDownVisual(DownVisual) button.SetText(buttonName) button.SetToolTipText(tooltipText) button.Show() button.SetToggleUpEvent(funcUp) button.SetToggleDownEvent(funcDown) return buttondef EditLine(self, parent, editlineText, x, y, width, heigh, max): SlotBar = ui.SlotBar() if parent != None: SlotBar.SetParent(parent) SlotBar.SetSize(width, heigh) SlotBar.SetPosition(x, y) SlotBar.Show() Value = ui.EditLine() Value.SetParent(SlotBar) Value.SetSize(width, heigh) Value.SetPosition(1, 1) Value.SetMax(max) Value.SetLimitWidth(width) Value.SetMultiLine() Value.SetText(editlineText) Value.Show() return SlotBar, Valuedef TextLine(self, parent, textlineText, x, y, color): textline = ui.TextLine() if parent != None: textline.SetParent(parent) textline.SetPosition(x, y) if color != None: textline.SetFontColor(color[0], color[1], color[2]) textline.SetText(textlineText) textline.Show() return textlinedef RGB(self, r, g, b): return (r*255, g*255, b*255)def SliderBar(self, parent, sliderPos, func, x, y): Slider = ui.SliderBar() if parent != None: Slider.SetParent(parent) Slider.SetPosition(x, y) Slider.SetSliderPos(sliderPos / 100) Slider.Show() Slider.SetEvent(func) return Sliderdef ExpandedImage(self, parent, x, y, img): image = ui.ExpandedImageBox() if parent != None: image.SetParent(parent) image.SetPosition(x, y) image.LoadImage(img) image.Show() return imagedef ComboBox(self, parent, text, x, y, width): combo = ui.ComboBox() if parent != None: combo.SetParent(parent) combo.SetPosition(x, y) combo.SetSize(width, 15) combo.SetCurrentItem(text) combo.Show() return combodef ThinBoard(self, parent, moveable, x, y, width, heigh, center): thin = ui.ThinBoard() if parent != None: thin.SetParent(parent) if moveable == TRUE: thin.AddFlag('movable') thin.AddFlag('float') thin.SetSize(width, heigh) thin.SetPosition(x, y) if center == TRUE: thin.SetCenterPosition() thin.Show() return thindef Gauge(self, parent, width, color, x, y): gauge = ui.Gauge() if parent != None: gauge.SetParent(parent) gauge.SetPosition(x, y) gauge.MakeGauge(width, color) gauge.Show() return gaugedef ListBoxEx(self, parent, x, y, width, heigh): bar = ui.Bar() if parent != None: bar.SetParent(parent) bar.SetPosition(x, y) bar.SetSize(width, heigh) bar.SetColor(0x77000000) bar.Show() ListBox=ui.ListBoxEx() ListBox.SetParent(bar) ListBox.SetPosition(0, 0) ListBox.SetSize(width, heigh) ListBox.Show() scroll = ui.ScrollBar() scroll.SetParent(ListBox) scroll.SetPosition(width-15, 0) scroll.SetScrollBarSize(heigh) scroll.Show() ListBox.SetScrollBar(scroll) return bar, ListBoxDialog1().Show() Print do Download: Download: https://mega.co.nz/#!fdljSLKb!IhMlIHC7X6ld6Lb0flxdZ3IaFKVLEKoZRDaO_VKPjIY VirusTotal: https://www.virustotal.com/pt/file/07efc842c0e533799b6ad831778f90057a247442a3110dd0bee075a607f45753/analysis/1365591761/ !ATENÇÃO FOI TESTADO POR MIM! Qualquer duvida será respondida neste mesmo tópico e não em 3os Créditos: [*]Luis Bizarro Cumprimentos, .HaveGone // Luis Bizarro 5 SINVAL o.O, p0w3r0ff, DarkWolf and 2 others reacted to this Share this post Link to post Share on other sites
SINVAL o.O 728 Posted April 10, 2013 http://cyber-gamers.org/public/style_emoticons/default/451960.gif Share this post Link to post Share on other sites
DarkWolf 102 Posted April 10, 2013 muito bem continua Share this post Link to post Share on other sites
quenii 981 Posted April 10, 2013 Isso ae, é assim que se faz! :)Good job son Share this post Link to post Share on other sites