Bladeren bron

add: HELP BUTTON's

micha 10 maanden geleden
bovenliggende
commit
aeec699bbd
5 gewijzigde bestanden met toevoegingen van 60 en 3 verwijderingen
  1. 1 1
      tkgui/draw.py
  2. 5 1
      tkgui/fix.py
  3. 18 0
      tksdl/dmx.py
  4. 22 1
      tksdl/fix.py
  5. 14 0
      tksdl/start.py

+ 1 - 1
tkgui/draw.py

@@ -121,7 +121,7 @@ def draw_exec(gui,xframe,EXEC):
             b.grid(row=r, column=c, sticky=tk.W+tk.E)
             c+=7
             if i == 0:
-                b = tk.Button(frame,bg="darkgrey", text="HELP",command=libtk.online_help("0&do=index"))
+                b = tk.Button(frame,bg="darkgrey", text="HELP",command=libtk.online_help("librelight:20-exec")) #"0&do=index"))
                 b.grid(row=r, column=c, sticky=tk.W+tk.E)
             r+=1
             c=0

+ 5 - 1
tkgui/fix.py

@@ -164,9 +164,13 @@ class GUI_FixtureEditor():
         self.b = tk.Label(self.frame,bg="black",text="") # spacer
         self.b.pack(fill=tk.Y, side=tk.LEFT)
 
-        self.b = tk.Button(self.frame,bg=bg,text="HELP", width=5)#,command=self.event) #bv.change_dmx)
+        self.b = tk.Button(self.frame,bg="grey",text="HELP", width=5)#,command=self.event) #bv.change_dmx)
         self.b["command"] = libtk.online_help("librelight:80-fixture-editor" ) #""fixture-editor")
         self.b.pack( side=tk.LEFT)
+
+        self.b = tk.Button(self.frame,bg="grey",text="VDIM", width=5)#,command=self.event) #bv.change_dmx)
+        self.b["command"] = libtk.online_help("librelight:05-virtueller-attribute" ) #""fixture-editor")
+        self.b.pack( side=tk.LEFT)
         # HEAD 2
         
 

+ 18 - 0
tksdl/dmx.py

@@ -182,6 +182,21 @@ btn1_press = [] #["10.10.10.13:0"]
 
 font0 = pygame.font.SysFont("freesans-bold",15)
 
+
+# -------------------
+x=200
+y=5
+bx = sdl_elm.Button(window,pos=[x,y,50,20])
+bx.text = " HELP "
+import lib.libtk as libtk
+def xhelp(event=None):
+    #print(event)
+    libtk.online_help("librelight:90-dmx-sheet")()
+bx.btn1.cb_on.set(xhelp)
+#bx.draw()
+btn_help=bx
+# -------------------
+
 while 1:
     fps +=1
     t = time.time()
@@ -255,6 +270,8 @@ while 1:
         window.blit(fr,(jjjj,10+iiii))
         iiii+=15
 
+    btn_help.draw()
+
     r=40
     if 1:
         ch = 141
@@ -358,6 +375,7 @@ while 1:
 
     resize_changed = 0
     for event in pygame.event.get(): 
+        x_change=btn_help.event(event)
          
         if "scancode" in event.dict:
             if event.scancode == 9:

+ 22 - 1
tksdl/fix.py

@@ -358,6 +358,21 @@ def draw_frame(window):
     fr = font22.render("DEMO / TEST - MODE ! "  ,1, (200,200,200))
     #window.blit(fr,(10,30 ))
 
+
+# -------------------
+x=200
+y=5
+bx = sdl_elm.Button(window,pos=[x,y,50,20])
+bx.text = " HELP "
+import lib.libtk as libtk
+def xhelp(event=None):
+    #print(event)
+    libtk.online_help("librelight:20-exec")()
+bx.btn1.cb_on.set(xhelp)
+#bx.draw()
+btn_help=bx
+# -------------------
+
 while 1:
 
     try:
@@ -377,7 +392,7 @@ while 1:
         #window.fill((2,2,2))
         window.fill((0,0,0))
         pygame.draw.rect(window,(0,0,0),[0,0,main_size[0],main_size[1]])
-
+        
 
         draw_frame(window)
 
@@ -439,6 +454,7 @@ while 1:
         active_fix = 0
         active_attr = 0
 
+
         i = 0
         r=40
         if 1:
@@ -698,8 +714,11 @@ while 1:
                 bxc.font0 = bx_font0
                 bxc.draw()
 
+        btn_help.draw()
         resize_changed = 0
         for event in pygame.event.get(): 
+            x_change=btn_help.event(event)
+
             if "scancode" in event.dict:
                 print(event.dict,event.type)
                 if event.scancode == 50:
@@ -837,6 +856,8 @@ while 1:
                                 cmd_client.send(msg)
                             if "release" in change[key]:
                                 pass
+
+
             if not event_lock:
                 for k3 in table_grid_draw:
                     row = table_grid[k3]

+ 14 - 0
tksdl/start.py

@@ -130,6 +130,20 @@ bx.btn1.cb_on.set(exit)
 bx.font0 = pygame.font.SysFont("freesans-bold",80)
 table.append(bx)
 
+#-----------------------------------------------------------------
+#b = tk.Button(frame,bg="darkgrey", text="HELP",command=libtk.online_help("librelight:20-exec")) #"0&do=index"))
+x=450
+y=10
+bx = sdl_elm.Button(window,pos=[x,y,50,20])
+bx.text = " HELP "
+import lib.libtk as libtk
+def xhelp(event=None):
+    libtk.online_help("librelight:10-pro-easy-mode")()
+bx.btn1.cb_on.set(xhelp)
+
+bx.font0 = pygame.font.SysFont("freesans-bold",20)
+table.append(bx)
+
 
 mouse_down = 0
 mouse_pos1 = [0,0]