-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings UI #21
Comments
Development branch: |
- Window is opened in lobby with F10 key.
For master branch's building instructions see: In addition you need to install Adobe Flex 4.6 SDK. You can download it from here: When done, provide path to Flex SDK's MXMLC compiler:
Adjust the path to match your environment.
|
You can now print debug messages from the ActionScript code to python.log using functions from DebugUtils package:
There is a few gotchas though:
|
- Added fake modules that enable imports which the new window functionality depends on.
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: 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. |
Would be nice to integrate the mod with this: 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. |
- Providing libraries is not mandatory anymore. - Added debug switch. - Added static-link-runtime-shared-libraries switch. - MXMLC does not accept multiple AS-files, so input file list is not a list anymore.
….py. For this to work user needs to configure path to web browser, e.g.: make.py configure --webbrowser="C:\Program Files (x86)\Mozilla Firefox\firefox.exe" Then execute: make.py preview_settingsui
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:
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.:
Then execute:
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. |
The example contains: - as_setSettings() method at AS3 side which is called from Python to set initial values to the UI, - onOkClicked() and onCancelClicked() methods at Python side which are called from AS3 when user clicks buttons in the UI.
I have merged the issue_21 feature branch to master. Development continues there for now. |
Features needed:
Ideas how to implement the UI:
http server integrated into mod and then displaying html content in in-game web browserSettings in TeamSpeak pluginFurther ideas for Flash based UI:
The text was updated successfully, but these errors were encountered: