快捷导航
新手引导关于我们满天星繁体中文 🌓
12下一页
返回列表
查看: 547|回复: 14

技能图标素材1000个

[复制链接]

经验  6%

会员等级

积分信息
金币:18
金钱:1000
钻石:0
活跃:4
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1376 发表于 2025-11-29 20:13:01 | 显示全部楼层 |阅读模式
除封面图标以外还有冒险岛所有技能图标

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入民族

x

评分

参与人数 1金币 +5 收起 理由
三姐 + 5 很给力!

查看全部评分

最近访客

  • 落花逝流水
    2026-11-17
  • clevenlove
    2026-11-17
  • Thomas
    2026-11-15
  • JSDS
    2026-11-14
  • 肥鱼学徒
    2026-11-10
  • zhuangjiujue
    2026-11-01
  • ZYY0907
    2026-09-23
  • 1913819350
    2026-09-06
  • jflsdjlsjfsf
    2026-08-25
回复 论坛版权

使用道具 举报

会员等级

积分信息
金币:2785
金钱:435
钻石:20
活跃:563
发电:39

荣誉勋章
活跃会员优秀版主首批会员最佳新人

TA的灵将

Rank: 48Rank: 48Rank: 48

搬运工

扎德男爵 Lv:25

 UID: 2 发表于 2025-12-2 19:00:48 | 显示全部楼层
楼主加油,期待你继续发布好内容! {:6_224:}
回复

使用道具 举报

经验  10%

会员等级

积分信息
金币:9
金钱:1000
钻石:0
活跃:4
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1516 发表于 2026-2-12 16:54:48 | 显示全部楼层
666

666666666666666666666666
回复

使用道具 举报

经验  44%

会员等级

积分信息
金币:47
金钱:0
钻石:0
活跃:66
发电:0

荣誉勋章

TA的灵将

Rank: 2Rank: 2

小孜 Lv:5

 UID: 1513 发表于 2026-3-4 11:15:15 | 显示全部楼层
真是难得给力的好帖子啊~ {:6_205:}
回复

使用道具 举报

经验  56%

会员等级

积分信息
金币:1
金钱:8
钻石:0
活跃:26
发电:0

荣誉勋章

TA的灵将

Rank: 1

