-
Notifications
You must be signed in to change notification settings - Fork 2
PANELS specific functions
This section will show you how to interact with panels.
Parameters | TYPE | Optional | Description |
---|---|---|---|
item | Int |
☒ | The item's index |
panel | Int |
☒ | The panel's index |
Returns |
Int / Float / String
|
---|
If the panel is a ColorPanel the returned value will be always Int
, for PercentagePanel it will always be Float
and for the GridPanel a "," (comma) separated String
to return both x and y values.
- C#
BeginScaleformMovieMethod(NativeUIScaleform.Handle, "GET_VALUE_FROM_PANEL");
ScaleformMovieMethodAddParamInt(0);
ScaleformMovieMethodAddParamInt(0);
var ret = EndScaleformMovieMethodReturnValue();
while (!IsScaleformMovieMethodReturnValueReady(ret))
{
await BaseScript.Delay(0);
}
var res = GetScaleformMovieFunctionReturnInt(ret); // If panel is a ColorPanel
//////////////////////////////
var res = GetScaleformMovieFunctionReturnFloat(ret); // If panel is a PercentagePanel
//////////////////////////////
var res = GetScaleformMovieFunctionReturnString(ret); // If panel is a GridPanel
//////////////////////////////
Debug.WriteLine("Index = " + res);
- Lua
BeginScaleformMovieMethod(scaleformUI, "GET_VALUE_FROM_PANEL")
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamInt(0)
var ret = EndScaleformMovieMethodReturnValue()
while (not IsScaleformMovieMethodReturnValueReady(ret))
{
Wait(0)
}
local res = GetScaleformMovieFunctionReturnInt(ret) -- If panel is a ColorPanel (example returned value => 60)
------------------------------
local res = GetScaleformMovieFunctionReturnInt(ret) -- If panel is a PercentagePanel (example returned value => 57.1)
------------------------------
local res = GetScaleformMovieFunctionReturnString(ret) -- If panel is a GridPanel (example returned value => "0.5,0.7")
------------------------------
print("Index = " .. res);
This function sets the color panel index at a specific value
Parameters | TYPE | Optional | Description |
---|---|---|---|
item | Int |
☒ | The item's index |
panel | Int |
☒ | The panel's index in list |
value | Int |
☒ | The panel's index value |
Returns | VOID |
---|
- C#
NativeUIScaleform.CallFunction("SET_COLOR_PANEL_VALUE", 0, 0, 15);
- Lua
BeginScaleformMovieMethod(scaleformUI, "SET_COLOR_PANEL_VALUE")
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamInt(15)
EndScaleformMovieMethod()
This function sets the percentage panel value and can be awaited to return the same value we are setting.
Parameters | TYPE | Optional | Description |
---|---|---|---|
item | Int |
☒ | The item's index |
panel | Int |
☒ | The panel's index in list |
value | Float |
☒ | The panel's index value |
Returns | VOID |
---|
- C#
NativeUIScaleform.CallFunction("SET_PERCENT_PANEL_RETURN_VALUE", 0, 0, 35.5f);
- Lua
BeginScaleformMovieMethod(scaleformUI, "SET_PERCENT_PANEL_RETURN_VALUE")
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamFloat(35.5)
EndScaleformMovieMethod()
These two functions will do the same thing the only difference is the returned value.. the first will return the panel's value, the second one the panels coords at specific point.
Parameters | TYPE | Optional | Description |
---|---|---|---|
item | Int |
☒ | The item's index |
panel | Int |
☒ | The panel's index in list |
value_x | Float |
☒ | The mouse x coordinate |
value_y | Float |
☒ | The mouse y coordinate |
Returns | String |
---|
usually these function were used to debug the correct dot position when using mouse interaction.. not really useful to know the coordinates.
- C#
NativeUIScaleform.CallFunction("SET_GRID_PANEL_POSITION_RETURN_VALUE", 0, 0, 150f, 520f);
- Lua
BeginScaleformMovieMethod(scaleformUI, "SET_GRID_PANEL_POSITION_RETURN_VALUE")
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamFloat(150)
ScaleformMovieMethodAddParamFloat(520)
EndScaleformMovieMethod()
These two functions will do the same thing the only difference is the returned value.. the first will return the panel's value, the second one the panels coords at specific point.
Parameters | TYPE | Optional | Description |
---|---|---|---|
item | Int |
☒ | The item's index |
panel | Int |
☒ | The panel's index in list |
value_x | Float |
☒ | The panel's x value |
value_y | Float |
☒ | The panel's y value |
Returns | String |
---|
usually these function were used to debug the correct dot position when using mouse interaction.. not really useful to know the coordinates.
- C#
NativeUIScaleform.CallFunction("SET_GRID_PANEL_VALUE_RETURN_VALUE", 0, 0, 0.5f, 0.5f);
- Lua
BeginScaleformMovieMethod(scaleformUI, "SET_GRID_PANEL_VALUE_RETURN_VALUE")
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamInt(0)
ScaleformMovieMethodAddParamFloat(0.5)
ScaleformMovieMethodAddParamFloat(0.5)
EndScaleformMovieMethod()
by manups4e