Jump to content
Korean Random
SV_Kirov

Как создать форму(Окно) в ангаре

Recommended Posts

Самопальное окно - это MovieClip. Он скорее всего находится в swf-файле курсора, чтобы не терялась совместимость с модами. В таком случае есть 2 пути:

Cursor.swf->fla->AdobeFlashCS4->Cursor.swf

или *.as inject в swf с помощью FlashDevelop.(способ темой выше от хлебнидизелечку)

А пример можно? В идеале, мне нужно вызвать уже существующее окно.

Share this post


Link to post

Short link
Share on other sites

I am following this thread with much interest, but I have one question:

 


И не забываем подключить внешнюю библиотеку wg.swc, собранную в XFW
 

 

How do I get a wg.swc? I know it is possible to "build" one, but: How?

Share this post


Link to post

Short link
Share on other sites

I am following this thread with much interest, but I have one question:

How do I get a wg.swc? I know it is possible to "build" one, but: How?

https://bitbucket.org/XVM/xfw/src/053a421249a30a112fd706cfbbe9db170ea9d8fb/src/actionscript/?at=default

Или возьмите здесь: wg.zip

Edited by ShadowHunterRUS
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Another question: I managed to get Buttons and Checkboxes to work and sending results back to python. Fine to this point. But how can I add dropdown-menus and radiobuttons?

 

This:

 

    this.ddownMenu = (this as UIComponent).addChild(App.utils.classFactory.getComponent("DropdownMenu", DropdownMenu, {
    x: 10,
    y: 100,
    width: 200 } )) as DropdownMenu;

adds an empty dropdown-menu, but how do I add values?

Share this post


Link to post

Short link
Share on other sites

Another question: I managed to get Buttons and Checkboxes to work and sending results back to python. Fine to this point. But how can I add dropdown-menus and radiobuttons?

This adds an empty dropdown-menu, but how do I add values?

import scaleform.clik.data.DataProvider;
var data : Array = new Array();

data.push({"label":"Item 1"});
data.push({"label":"Item 2"});

var dataProv : DataProvider = new DataProvider(data);

ddownMenu = addChild(App.utils.classFactory.getComponent("DropdownMenu", DropdownMenu, {
    x: 10,
    y: 340,
    width: 200,
    itemRenderer: "DropDownListItemRendererSound",
    dropdown: "DropdownMenu_ScrollingList",
    menuRowCount: dataProv.length,
    dataProvider: dataProv,
    selectedIndex: 0
})) as DropdownMenu;
post-16296-0-88081100-1435941623_thumb.jpg

 

radiobuttons?

private var radioButton_1 : RadioButton;
private var radioButton_2 : RadioButton;
radioButton_1 = addChild(App.utils.classFactory.getComponent("RadioButton", RadioButton, {
    x: 10,
    y: 10,
    label: "radioButton 1",
    groupName: "group1",
    selected: true
})) as RadioButton;

radioButton_2 = addChild(App.utils.classFactory.getComponent("RadioButton", RadioButton, {
    x: 10,
    y: 40,
    label: "radioButton 2",
    groupName: "group1"
})) as RadioButton;
post-16296-0-69511500-1435946522_thumb.jpg Edited by ShadowHunterRUS
  • Upvote 3

Share this post


Link to post

Short link
Share on other sites

Sorry,

 a clickable link in html.text.field

public var openURL:Function = null;
public function handleLinkClick(url_link:TextEvent) : void
{
   this.openURL(url_link.text);
}
this.textFieldTest.htmlText = "<a href=\"event:http://worldoftanks.com/\"><font color=\"#FFFFFF\"><u>TANKS</u></font></a>";
this.textFieldTest.addEventListener(TextEvent.LINK, this.handleLinkClick);
В файле TestWindow.py добавим import BigWorld

Также к классу TestWindow добавим метод

def openURL(self, url):
    BigWorld.wg_openWebBrowser(url)
post-16296-0-18702700-1436193310_thumb.jpg Edited by ShadowHunterRUS
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

o.k. 

 

http://www.koreanrandom.com/forum/topic/22719-как-сделать-ссылку-в-центре-уведомлений-кликаб/?p=265852
 

this.textFieldTest.htmlText = "<a vlink=\"#800080\" alink=\"#FF0000\" vcolor=\"#0000FF\" href=\"event:http://worldoftanks.com/\">TANKS</a>";

I had already tried but not working. but I try again

Share this post


Link to post

Short link
Share on other sites
scrollBar:"ScrollBar"

 

Большое спасибо за вашу помощь!

 

The code above adds a scrollbar, indeed. (Tried "Scrollbar" before, didn't work....)

I get working up- and down-buttons, but trying to move the small slider-button just moves to top of list.

Forgot something?

Share this post


Link to post

Short link
Share on other sites

The code above adds a scrollbar, indeed. (Tried "Scrollbar" before, didn't work....) I get working up- and down-buttons, but trying to move the small slider-button just moves to top of list. Forgot something?

It's old bug feature in WoT Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites
public var openURL:Function = null;
public function handleLinkClick(url_link:TextEvent) : void
{
   this.openURL(url_link.text);
}
this.textFieldTest.htmlText = "<a href=\"event:http://worldoftanks.com/\"><font color=\"#FFFFFF\"><u>TANKS</u></font></a>";
this.textFieldTest.addEventListener(TextEvent.LINK, this.handleLinkClick);
В файле TestWindow.py добавим import BigWorld

Также к классу TestWindow добавим метод

def openURL(self, url):
    BigWorld.wg_openWebBrowser(url)
attachicon.gifshot_177.jpg

 

А я себе голову ломаю как открыть ссылку. Спасибо.

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...