Hello, I'm actually making a large pannel of buttons next to each others.
I made a trigger that I thought would lighten up the work as there are many icons that I need to setup.
My objective was to determine automaticly the emplacements of icons depending on previous Icons so that they are created next to each other with an offset.
-
Variable - Set AchievementNumber = 1
Dialog - Create an image for dialog AchievementMenuSelectAchievement with the dimensions (75, 75) anchored to Top Left with an offset of (50, 50) setting the tooltip to "" using the image AchievementIcon[AchievementNumber] as a Normal type with tiled set to true tint color Gray and blend mode Normal
Variable - Set AchievementMenuSelectAchievement_Image[AchievementNumber] = (Last created dialog item)
Dialog - Create a button for dialog AchievementMenuSelectAchievement with the dimensions (75, 75) anchored to (Anchor of AchievementMenuSelectAchievement_Image[AchievementNumber] for 1) with an offset of (0, 0) setting the tooltip to "" with button text "" and the hover image set to ""
Variable - Set AchievementMenuSelectAchievement_Button[AchievementNumber] = (Last created dialog item)
Variable - Set AchievementNumber = (AchievementNumber + 1)
Dialog - Create an image for dialog AchievementMenuSelectAchievement with the dimensions (75, 75) anchored to (Anchor of AchievementMenuSelectAchievement_Button[(AchievementNumber - 1)] for 1) with an offset of (75, 0) setting the tooltip to "" using the image AchievementIcon[AchievementNumber] as a Normal type with tiled set to true tint color Gray and blend mode Normal
Variable - Set AchievementMenuSelectAchievement_Image[AchievementNumber] = (Last created dialog item)
Dialog - Create a button for dialog AchievementMenuSelectAchievement with the dimensions (75, 75) anchored to (Anchor of AchievementMenuSelectAchievement_Image[AchievementNumber] for 1) with an offset of (0, 0) setting the tooltip to "" with button text "" and the hover image set to ""
Variable - Set AchievementMenuSelectAchievement_Button[AchievementNumber] = (Last created dialog item)
-
But this is not working. In fact, all buttons are stacked within each others, and only 3 images appears in random emplacement next to the first. I don't understand, can someone help me throught this ?
Thanks. I made something similar waiting for an answer :
General - For each integer AchievementNumber from 1 to 6 with increment 1, do (Actions)
Actions
Dialog - Create a button for dialog AchievementMenuSelectAchievement with the dimensions (100, 100) anchored to Top Left with an offset of (((AchievementNumber * 125) - 75), 50) setting the tooltip to "" with button text "" and the hover image set to ""
Variable - Set AchievementMenuSelectAchievement_Button[AchievementNumber] = (Last created dialog item)
Dialog - Create an image for dialog AchievementMenuSelectAchievement with the dimensions (100, 100) anchored to Top Left with an offset of (((AchievementNumber * 125) - 75), 50) setting the tooltip to "" using the image AchievementIcon[AchievementNumber] as a Normal type with tiled set to false tint color Gray and blend mode Lighten
Variable - Set AchievementMenuSelectAchievement_Image[AchievementNumber] = (Last created dialog item)
---
So conclusion : don't use anchor to dialog item, you cant use it the way I did.
Well, I'm almost done and got what I wanted.
One problem persists though, and I'm posting it here so that I don't flood the forum (plus it still concerns dialog buttons).
I've changed some dialog images sizes so that it scales the button they are attached to.
Problem is, those (statics portraits) are 132x252. When I resize them to 100x100, only the upper right part of the image is shown : they are not stretched or deformed to fit their 100x100 size.
My question is : How to resize an image ?
Try making 'offset vars'. Basically, do this:
etc
@Yaos01: Go
you can resize easily on this website http://www.picnik.com/