AIMP Forum

AIMP for Windows => Вопросы / Questions => Topic started by: Lex Xie on September 05, 2020, 10:23:56

Title: 【Resolved】【Help Needed】how to make texture changes with time?
Post by: Lex Xie on September 05, 2020, 10:23:56
Hi everyone,good day.

Here i come to ask your help again. Do you any one konws how to make texture changes with time?

For example, i want the texture of "MenuButton" changes when weekday changes. (From Monday to Sunday)
i put 7 images in the Resource Repository and create a ScriptableOperatorCounter, wondering this can control  "MenuButton" 's texture. But failed.

Could you please teach me how to make it come true if you konws? Please kindly refer to the attachment.

==========Here is the script of ScriptableOperatorCounter:  (actually i konw little about codes  :'( )

procedure Execute(var State: Integer);
 
var week: Integer;
var BT: TComponent;
begin
   BT := FindObject('MenuButton');
   week:= DayOfWeek();
   
   if (week = 1) then     
   BT.Set('Texture.ID', 'Skin.Texture.Sunday');
   else if (week = 2)
   BT.Set('Texture.ID', 'Skin.Texture.Monday');
   else if (week = 3)
   BT.Set('Texture.ID', 'Skin.Texture.Tuesday');
   else if (week = 4)
   BT.Set('Texture.ID', 'Skin.Texture.Wensday');
   else if (week = 5)
   BT.Set('Texture.ID', 'Skin.Texture.Thursday');
   else if (week = 6)
   BT.Set('Texture.ID', 'Skin.Texture.Friday');
   else
   BT.Set('Texture.ID', 'Skin.Texture.Satday') ;
   end;
end;
Title: Re: 【Help Needed】how to make texture changes with time?
Post by: Black_AVP_Bim on September 05, 2020, 12:46:16
Проще всего сделать на аниматоре, правда, при этом вызов меню будет по правой кнопке.
Пример во вложении.
Title: Re: 【Help Needed】how to make texture changes with time?
Post by: Lex Xie on September 05, 2020, 14:35:39
Проще всего сделать на аниматоре, правда, при этом вызов меню будет по правой кнопке.
Пример во вложении.

Thank you Black_AVP, so nice of you to help resolve this, you are really the master!!