Skip to content

Please note that this library is based on LGPLv3+. In version 4.61.0.206, which is currently unreleased, it will never be closed source. You can do whatever you want with it.

License

Notifications You must be signed in to change notification settings

gnuchanos/GnuChanGUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

this lgpl3+ 4.61.0.206 Unreleased version
fun it's a serious goal of the project. if we're not having fun while making stuff, when something's not right! this is lgpl3+ 4.61.0.206 Unreleased version and this is hobby project not for money and i don't wanto bs license window to see

Finish Examples
-----------------------------------
Simple Timer -> Finish
Simple Calculator -> Fimish
Simple Text Editor -> Fimish

Simple Program Runner Like Rofi -> Fimish
Simple Video and Music Download from Youtube -> Fimish
Simple Video to Sound # convert -> Fimish
Simple Music Player -> Fimish
Simple Wine Manager -> not Fimish???

Simple Game -> 1 level demo finish but have keyboard delay :@

Please note that this library with the aim of simplifying and making it more user-friendly. Keep in mind that I am also a beginner in Python and i still learning!

important note

how you can install gnuchangui

first install 
pip install git+https://github.com/gnuchanos/gnuchangui

second install
1: download project .zip
2: extrack zip
3: cd gnuchangui
4: pip install .

event, GetValues = default.window.read(timeout=60)

event ---> everythings is event like button click, keyboard, input, multiline,
key ---> Getvalues ı give you 1 example you can understan why ı change key name for GetValues

>gc is class name

gc = GnuChanGUI(Title="", Size=(250, 600), resizable=False, finalize=True)
Themecolors().GnuChanOS

event -> gc.GetEvent
window[] -> gc.GetWindow[].update()
value[]  -> gc.GetValues[]
key=""   -> SetValue=""

if gc.GetEvent == "Button":
    gc.window["Button"].update(gc.GetValues["ButtonNameChanger"])

window["button"].update(button_color = ("#9d4edd","#5a189a")) --> Change button color
window["button"].update(gc.window["text"].get())   --> text name change button name

GCanvas detaile it's okay but not making game you can read simplegame in examples dir

Music -> pygame mixer
2D Render -> Canvas

from GnuChanGUI import *

class DefaultExample:
    def __init__(self) -> None:
        self.GC = GnuChanGUI(Title=" UwU ", Size=(1024, 655), resizable=True, finalize=True)
        Themecolors().GnuChanOS

        self.text = ""

        self.Layout = [
            [   self.GC.GMultiline(value="out", xStretch=True, yStretch=True, font="Sans, 20")   ],
            [   self.GC.GInput(value="in", xStretch=True, font="Sans, 20")   ]
        ]

        self.GC.GWindow(mainWindow=self.Layout)
        self.KYB = GKeyboard(window=self.GC)
        self.GC.update(GUpdate=self.Update, exitBEFORE=self.BeforeExit)

    def Update(self):
        _pressCheck = self.KYB.SingleKeyPressCheck(event=self.GC.event, key=self.KYB.Return)
        if _pressCheck: 
            self.text += self.GC.GetValues["in"] + "\n"
            self.GC.window["out"].update(self.text)
            self.GC.window["in"].update("")

    def BeforeExit(self):
        print("Exit")

if __name__ == "__main__":
    gc = DefaultExample()

About

Please note that this library is based on LGPLv3+. In version 4.61.0.206, which is currently unreleased, it will never be closed source. You can do whatever you want with it.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages