devil541 发表于 2022-11-25 23:16:57

求大神翻译翻译

哪位大神能帮忙翻译翻译!!
function WowBeeHelper_ProjectUpdateName(self,text,icon,del)
        local i;
        if table.getn(self.TextList)<1 then
                --WowBee.Helper=WowBee.Helper or {};
                --WowBee.Helper.List=WowBee.Helper.List or {};
        end
        if(not del)then
                if text and type(text)=="string" and text~="" then
                        for i=1, table.getn(WowBee.Helper.List) do
                                if WowBee.Helper.List.Name==text then
                               
                                        --#1 Change Selected Scheme
                                        if(icon)then
                                                if(icon=="Interface\\Icons\\INV_Misc_QuestionMark")then
                                                        icon=nil;
                                                end
                                        WowBee.Helper.List.Icon=icon;
                                        end
                                        WowBee.Helper.Current=WowBee.Helper.List.Name;
                                        lib.Scheme:Update();
                                        WowBeeHelper_SetStatus(string.format(L["SCHEME_STATUS_CHANGE"],text));
                                        return;
                                end
                        end
                       
                        --#2 Create a Scheme
                        if(icon=="Interface\\Icons\\INV_Misc_QuestionMark")then
                                icon=nil;
                        end
                        table.insert(WowBee.Helper.List,{Name=text,Icon=icon,Items={}});
                        WowBee.Helper.Current=text;
                        lib.Scheme:Update();
                        WowBeeHelper_SetStatus(string.format(L["SCHEME_STATUS_NEW"],text));
                        return;
                elseif text=="" then
                        WowBee.Helper.Current=nil;
                        return;
                end
        end
        --#3 Delete a Scheme
        if text and type(text)=="string" and text~="" then
                for i=1, table.getn(WowBee.Helper.List) do
                        if WowBee.Helper.List.Name==text then
                                table.remove(WowBee.Helper.List,i);
                                WowBee.Helper.Current=nil;
                                lib.Scheme:Update();
                                WowBeeHelper_SetStatus(string.format(L["SCHEME_STATUS_DELETE_FINISH"],text));
                                return;
                        end
                end
        end
end

懒动行不行 发表于 2022-12-5 14:55:49

大神要累死了,看这么多代码

dfgyhh 发表于 2025-3-10 15:53:26

页: [1]
查看完整版本: 求大神翻译翻译