krpano之缩略图文本添加

效果:

  在缩略图上添加文本,显示缩略图名称。

方法:将皮肤中的 skin_addthumbs 方法替换为一下代码。

 <action name="skin_addthumbs">
        if(skin_settings.thumbs == false,
        set(layer[skin_btn_thumbs].visible,false);
        ,
        copy(thumbwidth, skin_settings.thumbs_width);
        copy(thumbheight, skin_settings.thumbs_height);
        copy(thumbpadding, skin_settings.thumbs_padding);
        copy(thumbcrop, skin_settings.thumbs_crop);

        add(thumbxoffset, thumbwidth, thumbpadding);
        mul(thumbxcenter, thumbxoffset, 0.5);
        mul(thumbbarwidth, thumbxoffset, scene.count);
        add(thumbbarwidth, thumbpadding);
        add(thumbbarheight, thumbpadding, thumbheight);
        add(thumbbarheight, thumbpadding);

        if(skin_settings.thumbs_scrollindicator,
        copy(layer[skin_thumbs_scrollindicator].y, thumbbarheight);
        add(thumbbarheight, layer[skin_thumbs_scrollindicator].height);
        );

        copy(layer[skin_thumbs].height, thumbbarheight);
        copy(layer[skin_thumbs].width, thumbbarwidth);

        mul(halfheight, thumbbarheight, 0.5);
        copy(layer[skin_thumbs_scrollleft].y, halfheight);
        copy(layer[skin_thumbs_scrollright].y, halfheight);

        set(thumb_cnt,0);
        for(set(i,0), i LT scene.count, inc(i),
        txtadd(thumbname,‘skin_thumb_‘,get(i));
        addlayer(get(thumbname));
        copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
        set(layer[get(thumbname)].keep, true);
        set(layer[get(thumbname)].parent, ‘skin_thumbs‘);
        set(layer[get(thumbname)].align, lefttop);
        copy(layer[get(thumbname)].crop, thumbcrop);
        copy(layer[get(thumbname)].width, thumbwidth);
        copy(layer[get(thumbname)].height, thumbheight);
        mul(thumbx, i, thumbxoffset);
        add(thumbx, thumbpadding);
        copy(layer[get(thumbname)].x, thumbx);
        copy(layer[get(thumbname)].y, thumbpadding);
        add(scene[get(i)].thumbx, thumbx, thumbxcenter);
        copy(scene[get(i)].thumby, thumbpadding);
        set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
        set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); loadscene(get(linkedscene),null,get(skin_settings.loadscene_flags),get(skin_settings.loadscene_blend)); );
        if(skin_settings.tooltips_thumbs,
        set(layer[get(thumbname)].tooltip, get(scene[get(i)].title) );
        layer[get(thumbname)].loadstyle(skin_tooltips);
        );
        <!--  if(skin_settings.thumbs_text,
            txtadd(thumbtext, ‘skin_thumbtext_‘, get(i));
            addlayer(get(thumbtext));
            layer[get(thumbtext)].loadstyle(skin_thumbtext_style);
            set(layer[get(thumbtext)].keep, true);
            set(layer[get(thumbtext)].parent, get(thumbname));
            set(layer[get(thumbtext)].html, get(scene[get(i)].title));
          ); -->
        <!--START:缩略图标题-->
        <!--添加场景标题文字背景层-->
        txtadd(thumbtitlbackename,‘skin_thumb_title_back‘,get(i));
        addlayer(get(thumbtitlbackename));
        copy(layer[get(thumbtitlbackename)].parent, thumbname);
        copy(layer[get(thumbtitlbackename)].width, thumbwidth);
        set(layer[get(thumbtitlbackename)].height, 20);
        copy(layer[get(thumbtitlbackename)].x, 0);
        copy(layer[get(thumbtitlbackename)].y, 30);
        set(layer[get(thumbtitlbackename)].align, "bottom");
        set(layer[get(thumbtitlbackename)].keep, true);
        set(layer[get(thumbtitlbackename)].type, "container");
        set(layer[get(thumbtitlbackename)].bgcolor, "0x000000");
        set(layer[get(thumbtitlbackename)].zorder, 50);
        set(layer[get(thumbtitlbackename)].bgalpha, "0.3");
        <!--添加标题文字层-->
        <!--缩略图上的标题信息删除本段就不在显示了-->
        if(skin_settings.tooltips_thumbs,
        set(layer[get(thumbname)].onhover, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS); );
        );
        <!-- 添加标题文字层 -->
        txtadd(thumbtitlname,‘skin_thumb_title‘,get(i)); addlayer(get(thumbtitlname)); copy(layer[get(thumbtitlname)].parent, thumbtitlbackename); set(layer[get(thumbtitlname)].url, "%SWFPATH%/plugins/textfield.swf"); set(layer[get(thumbtitlname)].align, "center"); set(layer[get(thumbtitlname)].keep, true); copy(layer[get(thumbtitlname)].html, scene[get(i)].title); set(layer[get(thumbtitlname)].zorder, 51); set(layer[get(thumbtitlname)].visible, "true"); set(layer[get(thumbtitlname)].autoheight, "true"); set(layer[get(thumbtitlname)].background, "false"); set(layer[get(thumbtitlname)].border, "false"); set(layer[get(thumbtitlname)].enabled, "true"); set(layer[get(thumbtitlname)].css,"text-align:center; color:#ffffff; font-family:Arial; font-weight:bold; font-size:19px; "); set(layer[get(thumbtitlname)].textshadow, 2);
        <!-- END:缩略图标题 -->

        );
        );

    </action>
