jhakonen / wot-teamspeak-mod

Mod for integrating TeamSpeak into World of Tanks
GNU Lesser General Public License v2.1
36 stars 8 forks source link

Settings UI #21

Open jhakonen opened 8 years ago

jhakonen commented 8 years ago

Features needed:

Ideas how to implement the UI:

Further ideas for Flash based UI:

jhakonen commented 8 years ago

Development branch: https://github.com/jhakonen/wot-teamspeak-mod/tree/issue_21

jhakonen commented 8 years ago

For master branch's building instructions see: https://github.com/jhakonen/wot-teamspeak-mod/wiki/Development-and-tests

In addition you need to install Adobe Flex 4.6 SDK. You can download it from here: https://www.adobe.com/devnet/flex/flex-sdk-download.html

When done, provide path to Flex SDK's MXMLC compiler:

make.py configure --mxmlc="E:\Programs\FlexSDK\bin\mxmlc.exe"

Adjust the path to match your environment. Building and testing happens, as always, with e.g. command:

make.py --exclude-tags=tsplugin clean install tail
jhakonen commented 8 years ago

You can now print debug messages from the ActionScript code to python.log using functions from DebugUtils package:

There is a few gotchas though:

jhakonen commented 8 years ago

So, I've been lately learning to write ActionScript 3, reading WoT's AS code, reading forums and based on those managed to add a few elements to the settings window:

There is a text label there as well, but the text color is black so it is kinda difficult to see from the dark background.

How to add the buttons I found from ShadowHunterRUS's nice guide: http://www.koreanrandom.com/forum/topic/25477-как-создать-формуокно-в-ангаре/?p=279913

I also wrote a small test tool which allows previewing the Settings UI's SWF-file in browser:

While it doesn't look the same; no window borders, white background; it does show the same elements at same locations in same style. And it loads up much faster than the game would!

I'll add sources, binaries and instructions how to use use them later.

jhakonen commented 8 years ago

Would be nice to integrate the mod with this: https://bitbucket.org/P0LIR0ID/modslist/src/

I'm unsure how that is supposed to be distributed. Is it a separate mod? Or is it kind of a library that is supposed to be included in our mod?

If it is a separate mod then we would still need a fallback solution if user don't have that mod installed. That is, our own button in garage.

jhakonen commented 8 years ago

Well, I ended up making the preview tool better :)

Improvements I have done:

The tool is integrated also to make.py. Building of the tool is done just like previously with build command:

make.py --exclude-tags=tsplugin build

In order to open the tool to web browser you need to first configure a path to some browser you wish to use, e.g.:

make.py configure --webbrowser="C:\Program Files (x86)\Mozilla Firefox\firefox.exe"

Then execute:

make.py preview_settingsui

This command will open the preview tool to your web browser with the "SWF file path" set to point to the location where the SettingsUI.swf was build to.

jhakonen commented 8 years ago

Got DAAPI communication to work:

That JSON data is created at Python code and then passed through to the AS3 UI.

Clicking the Ok / Cancel buttons cause click handler methods in the Python side to be called.

See the commit for details.

jhakonen commented 7 years ago

I have merged the issue_21 feature branch to master. Development continues there for now.