Skip to content

Commit

Permalink
GUIFlash v0.2.8
Browse files Browse the repository at this point in the history
v0.2.8
  • Loading branch information
GambitER committed Apr 24, 2019
1 parent 41bd285 commit 47ef46d
Show file tree
Hide file tree
Showing 28 changed files with 256 additions and 140 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 GambitER
Copyright (c) 2017 Vlad

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Binary file removed gambiter.guiflash_0.2.5.wotmod
Binary file not shown.
Binary file added gambiter.guiflash_0.2.8.wotmod
Binary file not shown.
2 changes: 1 addition & 1 deletion meta.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<root>
<id>gambiter.guiflash</id>
<version>0.2.5</version>
<version>0.2.8</version>
<name>GUIFlash</name>
<description>Flash components for use in python mods.</description>
</root>
Binary file modified res/gui/flash/GUIFlash.swf
Binary file not shown.
22 changes: 11 additions & 11 deletions res/gui/flash/as3proj/obj/GUIFlashConfig.old
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'24.12.2017'</value>
<value>'04.04.2019'</value>
</define>
<define append="true">
<name>CONFIG::air</name>
Expand All @@ -34,22 +34,22 @@
<omit-trace-statements>true</omit-trace-statements>
<verbose-stacktraces>false</verbose-stacktraces>
<source-path append="true">
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src</path-element>
<path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
<external-library-path append="true">
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\base_app-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\battle.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common_i18n_library-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_base-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_battle-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_lobby-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\lobby.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\base_app-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\battle.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common_i18n_library-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_base-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_battle-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_lobby-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\lobby.swc</path-element>
</external-library-path>
</compiler>
<file-specs>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src\net\gambiter\FlashUI.as</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src\net\gambiter\FlashUI.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>50</default-frame-rate>
Expand Down
22 changes: 11 additions & 11 deletions res/gui/flash/as3proj/obj/GUIFlashConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'24.12.2017'</value>
<value>'24.04.2019'</value>
</define>
<define append="true">
<name>CONFIG::air</name>
Expand All @@ -34,22 +34,22 @@
<omit-trace-statements>true</omit-trace-statements>
<verbose-stacktraces>false</verbose-stacktraces>
<source-path append="true">
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src</path-element>
<path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
<external-library-path append="true">
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\base_app-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\battle.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common_i18n_library-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_base-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_battle-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_lobby-1.0-SNAPSHOT.swc</path-element>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\lobby.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\base_app-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\battle.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common_i18n_library-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\common-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_base-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_battle-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\gui_lobby-1.0-SNAPSHOT.swc</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\swc\wg\lobby.swc</path-element>
</external-library-path>
</compiler>
<file-specs>
<path-element>C:\Games\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src\net\gambiter\FlashUI.as</path-element>
<path-element>E:\OneDrive\WoT_Mods\GUIFlash\source\res\gui\flash\as3proj\src\net\gambiter\FlashUI.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>50</default-frame-rate>
Expand Down
52 changes: 36 additions & 16 deletions res/gui/flash/as3proj/src/net/gambiter/FlashUI.as
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,27 @@

import net.wg.infrastructure.managers.impl.ContainerManagerBase;
import net.wg.gui.components.containers.MainViewContainer;
import net.wg.data.constants.generated.APP_CONTAINERS_NAMES;
import net.wg.infrastructure.base.AbstractView;
import net.wg.data.constants.generated.APP_CONTAINERS_NAMES;

public class FlashUI extends AbstractView
{
private static const SCREEN_WIDTH:Number = 1024;
private static const SCREEN_HEIGHT:Number = 768;

private static const NAME_MAIN:String = "main";

public static var ui:FlashUI;

public var py_log:Function;
public var py_update:Function;

public var showCursor:Boolean;
public var showFullStats:Boolean;
public var showRadialMenu:Boolean;
public var showFullStats:Boolean;
public var showFullStatsQuestProgress:Boolean;

public var screenSize:Object;

private var viewContainer:MainViewContainer;
private var viewPage:DisplayObjectContainer;
Expand All @@ -45,8 +53,11 @@
mouseEnabled = false;

showCursor = false;
showFullStats = false;
showRadialMenu = false;
showFullStats = false;
showFullStatsQuestProgress = false;

screenSize = {width: SCREEN_WIDTH, height: SCREEN_HEIGHT};
}

override protected function onPopulate():void
Expand All @@ -58,7 +69,7 @@
parent.removeChild(this);
viewContainer = (App.containerMgr as ContainerManagerBase).containersMap[APP_CONTAINERS_NAMES.VIEWS];
viewContainer.setFocusedView(viewContainer.getTopmostView());
viewPage = viewContainer.getChildByName("main") as DisplayObjectContainer;
viewPage = viewContainer.getChildByName(NAME_MAIN) as DisplayObjectContainer;
}
catch (error:Error)
{
Expand All @@ -71,40 +82,49 @@
super.onDispose();
}

