diff --git a/anubis_dev/library/widgets4/bubble_manager.anubis b/anubis_dev/library/widgets4/bubble_manager.anubis index 6d46189..4c37900 100644 --- a/anubis_dev/library/widgets4/bubble_manager.anubis +++ b/anubis_dev/library/widgets4/bubble_manager.anubis @@ -31,7 +31,7 @@ public type BMCommand: bubble manager never shows more than one bubble. - Now, here is how you may create the bubble manager. + Here is how you may create the bubble manager. public define Widget bubble_manager @@ -96,7 +96,7 @@ define (Int32,Int32) When a new value is put into the command variable, the next function is called. It just recomputes the smallest rectangle containing the given area. The value is put into the dynamic variable 'br_v'. The result is an answer saying that the widget must be redrawn - within the rectangle of the old and new bubbles (if any). + within the rectangles of the old bubble and new bubble (if any). define WidgetAnswer handle_bubble_change diff --git a/anubis_dev/library/widgets4/menu_manager.anubis b/anubis_dev/library/widgets4/menu_manager.anubis index bfa74cf..024861e 100644 --- a/anubis_dev/library/widgets4/menu_manager.anubis +++ b/anubis_dev/library/widgets4/menu_manager.anubis @@ -605,6 +605,7 @@ define WidgetAnswer Widget content, Var(HorizontalDirection) hdvar, Var(VerticalDirection) vdvar, + RGB menu_color ) = if member(l,var_id(command_v)) then if *command_v is @@ -616,6 +617,7 @@ define WidgetAnswer default_event_handling(etb,[],content,changed(l))), l_r(menu,r) then + with menu = insert_if_needed(menu_color,menu,content), if size(menu) is (w1,h1) then if size(content) is (w,h) then if get_menu_position(widget_rectangle(etb,r),w1,h1,w,h,left_right(hdvar)) is (x1,y1) then @@ -624,6 +626,7 @@ define WidgetAnswer default_event_handling(etb,*menu_list_v,content,changed(l))), t_b(menu,r) then + with menu = insert_if_needed(menu_color,menu,content), if size(menu) is (w1,h1) then if size(content) is (w,h) then if get_menu_position(widget_rectangle(etb,r),w1,h1,w,h,top_bottom(vdvar)) is (x1,y1) then @@ -644,6 +647,7 @@ define (WidgetEventToolBox,WidgetEvent) -> WidgetAnswer Widget content, Var(HorizontalDirection) hdvar, Var(VerticalDirection) vdvar, + RGB menu_color ) = (WidgetEventToolBox etb, WidgetEvent e) |-> if e is @@ -661,7 +665,8 @@ define (WidgetEventToolBox,WidgetEvent) -> WidgetAnswer captured_mouse_liberated(f) then default_event_handling(etb,*menu_list_v,content,e), key_down(f) then default_event_handling(etb,*menu_list_v,content,e), keyboard_recaptured(f) then default_event_handling(etb,*menu_list_v,content,e), - changed(l) then handle_changed(etb,menu_list_v,l,command_v,content,hdvar,vdvar) + changed(l) then handle_changed(etb,menu_list_v,l,command_v,content, + hdvar,vdvar,menu_color) }. @@ -688,7 +693,7 @@ public define Widget ( (One u) |-> /*forget(ticket);*/ size(content), draw_method(menu_list_v,content), - event_handler(command_v,menu_list_v,content,hdvar,vdvar), + event_handler(command_v,menu_list_v,content,hdvar,vdvar,color), (One u) |-> [register(command_v) . registrations(content)(unique)] ). diff --git a/anubis_dev/library/widgets4/mouse_tracker.anubis b/anubis_dev/library/widgets4/mouse_tracker.anubis index db927c5..8c9c2af 100644 --- a/anubis_dev/library/widgets4/mouse_tracker.anubis +++ b/anubis_dev/library/widgets4/mouse_tracker.anubis @@ -14,7 +14,7 @@ This widget is an invisible widget surrounding another widget (called its 'content'). The purpose of the mouse tracker is just to maintain a variable up to date. This variable contains the coordinates of the mouse (relative to the mouse tracker, or, - which is the same to the content). + which is the same, to the content). read widget.anubis @@ -36,7 +36,7 @@ public define Widget mouse_tracker ( Var((Int32,Int32)) mouse_position, - Widget content + Widget content ) = create_widget ( -- libgit2 0.21.4