vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ |
2 | path: /PetFeeder/ |
||
3 | filename: PetFeeder_ApprovedFoodsFrame.lua |
||
4 | author: Jeff Parker <jeff3parker@gmail.com> |
||
5 | created: Tue, 22 Jan 2005 14:15:00 -0800 |
||
6 | updated: Tue, 22 Jan 2005 21:39:00 -0800 |
||
7 | |||
8 | Pet Feeder: a GUI interface allowing you configure happiness level for your pet & |
||
9 | drag/drop foods you wish your pet to eat. When the pet happiness drops below |
||
10 | the selected threshold will automatically feed your pet. |
||
11 | To remove a food from the list, simply click on it. |
||
12 | ]] |
||
13 | |||
14 | --[[ |
||
15 | ============================================================================= |
||
16 | Called when we want to display a list of foods |
||
17 | ============================================================================= |
||
18 | ]] |
||
19 | |||
20 | function PetFeeder_ApprovedFoodsFrame_OnReceiveDrag() |
||
21 | PetFeeder_DroptheItem( "foods" , PETFEEDER_FL_APPROVED); |
||
22 | PetFeeder_Update_Frames(); |
||
23 | end |
||
24 | |||
25 | function PetFeeder_ApprovedFoodsFrame_OnShow() |
||
26 | PetFeeder_Update_Frames(); |
||
27 | end |
||
28 | |||
29 | --[[ |
||
30 | ============================================================================= |
||
31 | Called when we want to display a list of foods |
||
32 | ============================================================================= |
||
33 | ]] |
||
34 | |||
35 | function PetFeeder_ApprovedFoodsFrame_Update() |
||
36 | PetFeeder_FoodsFrame_UpdateExt( PETFEEDER_FL_APPROVED ); |
||
37 | end |
||
38 | |||
39 | --[[ |
||
40 | ============================================================================= |
||
41 | Called when Clear Foods button is clicked |
||
42 | ============================================================================= |
||
43 | ]] |
||
44 | function PetFeeder_ApprovedFoodsFrameClearFoodsButton_Update() |
||
45 | PetFeeder_ClearFoods( PETFEEDER_FL_APPROVED ); |
||
46 | end |
||
47 | |||
48 | --[[ |
||
49 | ============================================================================= |
||
50 | Called when the button item is clicked |
||
51 | ============================================================================= |
||
52 | ]] |
||
53 | |||
54 | function PetFeeder_ApprovedFoodsFrameItemButton_OnClick(button,name) |
||
55 | if ( button == "LeftButton" ) then |
||
56 | PetFeeder_AddFood( name, PETFEEDER_FL_DISLIKED ); |
||
57 | PetFeeder_Update_Frames(); |
||
58 | end |
||
59 | end |
||
60 |