#from pyray import * import pyray #import ralib_sdl as pyray #import raylib as pyray import sys sys.path.insert(0,"/opt/LibreLight/Xdesk/") #pyray.set_config_flags(pyray.FLAG_WINDOW_HIGHDPI ) #pyray.set_config_flags(pyray.FLAG_MSAA_4X_HINT) pyray.set_config_flags(pyray.FLAG_WINDOW_RESIZABLE) CAPTION = 'RAY-DMX' import tool.movewin as movewin import pathlib try: import memcache mc = memcache.Client(['127.0.0.1:11211'], debug=0) #data = mc.get("MODES") except: mc = None _file_path=pathlib.Path(__file__) print("file:",_file_path) movewin.check_is_started(CAPTION,_file_path) win_title =CAPTION.strip().split()[-1] store = movewin.load_all_sdl(win_title) print(store) POS=[10,10] W=760 H=450 if store: POS=[store[-2],store[-1]] POS[0] += 5 #frame kompensation POS[1] += 29 #frame kompensation print(store) W=int(store[-4]) H=int(store[-3]) pyray.init_window(W, H, CAPTION) #"RAY-DMX")#,10,10,10,10) #pyray.TextureFilter(font10,1) win_con = movewin.Control() win_con.title = win_title win_con.winfo() if POS: win_con.move(POS[0],POS[1]) print(POS,win_con.title) #exit() import sys sys.path.insert(0,"/opt/LibreLight/Xdesk/") import tool.tk_elm as tk_elm #import tool.sdl_elm as sdl_elm img = "/opt/LibreLight/Xdesk/icon/scribble.png" IMG = pyray.load_image(img) print(pyray.set_window_icon(IMG)) import time import memcache mc = memcache.Client(['127.0.0.1:11211'], debug=0) #x=mc.get(k) old_x = -10 old_y = -10 start = time.time() frame_count = 0 fps_count = 0 #a = "/usr/share/fonts/truetype/freefont/FreeMono.ttf" #a = "/usr/share/fonts/truetype/freefont/FreeSerif.ttf" #a = "/usr/share/fonts/truetype/freefont/FreeSans.ttf" #a = "/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf" #a = "/usr/share/fonts/truetype/freefont/FreeSansBold.ttf" k=200 a = "/usr/share/fonts/truetype/freefont/FreeSans.ttf" font10l = pyray.load_font_ex(a, 10, None, 0); a = "/usr/share/fonts/truetype/freefont/FreeSansBold.ttf" font10 = pyray.load_font_ex(a, 12, None, 0); print(dir(font10)) print(font10.baseSize) ##exit() font20 = pyray.load_font_ex(a, 20, None, 0); a = "/usr/share/fonts/truetype/freefont/FreeMono.ttf" a = "/usr/share/fonts/truetype/freefont/FreeSansBold.ttf" a = "/usr/share/fonts/truetype/freefont/FreeSans.ttf" font25 = pyray.load_font_ex(a, 25, None, 0); pyray.TextureFilter(3) class EVENT(): def __init__(self): self.dict = {} self.type = 0 self.button=10 self.buttons=[0,0,0,0] xevent=EVENT() class BUTTON(): def __init__(self,master=None,txt="