Browse Source

Center Action Image

Scarlett Schäfer 2 years ago
parent
commit
8a7b0cd573
1 changed files with 2 additions and 17 deletions
  1. 2 17
      source/util/action.qsps

+ 2 - 17
source/util/action.qsps

@@ -16,7 +16,6 @@ if $ARGS[0] = 'render_action':
 
     temp_action_label_sep_pos = strpos($temp_action_label,'(\|)',1)
     if temp_action_label_sep_pos > 0:
-        !$temp_action_label = REPLACE($temp_action_label,'|','<br/><font style="color:grey;font-style:italic;font-size:70%;">')+'</font>'
         $temp_action_sublabel = MID($temp_action_label,temp_action_label_sep_pos+1)
         $temp_action_label = MID($temp_action_label,1,temp_action_label_sep_pos-1)
         
@@ -30,23 +29,9 @@ if $ARGS[0] = 'render_action':
         $temp_image = ''
         
     else
-        $temp_image = '<img src="media/<<$ARGS[4]>>" style="height:100px;width:100px;object-fit: contain; float:left;"/>'
-        $temp_style += "min-height:100px;"
+        $temp_image = '<img src="media/<<$ARGS[4]>>" style="height:100px;width:100px;display: block;margin-left: auto; margin-right: auto;"/>'
     end
 
-    
-
-    !if ARGS[3] > 0:
-    !    $temp_price = FUNC('util_money','int2readable',ARGS[3])
-    !    if money >= ARGS[3]:
-    !        *P '<center style="margin:0px"><a href="exec:gs ''util_money'',''spend'',<<ARGS[3]>>&<<$temp_action_exec>>" style="<<$temp_style>>"><<$temp_image>><<$temp_action_label>> (<<$temp_price>>)</a></center>'
-    !    else
-    !        *P '<center style="margin:0px"><a style="<<$temp_style>>"><<$temp_image>><<$temp_action_label>> (<<$temp_price>>)</a></center>'
-    !    end
-    !else
-    !    *P '<center style="margin:0px"><a href="exec:<<$temp_action_exec>>" style="<<$temp_style>>"><<$temp_image>><<$temp_action_label>></a></center>'
-    !end
-
     if ARGS[3] > 0:
         $temp_price = FUNC('util_money','int2readable',ARGS[3])
         if money >= ARGS[3]:
@@ -62,7 +47,7 @@ if $ARGS[0] = 'render_action':
         $temp_action_label = '<<$temp_action_label>><br/><font style="color:grey;font-style:italic;font-size:70%;"><<$temp_action_sublabel>></font>'
     end
 
-    $_html = '<center style="margin:0px"><a href="exec:<<$temp_action_exec>>" style="<<$temp_style>>"><<$temp_image>><<$temp_action_label>></a></center>'
+    $_html = '<center style="margin:0px"><a href="exec:<<$temp_action_exec>>" style="<<$temp_style>>"><<$temp_image>><p><<$temp_action_label>></p></a></center>'
 
     if $ARGS[5] = '':
         *P $_html