Skip to content

Commit

Permalink
Fix pass script events to rectangle and quarter circle component
Browse files Browse the repository at this point in the history
  • Loading branch information
araszka committed Jun 8, 2024
1 parent 7d8e2e0 commit 65a0a78
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/EvoSC.Manialinks/Templates/Controls/Button.mt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
radius='{{ style == "normal" ? 0.5 : Theme.UI_Button_Size(size, height)/2 }}'
color='{{ disabled ? Theme.UI_Button_Disabled_Bg : Theme.UI_Button_Bg(type) }}'
quadrant="TopLeft"
scriptEvents="{{ disabled ? 0 : 1 }}"
scriptevents="{{ !disabled }}"
data-id="{{ id }}"
/>

Expand All @@ -104,7 +104,7 @@
color='{{ disabled ? Theme.UI_Button_Disabled_Bg : Theme.UI_Button_Bg(type) }}'
quadrant="TopRight"
x='{{ width-(style == "normal" ? 0.5 : Theme.UI_Button_Size(size, height)/2) }}'
scriptEvents="{{ disabled ? 0 : 1 }}"
scriptevents="{{ !disabled }}"
data-id="{{ id }}"
/>

Expand All @@ -114,7 +114,7 @@
color='{{ disabled ? Theme.UI_Button_Disabled_Bg : Theme.UI_Button_Bg(type) }}'
quadrant="BottomLeft"
y='{{ -Theme.UI_Button_Size(size, height)+(style == "normal" ? 0.5 : Theme.UI_Button_Size(size, height)/2) }}'
scriptEvents="{{ disabled ? 0 : 1 }}"
scriptevents="{{ !disabled }}"
data-id="{{ id }}"
/>

Expand All @@ -125,7 +125,7 @@
quadrant="BottomRight"
x='{{ width-(style == "normal" ? 0.5 : Theme.UI_Button_Size(size, height)/2) }}'
y='{{ -Theme.UI_Button_Size(size, height)+(style == "normal" ? 0.5 : Theme.UI_Button_Size(size, height)/2) }}'
scriptEvents="{{ disabled ? 0 : 1 }}"
scriptevents="{{ !disabled }}"
data-id="{{ id }}"
/>

Expand Down
10 changes: 5 additions & 5 deletions src/EvoSC.Manialinks/Templates/Drawing/QuarterCircle.mt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Draws a quarter of a circle from different quadrants.
<property type="string" name="color" />

<!-- Enable/disable script events for the quarter -->
<property type="bool" name="scriptEvents" default="false" />
<property type="bool" name="scriptevents" default="false" />

<!-- Action to trigger when mouse is clicked on the quarter -->
<property type="string" name="action" default="" />
Expand All @@ -36,7 +36,7 @@ Draws a quarter of a circle from different quadrants.
if='quadrant == "TopLeft"'
opacity="{{ Util.ColorOpacity(color) }}"
class="{{ className }}"
scriptevents="{{ scriptEvents ? 1 : 0 }}"
scriptevents="{{ scriptevents ? 1 : 0 }}"
/>

<quad
Expand All @@ -47,7 +47,7 @@ Draws a quarter of a circle from different quadrants.
if='quadrant == "TopRight"'
opacity="{{ Util.ColorOpacity(color) }}"
class="{{ className }}"
scriptevents="{{ scriptEvents ? 1 : 0 }}"
scriptevents="{{ scriptevents ? 1 : 0 }}"
/>

<quad
Expand All @@ -58,7 +58,7 @@ Draws a quarter of a circle from different quadrants.
if='quadrant == "BottomLeft"'
opacity="{{ Util.ColorOpacity(color) }}"
class="{{ className }}"
scriptevents="{{ scriptEvents ? 1 : 0 }}"
scriptevents="{{ scriptevents ? 1 : 0 }}"
/>

<quad
Expand All @@ -69,7 +69,7 @@ Draws a quarter of a circle from different quadrants.
if='quadrant == "BottomRight"'
opacity="{{ Util.ColorOpacity(color) }}"
class="{{ className }}"
scriptevents="{{ scriptEvents ? 1 : 0 }}"
scriptevents="{{ scriptevents ? 1 : 0 }}"
/>
</frame>
</template>
Expand Down
8 changes: 4 additions & 4 deletions src/EvoSC.Manialinks/Templates/Drawing/Rectangle.mt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ Draws a rectangle.
>
<frame>
<frame if="cornerRadius > 0">
<QuarterCircle scriptevents="{{ scriptEvents ? 1 : 0 }}" if='Util.HasItem(corners, "TopLeft")' quadrant="TopLeft" radius="{{ cornerRadius }}" x="0" y="0" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents ? 1 : 0 }}" if='Util.HasItem(corners, "TopRight")' quadrant="TopRight" radius="{{ cornerRadius }}" x="{{ width-cornerRadius }}" y="0" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents ? 1 : 0 }}" if='Util.HasItem(corners, "BottomLeft")' quadrant="BottomLeft" radius="{{ cornerRadius }}" x="0" y="-{{ height-cornerRadius }}" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents ? 1 : 0 }}" if='Util.HasItem(corners, "BottomRight")' quadrant="BottomRight" radius="{{ cornerRadius }}" x="{{ width-cornerRadius }}" y="-{{ height-cornerRadius }}" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents }}" if='Util.HasItem(corners, "TopLeft")' quadrant="TopLeft" radius="{{ cornerRadius }}" x="0" y="0" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents }}" if='Util.HasItem(corners, "TopRight")' quadrant="TopRight" radius="{{ cornerRadius }}" x="{{ width-cornerRadius }}" y="0" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents }}" if='Util.HasItem(corners, "BottomLeft")' quadrant="BottomLeft" radius="{{ cornerRadius }}" x="0" y="-{{ height-cornerRadius }}" color="{{ bgColor }}" data-id="{{ dataId }}" />
<QuarterCircle scriptevents="{{ scriptEvents }}" if='Util.HasItem(corners, "BottomRight")' quadrant="BottomRight" radius="{{ cornerRadius }}" x="{{ width-cornerRadius }}" y="-{{ height-cornerRadius }}" color="{{ bgColor }}" data-id="{{ dataId }}" />
</frame>

<!-- Top -->
Expand Down

0 comments on commit 65a0a78

Please sign in to comment.