Skip to content

Commit

Permalink
using datasource instead of extra variable
Browse files Browse the repository at this point in the history
im thinking of using a build macro to create a "safeSelectedItem" field to Dropdowns, which just do "dataSource.get(selectedIndex)"
  • Loading branch information
lemz1 committed Nov 20, 2024
1 parent 76c3eb2 commit e1ee1ee
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,12 @@ private class AddRankAnimationDataBox extends HBox
')
private class RankAnimationData extends VBox
{
var animRenderTypeValue:String = "sparrow";

public var animData(get, never):PlayerResultsAnimationData;

function get_animData():PlayerResultsAnimationData
{
return {
renderType: animRenderTypeValue,
renderType: animRenderType.dataSource.get(animRenderType.selectedIndex),
assetPath: animAssetPath.text,
offsets: [animOffsetX.value, animOffsetY.value],
zIndex: animZIndex.value,
Expand Down Expand Up @@ -345,7 +343,6 @@ private class RankAnimationData extends VBox
if (data != null)
{
animRenderType.selectedIndex = data.renderType == "sparrow" ? 1 : 0;
animRenderTypeValue = data.renderType;
animAssetPath.value = data.assetPath;

if (data.offsets != null)
Expand Down

0 comments on commit e1ee1ee

Please sign in to comment.