ID:1076471
 
Code:
obj/HUD/ChoiceClicker
layer=25*10000
mouse_opacity=2
var/textWidth
var/hudSelection
var/pointerColumn
var/pointerRow
var/textWritten
icon='BlankIcon.dmi'
proc/IconSetup(var/icon/I)
if(textWritten)
I.Scale(src.textWidth,32)
else
I.Scale(src.textWidth,64)
MouseEntered()
if(usr.curColumn==src.pointerColumn && usr.curRow==src.pointerRow) return
usr.choiceClickerRef=src
usr.curColumn=src.pointerColumn
usr.curRow=src.pointerRow
usr.UpdatePointer()
var/icon/I=new('ChoiceClicker.dmi')
src.IconSetup(I)
src.icon=I
MouseExited()
if(usr)
usr.choiceClickerRef=null
var/icon/I=new('BlankIcon.dmi')
src.IconSetup(I)
src.icon=I


Problem description:This is the code from normal map format but i am now trying to implement in map_ format = TILED_ICON_MAP but then scale will no longer work, is there a way to use scale in tiled icon map format so i can resize icons?

My first question is, why in the world are you using this map format? It was only included for compatibility with older games. Now BYOND can display any icon size, even if it is bigger than world.icon_size. Back in the day, however, all icons were 32x32. Bigger icons had to be broken up into 32x32 pieces, and each of those pieces had to be displayed as its own object or overlay.

So what I think is happening, is that when you scale the icon to 64x64 it gets broken up into five pieces. The first piece is a thumbnail version, and it has the same icon_state as the original. The other pieces are different icon states "0,0", "0,1", "1,1", and "1,0".

So basically, your program doubles the icon, and then BYOND scales it back down to half size...resulting in the original icon. You would have to create four overlays with the coordinate icon_states in order to see the scaled version.

But, this should not be necessary. Using the tiled icon format is simply not as versatile, I don't see any advantage to it and it will mean a lot more work for you if you want icons bigger than 32x32
In response to Magicsofa
Magicsofa wrote:
My first question is, why in the world are you using this map format? It was only included for compatibility with older games. Now BYOND can display any icon size, even if it is bigger than world.icon_size. Back in the day, however, all icons were 32x32. Bigger icons had to be broken up into 32x32 pieces, and each of those pieces had to be displayed as its own object or overlay.

So what I think is happening, is that when you scale the icon to 64x64 it gets broken up into five pieces. The first piece is a thumbnail version, and it has the same icon_state as the original. The other pieces are different icon states "0,0", "0,1", "1,1", and "1,0".

So basically, your program doubles the icon, and then BYOND scales it back down to half size...resulting in the original icon. You would have to create four overlays with the coordinate icon_states in order to see the scaled version.

But, this should not be necessary. Using the tiled icon format is simply not as versatile, I don't see any advantage to it and it will mean a lot more work for you if you want icons bigger than 32x32

well because the project i am working on is older.
Okay...so do you have tiled icons elsewhere?