Jump to content

Recommended Posts

Posted (edited)

Introduction

Hey,

since I'm often asked if I can make an example for this or that in Python, I just post some of these examples in this thread from time to time. :)

Usually they just end up in my trash (that's why the collection is small for now) but maybe it will help some of you to learn something.


You are also welcome to post examples here and I will add them to the startpost.


You have a wish for a certain example?

Then write it in here.


PS:

These examples are designed very simple, so that they can be understood.

 

Examples

ui.ComoBox()

Spoiler

Preview:
gU42KYg.gif


Call it:
Add to imports at the top of game.py:
"import example_combobox"

After the login in the game you will see the window


Download:

https://mega.nz/#!Nh8hST5T!6Tt_qAfiYX_BjRPuVD2L48juDaOZIb4dVAFKyt4eAHc

 

ui.ScrollBar() with text

Spoiler

Preview:
rGE57ti.gif


Call it:
Add to imports at the top of game.py:
"import example_scrollbar"

After the login in the game you will see the window


Download:

https://mega.nz/#!lhlnGZyI!k8_Bw4gvdJvTNX42qOOQ-ztVQkSX-Lf-90MthW-3QBw

 

ui.AniImageBox() as loading bar

Spoiler

Preview:
cC6o7zx.gif


Call it:
Add to imports at the top of game.py:
"import example_loadingbar"

and simply move the file "loading_bar.tga" into the client folder. (There where the .exe is located).

Otherwise change the path in the python file "example_loadingbar.py".

After the login in the game you will see the window.


Download:

https://mega.nz/#!thtRyT6J!c1lkeRDg-Kmi_6Cj3AcVGYSNF0q-JvP_HyLe6yo6tLY

 

ui.ListBox()

Spoiler

Preview:
HOuQhTB.gif


Call it:
Add to imports at the top of game.py:
"import example_listbox"

After the login in the game you will see the window


Download:

https://mega.nz/#!Yl1nzLyZ!-vd4UbsPRUghQ2mWiDe4EgLeWJtRD2H2DMMuTqfZj4I

 

ui.ToggleButton()

Spoiler

Preview:
FulTpMj.gif


Call it:
Add to imports at the top of game.py:
"import example_toggleButton"

After the login in the game you will see the window


Download:

https://mega.nz/#!l58R2JAD!-eB2HYlY7J5c2MtL3l8ZzeiHxu3xT4GaWtrjaKEaCEA

 

ui.RadioButtonGroup()

Spoiler

Preview:
Bs3UUlB.gif


Call it:
Add to imports at the top of game.py:
"import example_radioButtonGroup"

After the login in the game you will see the window


Download:

https://mega.nz/#!lssnnT5S!jftHHoFIJW77zJVOj8ms4vqbZ1AfOKO_EJrn1nxJZHg

 

ui.DragButton()

Spoiler

Preview:
J5gxzBc.gif


Call it:
Add to imports at the top of game.py:
"import example_dragButton"

After the login in the game you will see the window


Download:

https://mega.nz/#!s4s1xBSS!JKbHS07QTuc3DEbThLR5f6noq2IlAfJB5YBSW6GFAhY

 

ui.Bar(), ui.Box(), ui.Line()

Spoiler

Preview:
DMLURef.gif


Call it:
Add to imports at the top of game.py:
"import example_barBoxLine"

After the login in the game you will see the window


Download:

https://mega.nz/#!Yo9FlZpZ!mLG6jQEYaBgqZgKSrsjQNIjnFZxp16Qq7nn420xhpYE

 

ui.Gauge(), ui.SliderBar()

Spoiler

Preview:
wKiWZgA.gif


Call it:
Add to imports at the top of game.py:
"import example_gaugeSlider"

After the login in the game you will see the window


Download:

https://mega.nz/#!BotxDBgQ!N69O8uejcypNmICwVkL37upPaoDXXCZ4q5ObzcAikYk

 

ui.TextLine(), ui.EditLine()

Spoiler

Preview:
e3OQOTs.gif


Call it:
Add to imports at the top of game.py:
"import example_textLineEditLine"

After the login in the game you will see the window


Download:

https://mega.nz/#!N49XDDzR!8evEds1DDsjU9uawABISRMmv753OoOB4TRIAgdZ1ndw

 

Pagination

Spoiler

Preview:
DZmbP4S.gif


Call it:
Add to imports at the top of game.py:
"import example_pagination"

After the login in the game you will see the window


Download:

https://mega.nz/#!0h0FiSwY!gVTetxX3XMC1Nt--wZISgsH_dZAjZQonVNSCJDx7kjc

 

Tabs

Spoiler

Preview:
bbovi1T.gif


Call it:
Add to imports at the top of game.py:
"import example_tabs"

After the login in the game you will see the window


Download:

https://mega.nz/#!NhkElArB!wX59jhxWpdW0cr3aKgFm5MhlBjPDku_DLTgdXotxu3k

 

DropDown Tree

Spoiler

Preview:
gmb3X0x.gif


Call it:
Add to imports at the top of game.py:
"import example_dropdownTree"

and simply move the folder "exampleDropdownTree" into the client folder. (where the .exe is located).

Otherwise change the path in the python file "example_dropdownTree.py".

After the login in the game you will see the window.


Download:

https://mega.nz/#!Z1kTwbSR!5b1OY2Odk3T6ordPhLDK_B4FYUfOeeb391sWcRrmfZI

 

Category Navigation

Spoiler

Preview:
BPzLnLe.gif


Call it:
Add to imports at the top of game.py:
"import example_categoryNav"

After the login in the game you will see the window


Download:

https://mega.nz/#!d8lRAYrD!SeT4gAG0QmMZZod-X7V8D_FpSeMaNlmTo3ppOg5hlxM

 

ListBox Search

Spoiler

Preview:
iMpNu3B.gif


Call it:
Add to imports at the top of game.py:
"import example_listBoxSearch"

After the login in the game you will see the window


Download:

https://mega.nz/#!9lkWSQrS!r8-UH7RwmuBNjzNNMMb58vwAxCGois18fcFhD6EbS7w

 

TextLineScrollable Class

Spoiler

Preview:
haRL2QL.gif


Call it:
Add to imports at the top of game.py:
"import example_textLineScrollable"

After the login in the game you will see the window


Download:

https://mega.nz/#!ZoFmQI6T!5FIHXkFCJnFiWuMl0nPIWKKL-gsLlX4qyjyjokR_r2k

 

Collapsible window

Spoiler

Preview:
MwpRKdO.gif


Call it:
Add to imports at the top of game.py:
"import example_collapseWnd"

and simply move the folder "exampleCollapseWnd" into the client folder. (where the .exe is located).

Otherwise change the path in the python file "example_collapseWnd.py".

After the login in the game you will see the window.


Download:

https://mega.nz/#!wgsFADbb!_r8yfMBbt7ZruntyjW5uKaUbnFwztdoFX6hU9CH1PZ0

 

Edited by ProfessorEnte (see edit history)
  • Love 20

Share this post


Link to post
Posted (edited)

Great job, this is a very handy reference. Could you use github gists/repo instead of mega downloads? Thanks

Edited by North (see edit history)
  • Love 1

Share this post


Link to post
8 hours ago, hachiwari said:

Sexy, i hope that code is also sexy ;3

The code has been kept simple so that it can be easily understood. You can always optimize everything. :)

 

21 hours ago, North said:

Great job, this is a very handy reference. Could you use github gists/repo instead of mega downloads? Thanks

Yeah, I've been thinking about that, too, because things are getting messy. As soon as I find the time.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.