Skip to content

Commit

Permalink
Support for button_color (green, red, blue)
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Dec 5, 2024
1 parent c5e114d commit d8b6b74
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions templates/tibiacom/buttons.base.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{% apply spaceless %}
<div class="BigButton" style="background-image:url({{ template_path }}/images/global/buttons/button_blue.gif)">

{% set tmp_image = 'sbutton' %}

{% if button_color is defined %}
{% if button_color == 'green' %}
{% set tmp_image = 'sbutton_green' %}
{% elseif button_color == 'red' %}
{% set tmp_image = 'sbutton_red' %}
{% endif %}
{% endif %}

<div class="BigButton" style="background-image:url({{ template_path }}/images/global/buttons/{{ tmp_image }}.gif)">
<div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);">
<div class="BigButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/{% if button_color is defined and button_color == 'green' %}button_green{% else %}button_blue_over{% endif %}.gif);" ></div>
<div class="BigButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/{{ tmp_image }}_over.gif);" ></div>
<input class="BigButtonText" type="submit" value="{{ button_name }}">
</div>
</div>
Expand Down

0 comments on commit d8b6b74

Please sign in to comment.