Преглед изворни кода

add: MX-Linux SDL envent.type 1025,1026 ~ 5,6 Mouse.Click

micha пре 8 месеци
родитељ
комит
b0a0c0a1a0
4 измењених фајлова са 13 додато и 13 уклоњено
  1. 6 6
      tkray/dmx.py
  2. 3 3
      tksdl/fix.py
  3. 2 2
      tksdl/start.py
  4. 2 2
      tool/sdl_elm.py

+ 6 - 6
tkray/dmx.py

@@ -3,7 +3,7 @@ import pyray
 ConfigFlags(FLAG_MSAA_4X_HINT) #|FLAG_WINDOW_RESIZABLE  )
 #ConfigFlags(FLAG_WINDOW_RESIZABLE  )
 ConfigFlags(FLAG_WINDOW_HIGHDPI )
-init_window(800, 450, "RAY-DMX",10,10,10,10)
+init_window(800, 450, "RAY-DMX")#,10,10,10,10)
 #pyray.TextureFilter(font1,1)
 
 import sys
@@ -58,17 +58,17 @@ pyray.TextureFilter(3)
 
 while not window_should_close():
     begin_drawing()
-    for o in dir(font1):
-        print(o)
-    print()
-    print(font1.texture) # (3)
+    #for o in dir(font1):
+    #    print(o)
+    #print()
+    #print(font1.texture) # (3)
 
     clear_background(BLACK)
     Color(255,0,0,0)
     rl_enable_smooth_lines()
     if 0: # font test
         draw_line(2, 2, 100, 2, (255,225,0,220))
-        print(load_font_ex.__doc__) #("resources/pixantiqua.ttf", 32, 0, 250);
+        #print(load_font_ex.__doc__) #("resources/pixantiqua.ttf", 32, 0, 250);
 
         i = 20
         

+ 3 - 3
tksdl/fix.py

@@ -897,10 +897,10 @@ while 1:
 
             if "pos" in event.dict:
                 if "button" in event.dict:
-                    if event.type == 5:#press
+                    if event.type in [5,1025]:#press
                         mouse_down = 1
                         mouse_pos1 = [event.pos[0],event.pos[1]]
-                    if event.type == 6:#release
+                    if event.type in [6,1025]:#release
                         mouse_down = 0
 
                 mouse_pos2 = [event.pos[0],event.pos[1]]
@@ -911,7 +911,7 @@ while 1:
                 pass
 
             elif "button" in event.dict:
-                if event.type == 6:
+                if event.type in [6,1026]:
                     #print("grab DOOOO",event)
                     #print("grab2", event.dict["button"],len(mouse_grab) )
                     if event.dict["button"] == 1:

+ 2 - 2
tksdl/start.py

@@ -199,10 +199,10 @@ while run:
 
         if "pos" in event.dict:
             if "button" in event.dict:
-                if event.type == 5:#press
+                if event.type in [5,1025]:#press
                     mouse_down = 1
                     mouse_pos1 = [event.pos[0],event.pos[1]]
-                if event.type == 6:#release
+                if event.type in [6,1026]:#release
                     mouse_down = 0
 
                 for btn in mouse_grab:

+ 2 - 2
tool/sdl_elm.py

@@ -464,9 +464,9 @@ class Button():
 
             if "button" in event.dict:
                 mode = ""
-                if event.type == 5:
+                if event.type in [5,1025]:
                     mode = "press"
-                if event.type == 6: 
+                if event.type in [6,1026]: 
                     mode = "release"
 
                 e = [event.button,mode]