本帖最后由 1170888181 于 2013-8-24 22:25 编辑
·配置函数 ·setcolor(设置颜色) 设置AROMA Installer配色方案,它也可以通过theme.prop文件定义。
语法: setcolor(colorname, hexcolor);
参数: •colorname – 设置的颜色名称,渐变色名称中含有“_g”。 •winbg, winbg_g : 主要/最上面窗口背景 •winfg : 主要/最上面文字前景 •winfg_gray : 主要/最上面灰色文字前景 •dialogbg, dialogbg_g : 弹窗背景 (Alert, Confirm, About) •dialogfg : 弹窗文字前景 •textbg, textbg_g : Textbox, Checkbox及任何可滚动界面背景 •textfg : Textbox, Checkbox及任何可滚动界面文字前景 •textfg_gray : 灰色文字 (Optionbox/Checkbox 项目描述) •controlbg, controlbg_g : Control(控件) / Button(按钮) / Checkbox border (复选框边界)- 背景色 •controlfg : 按钮文字颜色 •selectbg, selectbg_g :选中元素的背景(忙碌?/焦点/按钮/条目等) •selectfg : 选中元素的文本/前景色 •titlebg, titlebg_g : 窗口标题背景 •titlefg :窗口标题文本前景色 •navbg, navbg_g : 底栏 (导航栏)背景,下一个-前一个区域 •scrollbar : 滚动指示条颜色 •border, border_g : 普通边界颜色 •progressglow : 进度条动画颜色 •hexcolor – 16进制RGB颜色。它支持以#字开头的3和6位16进制字符,例如"#a8e" or "#ff5599" 。
示例: # Set Color with 3 chars hexcolor setcolor("winbg", "#444"); setcolor("winbg_g", "#222"); setcolor("textbg", "#333"); setcolor("textfg", "#fff");
# Set Color with 6 chars hexcolor setcolor("textfg_gray", "#bbbbbb"); setcolor("controlbg", "#446699"); setcolor("controlbg_g", "#223355");
·ini_set 设置AROMA Installer配置选择的值。
语法: setcolor(configname, newvalue);
参数: •configname – 设置的配置名称。 •roundsize : 设置普通控件圆角矩形圆角的大小 (默认:"3") •button_roundsize: 设置按钮控件圆角矩形圆角的大小 (默认:"2") •window_roundsize : 设置主窗口圆角矩形圆角的大小 (默认:"4") •transition_frame : 设置过渡帧的数量(默认:"5") •text_ok : 设置OK键文字 (默认:"OK") •text_next : 设置Next键文字 (默认:"Next >") •text_back : 设置Back键文字 (默认:"< Back") •text_yes : 设置默认Yes键文字 (默认:"Yes") •text_no : 设置默认No键文字 (默认:"No") •text_about : 设置About菜单文字 (默认:"About & Informations") •text_calibrating : 设置校准菜单文字 (默认:"Calibrating Tools") •text_quit : 设置退出菜单文字 (默认:"Quit Installation") •text_quit_msg :设置退出配置信息(默认:"Are you sure to quit the Installer?") •rom_name : 设置ROM名称信息 •rom_version : 设置ROM版本信息 •rom_author : 设置ROM作者信息 •rom_device : 设置ROM设备信息 •customkeycode_up : 设置向上键功能(导航键上) •customkeycode_down : 设置向下键功能(导航键下) •customkeycode_select : 设置选择键功能 (选择一个条目) •customkeycode_back : 设置返回键功能 •customkeycode_menu : 设置菜单键功能 •newvalue – 配置名称的新值
示例: # Set ROM Informations ini_set("rom_name", "AROMA ROM"); ini_set("rom_version", "1.0"); ini_set("rom_author", "amarullz"); ini_set("rom_device", "HTC Desire (bravo)");
# Set Custom Text ini_set("text_ok", "OK Man"); ini_set("text_next", ">>"); ini_set("text_back", "<<");
# Set Alternative Key Code - You can use keycapture tool # to capture your device keycode ini_set("customkeycode_up", "115"); ini_set("customkeycode_down", "114"); ini_set("customkeycode_select", "116"); ini_set("customkeycode_menu", "229"); ini_set("customkeycode_back", "158");
·calibrate(校准) 设置触摸屏校准数据。不同的设备可能有不同的触摸屏校准数据,为了获得校准数据,按menu,选择校准工具然后按 提示操作。
语法: calibrate(divx, addx, divy, addy [, alternative_method]);
参数: •divx – 横向触摸屏分辨率 •addx – 水平调整附加值 •divy – 纵向触摸屏分辨率 •addy – 垂直调整附加值 •alternative_method [可选] – 如果普通方法不适用的替代方法(默认:"no")
示例: # HTC Desire Calibrated Data calibrate("7.90","20","7.90","20");
# Alternative method Calibrated Data calibration("1.8447", "37", "1.2158", "27", "yes");
链接:http://pan.baidu.com/share/link? ... 78&uk=806042278 密码:9vub
|