时间: 2024-10-05 07:22:23

krpano之缩略图文本添加的相关文章

linux操作系统-给文本添加 &#39; -单引号,一般转成CSV格式时使用

[[email protected] ~]# cat 1.txt1ms2ms3ms4ms5ms [[email protected] ~]# cat 1.txt | awk '{print $1"\047"}'1ms'2ms'3ms'4ms'5ms' [[email protected] ~]# cat 1.txt | awk '{print $1"\047"}' > 2.txt[[email protected] ~]# cat 2.txt1ms'2ms'3

我的Android进阶之旅------&gt; Android为TextView组件中显示的文本添加背景色

通过上一篇文章 我的Android进阶之旅------> Android在TextView中显示图片方法 (地址:http://blog.csdn.net/ouyang_peng/article/details/46916963) 我们学会了在TextView中显示图片的方法,现在我们来学习如何为TextView组件中显示的文本添加背景色.要求完成的样子如图所示: 首先来学习使用BackgroundColorSpan对象设置文字背景色,代码如下: TextView textView=(TextV

css之为文本添加线性渐变和外描边

css之为文本添加线性渐变和外描边  一.效果: 描边:描边+渐变: 二.描边: api:text-stroke 问题:text-stroke的描边是居中描边,无法直接设置外描边 解决:在before中添加文本,设置字体描边,绝对定位在文本下方 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title<

第十章:为文本添加样式

本章内容: 1.选择字体的方法:在样式表中需要的选择器之后输入font-family:name.如:要将body元素的字体换成Geneva的代码:body{font-family:geneva;}.需要注意的是:虽然font-family属性是继承的,但是有几个元素不会继承父元素的字体设置,其中有表单的select.textarea.input 元素.但是可以强制它们继承父元素的字体设置,代码为:input,select,textarea{font-family:inherit;} 2.指定替代

AvalonEdit 对于选定的文本添加前缀和后缀

1: /// <summary> 2: /// 两边追加标志 3: /// </summary> 4: /// <param name="syntax"></param> 5: public void ToggleSymmetricalMarkdownFormatting(string syntax) 6: { 7: int selectionLength = this.textEditor.SelectionLength; 8: int

使用layui富文本添加日志内容,并获取子窗体的富文本内容

效果图 点击内容 已经把值赋值到table td中 点击内容跳到子页面进行展示 -----------------------------------------------------上边是添加项下边修改时注意 function removeHTMLTag(str) { str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白 //str = str.r

批量修改文本添加字符批处理

@echo offset /p before=请输入前面的字符set /p after=请输入后面的字符for /f “delims=” %%i in (1.txt) do (if “%%i”==”” (echo.>>2.txt) else (echo %before%%%i%after%>>2.txt))ren 2.txt 1.txt

krpano之热点样式及文本

修改热点的样式只需要将热点引用的style样式替换即可. 动态样式代码: <style name="skin_hotspotstyle" url="zlqj_hotspot_2.png" crop="0|0|128|112" framewidth="128" frameheight="112" frame="0" lastframe="4" scale=&quo

万彩动画大师丨添加文本的边框功能

添加文本会使动画视频的内容呈现得更加完整,精心的文字编辑和文字边框会提升整个动画视频的视觉美感和质感. 1. 添加文本 在万彩动画大师的[元素工具栏区域]点击第三个图标[文本],接着点击[添加文本],然后会在画布上显示[文本框],在[文本框]内输入文本内容,[文本框]中还包含调节字体的大小.加粗.下划线.位置等功能.如图1添加文本界面所示: 2. 为文本添加边框 首先选中文本,在[元素工具栏区域]的右手边会出现[万彩动画大师文本],接着下拉滚动条至[高级]处,把[不透明度]设置为100%,选择[