mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-10 19:32:33 +00:00
Added Raw editor - Edit blend modes as enum
This commit is contained in:
@@ -24,6 +24,7 @@ import com.jpexs.decompiler.flash.amf.amf3.Amf3Value;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSourceContainer;
|
||||
import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.BlendMode;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONS;
|
||||
import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA;
|
||||
@@ -31,6 +32,7 @@ import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Conditional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.EnumValue;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
@@ -196,6 +198,21 @@ public class PlaceObject3Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
*/
|
||||
@SWFType(BasicType.UI8)
|
||||
@Conditional("placeFlagHasBlendMode")
|
||||
@EnumValue(value = 0, text = "normal")
|
||||
@EnumValue(value = BlendMode.NORMAL, text = "normal")
|
||||
@EnumValue(value = BlendMode.LAYER, text = "layer")
|
||||
@EnumValue(value = BlendMode.MULTIPLY, text = "multiply")
|
||||
@EnumValue(value = BlendMode.SCREEN, text = "screen")
|
||||
@EnumValue(value = BlendMode.LIGHTEN, text = "lighten")
|
||||
@EnumValue(value = BlendMode.DARKEN, text = "darken")
|
||||
@EnumValue(value = BlendMode.DIFFERENCE, text = "difference")
|
||||
@EnumValue(value = BlendMode.ADD, text = "add")
|
||||
@EnumValue(value = BlendMode.SUBTRACT, text = "subtract")
|
||||
@EnumValue(value = BlendMode.INVERT, text = "invert")
|
||||
@EnumValue(value = BlendMode.ALPHA, text = "alpha")
|
||||
@EnumValue(value = BlendMode.ERASE, text = "erase")
|
||||
@EnumValue(value = BlendMode.OVERLAY, text = "overlay")
|
||||
@EnumValue(value = BlendMode.HARDLIGHT, text = "hardlight")
|
||||
public int blendMode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jpexs.decompiler.flash.amf.amf3.NoSerializerExistsException;
|
||||
import com.jpexs.decompiler.flash.tags.base.ASMSourceContainer;
|
||||
import com.jpexs.decompiler.flash.tags.base.PlaceObjectTypeTag;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.BlendMode;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD;
|
||||
import com.jpexs.decompiler.flash.types.CLIPACTIONS;
|
||||
import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA;
|
||||
@@ -32,6 +33,7 @@ import com.jpexs.decompiler.flash.types.ColorTransform;
|
||||
import com.jpexs.decompiler.flash.types.MATRIX;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Conditional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.EnumValue;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
@@ -199,6 +201,21 @@ public class PlaceObject4Tag extends PlaceObjectTypeTag implements ASMSourceCont
|
||||
*/
|
||||
@SWFType(BasicType.UI8)
|
||||
@Conditional("placeFlagHasBlendMode")
|
||||
@EnumValue(value = 0, text = "normal")
|
||||
@EnumValue(value = BlendMode.NORMAL, text = "normal")
|
||||
@EnumValue(value = BlendMode.LAYER, text = "layer")
|
||||
@EnumValue(value = BlendMode.MULTIPLY, text = "multiply")
|
||||
@EnumValue(value = BlendMode.SCREEN, text = "screen")
|
||||
@EnumValue(value = BlendMode.LIGHTEN, text = "lighten")
|
||||
@EnumValue(value = BlendMode.DARKEN, text = "darken")
|
||||
@EnumValue(value = BlendMode.DIFFERENCE, text = "difference")
|
||||
@EnumValue(value = BlendMode.ADD, text = "add")
|
||||
@EnumValue(value = BlendMode.SUBTRACT, text = "subtract")
|
||||
@EnumValue(value = BlendMode.INVERT, text = "invert")
|
||||
@EnumValue(value = BlendMode.ALPHA, text = "alpha")
|
||||
@EnumValue(value = BlendMode.ERASE, text = "erase")
|
||||
@EnumValue(value = BlendMode.OVERLAY, text = "overlay")
|
||||
@EnumValue(value = BlendMode.HARDLIGHT, text = "hardlight")
|
||||
public int blendMode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ButtonTag;
|
||||
import com.jpexs.decompiler.flash.treeitems.TreeItem;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Conditional;
|
||||
import com.jpexs.decompiler.flash.types.annotations.EnumValue;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Reserved;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
|
||||
@@ -107,6 +108,21 @@ public class BUTTONRECORD implements Serializable, TreeItem, HasSwfAndTag, HasCh
|
||||
*/
|
||||
@SWFType(BasicType.UI8)
|
||||
@Conditional(value = {"buttonHasBlendMode"}, tags = {DefineButton2Tag.ID})
|
||||
@EnumValue(value = 0, text = "normal")
|
||||
@EnumValue(value = BlendMode.NORMAL, text = "normal")
|
||||
@EnumValue(value = BlendMode.LAYER, text = "layer")
|
||||
@EnumValue(value = BlendMode.MULTIPLY, text = "multiply")
|
||||
@EnumValue(value = BlendMode.SCREEN, text = "screen")
|
||||
@EnumValue(value = BlendMode.LIGHTEN, text = "lighten")
|
||||
@EnumValue(value = BlendMode.DARKEN, text = "darken")
|
||||
@EnumValue(value = BlendMode.DIFFERENCE, text = "difference")
|
||||
@EnumValue(value = BlendMode.ADD, text = "add")
|
||||
@EnumValue(value = BlendMode.SUBTRACT, text = "subtract")
|
||||
@EnumValue(value = BlendMode.INVERT, text = "invert")
|
||||
@EnumValue(value = BlendMode.ALPHA, text = "alpha")
|
||||
@EnumValue(value = BlendMode.ERASE, text = "erase")
|
||||
@EnumValue(value = BlendMode.OVERLAY, text = "overlay")
|
||||
@EnumValue(value = BlendMode.HARDLIGHT, text = "hardlight")
|
||||
public int blendMode;
|
||||
|
||||
@Internal
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2022 JPEXS, All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.types;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class BlendMode {
|
||||
public static final int NORMAL = 1;
|
||||
public static final int LAYER = 2;
|
||||
public static final int MULTIPLY = 3;
|
||||
public static final int SCREEN = 4;
|
||||
public static final int LIGHTEN = 5;
|
||||
public static final int DARKEN = 6;
|
||||
public static final int DIFFERENCE = 7;
|
||||
public static final int ADD = 8;
|
||||
public static final int SUBTRACT = 9;
|
||||
public static final int INVERT = 10;
|
||||
public static final int ALPHA = 11;
|
||||
public static final int ERASE = 12;
|
||||
public static final int OVERLAY = 13;
|
||||
public static final int HARDLIGHT = 14;
|
||||
}
|
||||
Reference in New Issue
Block a user