public function as_resize(screenWidth:Number, screenHeight:Number):void
{
screenSize = {width: screenWidth, height: screenHeight};
for (var alias:String in components) components[alias].updatePosition();
}

public function as_cursor(arg:Boolean):void
{
if (arg != showCursor) showCursor = arg;
if (showCursor)
null; // App.cursor.loader.hitTestObject / App.cursor.loader.hitTestPoint
else
for (var alias:String in components) components[alias].hideCursor();
if (!showCursor) for (var alias:String in components) components[alias].hideCursor();
}

public function as_fullStats(arg:Boolean):void
public function as_radialMenu(arg:Boolean):void
{
if (arg != showFullStats) showFullStats = arg;
if (arg != showRadialMenu) showRadialMenu = arg;
for (var alias:String in components) components[alias].updateVisible();
}

public function as_radialMenu(arg:Boolean):void
public function as_fullStats(arg:Boolean):void
{
if (arg != showRadialMenu) showRadialMenu = arg;
if (arg != showFullStats) showFullStats = arg;
for (var alias:String in components) components[alias].updateVisible();
}

public function as_fullStatsQuestProgress(arg:Boolean):void
{
if (arg != showFullStatsQuestProgress) showFullStatsQuestProgress = arg;
for (var alias:String in components) components[alias].updateVisible();
}

public function as_create(alias:String, type:String, props:Object):void
{
if (viewPage) this.createComponent(alias, type, props);
if (viewPage) createComponent(alias, type, props);
}

public function as_update(alias:String, props:Object):void
{
if (viewPage) this.updateComponent(alias, props);
if (viewPage) updateComponent(alias, props);
}

public function as_delete(alias:String):void
{
if (viewPage) this.deleteComponent(alias);
if (viewPage) deleteComponent(alias);
}

private function createComponent(alias:String, type:String, props:Object):void
Expand All @@ -113,7 +133,7 @@
{
var _path:Array = alias.split(".");
var _name:String = _path.pop();
var _container:DisplayObjectContainer = Properties.getComponentByPath(viewPage, _path) as DisplayObjectContainer;
var _container:DisplayObjectContainer = Properties.getComponentByPath(viewPage, _path) as DisplayObjectContainer;

if (!components.hasOwnProperty(alias) && _container && !_container.getChildByName(_name))
{
Expand Down
4 changes: 3 additions & 1 deletion res/gui/flash/as3proj/src/net/gambiter/components/LabelEx.as
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

public class LabelEx extends UIComponentEx
{
public static const NAME_FONT:String = "$UniversCondC";

private var textField:TextField;

private var _text:String;
Expand Down Expand Up @@ -50,7 +52,7 @@
textField.autoSize = TextFieldAutoSize.LEFT;
textField.antiAliasType = AntiAliasType.ADVANCED;

textField.defaultTextFormat = new TextFormat("$UniversCondC", 12, 0xFFFFFF, false, false, false, "", "", "left", 0, 0, 0, 0);
textField.defaultTextFormat = new TextFormat(NAME_FONT, 12, 0xFFFFFF, false, false, false, "", "", "left", 0, 0, 0, 0);
Properties.setShadow(textField, {"distance": 4, "angle": 45, "color": 0x999999, "alpha": 1, "blurX": 4, "blurY": 4, "strength": 1, "quality": 1});
}

Expand Down
13 changes: 6 additions & 7 deletions res/gui/flash/as3proj/src/net/gambiter/core/UIBorderEx.as
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package net.gambiter.core
{
import flash.display.Shape;
import flash.display.DisplayObject;
import flash.geom.Rectangle;
import flash.display.Shape;
import flash.display.DisplayObject;

public class UIBorderEx extends Shape
{
Expand All @@ -14,8 +14,7 @@
super();

visible = false;
_rect = new Rectangle(0, 0, 0, 0);

_rect = new Rectangle(0, 0, 0, 0);
}

private function draw():void
Expand All @@ -29,7 +28,7 @@

public function show():void
{
if (obj) _rect = obj.getRect(obj);
if (_obj) _rect = _obj.getRect(_obj);
draw();
visible = true;
}
Expand All @@ -38,12 +37,12 @@
{
graphics.clear();
visible = false;
}
}

public function update(_x_:Number, _y_:Number, _w_:Number, _h_:Number):void
{
_rect = new Rectangle(_x_, _y_, _w_, _h_);
}
}

public function get obj():DisplayObject
{
Expand Down
Loading

0 comments on commit 47ef46d

Please sign in to comment.