注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

.

.

 
 
 

日志

 
 

武装突袭2 官方 用户界面编辑器  

2012-01-09 04:26:53|  分类: ARMA2 类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
这个工具是个插件必需下载安装,
这个工具为建立自由的界面做了准备

User Interface Editor (Arma 2)

Contents

[hide]

Installation

Download GUI editor

Download Preview Mission


Copy file stra_gui.pbo into your Arma 2 or Arma 2: OA addons folder.

Running

Place Functions module and during game, execute following code:

[] call BIS_fnc_GUIeditor; 

First steps

  • GUI Editor is transferring data to and from game by copying to clipboard. To load some interface, simply copy it (Ctrl + C) and import it in game using Ctrl + L.
  • Same way, when exporting, result is again copied to clipboard and you can paste it using Ctrl+V anywhere you need.
  • When GUI Editor is started, it automatically tries to load content from clipboard.
  • Custom params (Ctrl + RMB) are params which are exported, but their effects cannot be seen in editor itself.
    • If you define some param which is already set by classic editing (idc, text, position ...), custom param will have larger priority.

Controls

LMB

  • Click and hold over GUI element - Move element
  • Ctrl - Align to grid
  • Alt - Modify size
  • Alt + Shift - Modify size with constant proportions

RMB

  • Click on GUI element - Modify element parameters
  • Ctrl + Click on GUI element - Modify custom element parameters (changes won't be visible)
  • Click on free space - Add a new element

Key Shortcuts

  • H - Help
  • G - Show/hide grid
  • Ctrl + G - Modify grid parameters
  • Alt + G - Create grid on element under cursor
  • Shift + G - Toggle between Absolute and Safezone grid
  • Ctrl + N - Add a new element
  • Delete - Delete a current element
  • Ctrl + C - Copy a current element
  • Ctrl + X - Cut a current element
  • Ctrl + V - Paste a copied element
  • Ctrl + Z - Undo
  • Shift + Ctrl + Z - Redo
  • Ctrl + S - Clipboard Export to GUI editor format
  • Alt + Ctrl + S - Clipboard Export to GUI editor format with linebreaks
  • Shift + Ctrl + S - Clipboard Export to a config format
  • Shift + Ctrl + S + (1-9) - Clipboard Export to a config format with given number of tabs (1-9)
  • Ctrl + L - Clipboard Import from GUI editor format
  • Ctrl + P - Clipboard Export parent classes
  • Shift + Ctrl + P - Clipboard Export grid proportions
  • Ctrl + I - Import from config
  • Space - Highlights all elements (including invisible ones)

Position types

Following variants determine in what format the element position will be saved

  • Absolute - absolute position, remains same no matter what UI size or aspect ratio is.
  • Safezone - GUI elements stretches based both on UI width and height. Result may differ on different aspect ratios.
  • Grid - Position is calculated as multiplier of grid parameters.


Control Panels

  • Workspace

  • Edit Element

  • Edit Element Custom Params

  • Exported Dialog


Export

Editor format

Ctrl + S

Starts with dollar symbol ($). When you copy this format to clipboard, it can be loaded in editor using Ctrl+L

$[1.03,[["safezoneX","safezoneY","safezoneW","safezoneH"],"safezoneW / 32","safezoneH / 20"],[1000,"",[1,"",["0.3125 * safezoneW + safezoneX","0.35 * safezoneH + safezoneY","0.375 * safezoneW","0.3 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],""],[]],[1001,"MyHeader",[1,"Hello World",["0.3125 * safezoneW + safezoneX","0.35 * safezoneH + safezoneY","0.375 * safezoneW","0.05 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],""],["style = ST_CENTER;"]],[1400,"MyEditbox",[1,"",["0.328125 * safezoneW + safezoneX","0.425 * safezoneH + safezoneY","0.34375 * safezoneW","0.15 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],""],["idc = 1234;"]],[1700,"MyButtonOK",[1,"Ok",["0.53125 * safezoneW + safezoneX","0.575 * safezoneH + safezoneY","0.140625 * safezoneW","0.1 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],""],["onButtonClick = |hint ctrltext ((ctrlParent (_this select 0)) displayCtrl 1234);|;"]],[1701,"MyButtonBack",[1,"Cancel",["0.328125 * safezoneW + safezoneX","0.575 * safezoneH + safezoneY","0.140625 * safezoneW","0.1 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],""],["onButtonClick = |((ctrlParent (_this select 0)) closeDisplay 3000);|;"]]] 

Editor format (multi-line)

Alt + Ctrl + S

Ready to be included into config or description file.

/* $[  1.03,  [["safezoneX","safezoneY","safezoneW","safezoneH"],"safezoneW / 32","safezoneH / 20"],  [1000,"",[1,"",["0.3125 * safezoneW + safezoneX","0.35 * safezoneH + safezoneY","0.375 * safezoneW","0.3 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],""],[]],  [1001,"MyHeader",[1,"Hello World",["0.3125 * safezoneW + safezoneX","0.35 * safezoneH + safezoneY","0.375 * safezoneW","0.05 * safezoneH"],[-1,-1,-1,-1],[0,0,0,0.5],[-1,-1,-1,-1],""],["style = ST_CENTER;"]],  [1400,"MyEditbox",[1,"",["0.328125 * safezoneW + safezoneX","0.425 * safezoneH + safezoneY","0.34375 * safezoneW","0.15 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],""],["idc = 1234;"]],  [1700,"MyButtonOK",[1,"Ok",["0.53125 * safezoneW + safezoneX","0.575 * safezoneH + safezoneY","0.140625 * safezoneW","0.1 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],""],["onButtonClick = |hint ctrltext ((ctrlParent (_this select 0)) displayCtrl 1234);|;"]],  [1701,"MyButtonBack",[1,"Cancel",["0.328125 * safezoneW + safezoneX","0.575 * safezoneH + safezoneY","0.140625 * safezoneW","0.1 * safezoneH"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],""],["onButtonClick = |((ctrlParent (_this select 0)) closeDisplay 3000);|;"]] ] */

Config format

Shift + Ctrl + S

class RscText_1000: RscText {  idc = 1000;  x = 0.3125 * safezoneW + safezoneX;  y = 0.35 * safezoneH + safezoneY;  w = 0.375 * safezoneW;  h = 0.3 * safezoneH;  colorBackground[] = {0,0,0,0.5}; }; class MyHeader: RscText {  style = ST_CENTER;   idc = 1001;  text = "Hello World";  x = 0.3125 * safezoneW + safezoneX;  y = 0.35 * safezoneH + safezoneY;  w = 0.375 * safezoneW;  h = 0.05 * safezoneH;  colorBackground[] = {0,0,0,0.5}; }; class MyEditbox: RscEdit {  idc = 1234;   x = 0.328125 * safezoneW + safezoneX;  y = 0.425 * safezoneH + safezoneY;  w = 0.34375 * safezoneW;  h = 0.15 * safezoneH; }; class MyButtonOK: RscShortcutButton {  onButtonClick = "hint ctrltext ((ctrlParent (_this select 0)) displayCtrl 1234);";   idc = 1700;  text = "Ok";  x = 0.53125 * safezoneW + safezoneX;  y = 0.575 * safezoneH + safezoneY;  w = 0.140625 * safezoneW;  h = 0.1 * safezoneH; }; class MyButtonBack: RscShortcutButton {  onButtonClick = "((ctrlParent (_this select 0)) closeDisplay 3000);";   idc = 1701;  text = "Cancel";  x = 0.328125 * safezoneW + safezoneX;  y = 0.575 * safezoneH + safezoneY;  w = 0.140625 * safezoneW;  h = 0.1 * safezoneH; }; 

Disclaimer

This is not an offical addon released or approved by Bohemia Interactive or any of ARMA 2 publishers. Use at your own risk.

As long as it stays free, you can redistribute it or modify it as you wish.



Gaia released the GUI Editor for Arma 2 and Arma 2: Operation Arrowhead on the BI forums.


    Quote Gaia:
    I'm happy to present you ingame tool we're using for internal development for some time. It's simple WYSIWYG editor for Arma 2 and Arma 2: OA user interface.
    It won't do all work for you, you still have to have basic knowledge about how GUI works and where to define it. However, it can really speed up the process of creating and modifying dialogs and resources.
    Instruction how to operate the editor can be found on community wiki.

    I'll appreciate any feedback about bugs and suggestions!

  评论这张
 
阅读(633)| 评论(0)
推荐

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017