小艾 Lv:7

 UID: 1266 发表于 2026-3-9 18:13:16 | 显示全部楼层

        const fileInput = document.getElementById('fileInput');
        const mainImg = document.getElementById('main-img');
        const imgContainer = document.getElementById('img-container');
        const viewport = document.getElementById('viewport');
        const selectionBox = document.getElementById('selection-box');
        const displayId = document.getElementById('display-id');
        const searchInput = document.getElementById('search-id');
        const btnSearch = document.getElementById('btn-search');
        const fileInfo = document.getElementById('file-info');
        const previewBox = document.getElementById('preview-box');
        const toast = document.getElementById('toast');
        const dropOverlay = document.getElementById('drop-overlay');

        const ICON_SIZE = 32;
        const COLS = 16;

        let isImageLoaded = false;
        let currentFileIdentifier = ""; // 用于记录当前文件(文件名+大小)

        // --- 核心:处理图片加载逻辑 ---
        function loadIconImage(file) {
            if (!file || !file.type.startsWith('image/')) return;

            // 相同文件检查
            const identifier = `${file.name}-${file.size}-${file.lastModified}`;
            if (identifier === currentFileIdentifier) {
                console.log("检测到相同文件,跳过加载。");
                return;
            }

            const reader = new FileReader();
            reader.onload = function(event) {
                const src = event.target.result;
                mainImg.src = src;
                mainImg.onload = function() {
                    isImageLoaded = true;
                    currentFileIdentifier = identifier;
                    fileInfo.textContent = `文件: ${file.name.substring(0,15)}... | ${this.naturalHeight}px`;
                    previewBox.style.backgroundImage = `url(${src})`;

                    // 重置选框
                    selectionBox.style.display = 'none';
                    displayId.textContent = "--";
                }
            };
            reader.readAsDataURL(file);
        }

        // --- 拖拽功能实现 ---
        window.addEventListener('dragover', (e) => {
            e.preventDefault(); // 必须阻止默认行为才能触发 drop
            dropOverlay.style.display = 'flex';
        });

        window.addEventListener('dragleave', (e) => {
            // 只有当离开 body 时才隐藏覆盖层
            if (e.relatedTarget === null) {
                dropOverlay.style.display = 'none';
            }
        });

        window.addEventListener('drop', (e) => {
            e.preventDefault();
            dropOverlay.style.display = 'none';

            const files = e.dataTransfer.files;
            if (files.length > 0) {
                loadIconImage(files[0]);
            }
        });

        // 原有的文件选择按钮点击事件
        fileInput.addEventListener('change', (e) => {
            loadIconImage(e.target.files[0]);
        });

        // --- 其余业务逻辑 (ID计算, 定位等) ---
        function highlightIcon(id, scroll = false) {
            if (!isImageLoaded) return;
            displayId.textContent = id;
            searchInput.value = id;
            const row = Math.floor(id / COLS);
            const col = id % COLS;
            const x = col * ICON_SIZE;
            const y = row * ICON_SIZE;

            selectionBox.style.display = 'block';
            selectionBox.style.left = x + 'px';
            selectionBox.style.top = y + 'px';
            previewBox.style.backgroundPosition = `-${x}px -${y}px`;

            if (scroll) {
                viewport.scrollTo({
                    top: y - (viewport.clientHeight / 2) + (ICON_SIZE / 2),
                    behavior: 'smooth'
                });
            }
            copyToClipboard(id);
        }

        imgContainer.addEventListener('mousedown', (e) => {
            if (!isImageLoaded) return;
            const rect = imgContainer.getBoundingClientRect();
            const x = e.clientX - rect.left;
            const y = e.clientY - rect.top;
            const col = Math.floor(x / ICON_SIZE);
            const row = Math.floor(y / ICON_SIZE);
            if (col < COLS) {
                const id = (row * COLS) + col;
                highlightIcon(id, false);
            }
        });

        function handleSearch() {
            const id = parseInt(searchInput.value);
            if (!isNaN(id) && id >= 0) highlightIcon(id, true);
        }

        btnSearch.addEventListener('click', handleSearch);
        searchInput.addEventListener('keypress', (e) => { if (e.key === 'Enter') handleSearch(); });

        function copyToClipboard(text) {
            navigator.clipboard.writeText(text).then(() => {
                toast.style.opacity = 1;
                setTimeout(() => { toast.style.opacity = 0; }, 1000);
            });
        }


回复

使用道具 举报

经验  26%

会员等级

积分信息
金币:12
金钱:1000
钻石:0
活跃:12
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1646 发表于 2026-5-24 11:39:25 | 显示全部楼层
不错不错!就是喜欢这种花花绿绿的图标!
回复

使用道具 举报

经验  2%

会员等级

积分信息
金币:1
金钱:1000
钻石:0
活跃:2
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1664 发表于 2026-5-30 22:07:40 | 显示全部楼层
这么强!???
回复

使用道具 举报

经验  78%

会员等级

积分信息
金币:0
金钱:1000
钻石:0
活跃:14
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1663 发表于 2026-6-2 11:24:01 | 显示全部楼层
这个可以
回复

使用道具 举报

经验  6%

会员等级

积分信息
金币:3
金钱:1000
钻石:0
活跃:2
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1675 发表于 2026-6-7 04:23:36 | 显示全部楼层
强,非常需要这个,使我的RPG旋转
回复

使用道具 举报

经验  20%

会员等级

积分信息
金币:8
金钱:1000
钻石:0
活跃:6
发电:0

荣誉勋章

TA的灵将

Rank: 1

 UID: 1677 发表于 2026-6-16 23:44:12 | 显示全部楼层
新手瞻仰大佬!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入民族

本版积分规则

论坛用工具

蓝凑云 hello图床 聚合图床 TinyPNG remove 代码测试 颜色代码 颜色编写

Powered by Discuz! Comsenz Inc.

© 本站成立于2022-11-17

实用工具

AI人工智能图片放大 图片无损放大 百宝箱 孟坤工具箱 在线压缩图片 RPG游戏展

您一共访问了本站 加载中... 次

Archiver|小黑屋|RPG民族

GMT+8, 2026-11-29 15:33 , Processed in 0.551276 second(s), 78 queries .

快速回复 返回顶部 返回列表