AIMP Forum
AIMP for Windows => Вопросы / Questions => Topic started 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;
-
Проще всего сделать на аниматоре, правда, при этом вызов меню будет по правой кнопке.
Пример во вложении.
-
Проще всего сделать на аниматоре, правда, при этом вызов меню будет по правой кнопке.
Пример во вложении.
Thank you Black_AVP, so nice of you to help resolve this, you are really the master!!