Hi,
Stuck on this:
local buttonPos = go.get_position("#ButtonSTART") – No ERROR, but x & y are always 0 ?
function on_input(self, action_id, action)
-- Add input-handling code here
-- Remove this function if not needed
local mX = action.screen_x
local mY = action.screen_y
mX = mX * ( (360/WindowWidthTrue) )
mY = mY * ( (640/WindowHeightTrue) )
-- label.set_text( "#MouseXY", "X:" .. tostring(mX) .. "/Y:" .. tostring(mY) )
if action_id == hash("ClickGUI") then
if CurrentScreen == 2 then
local buttonPos = go.get_position("#ButtonSTART") -- No ERROR, but x & y are always 0 ?
label.set_text( "#MouseXY", "BX:" .. tostring(buttonPos.x) .. "/BY:" .. tostring(buttonPos.y) )
--buttonPos.x = 180
--buttonPos.y = 430
local buttonWidth = (251/2)
local buttonHeight = (38/2)
if ( ( mX > (buttonPos.x - buttonWidth) and mX < (buttonPos.x + buttonWidth) ) and ( mY > (buttonPos.y - buttonHeight) and mY < (buttonPos.y + buttonHeight) ) ) then
go.set("#ButtonSTART", "scale.x", 0.85)
go.set("#ButtonSTART", "scale.y", 0.85)
go.set("#ButtonSTARTText", "scale.x", 0.85)
go.set("#ButtonSTARTText", "scale.y", 0.85)
end
end
end
end
I am a slow learner, but very persistent…
J.