Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Courtesy of bountygiver
- exec function RT_TestPanelLocation(int X, int Y, optional int Width = -1, optional int Height = -1, optional name PanelName = 'TestDebugPanel')
- {
- local UIScreen Screen;
- local UIBGBox BGPanel;
- local UIPanel Panel;
- Screen = `SCREENSTACK.GetCurrentScreen();
- `RTLOG("Using " $ Screen.MCName $ " as the base for the TestPanel!");
- Panel = Screen.GetChildByName(PanelName, false);
- if(Width == -1 || Height == -1) {
- Width = 32;
- Height = 32;
- }
- if (Panel != none)
- {
- Panel.SetPosition(X, Y);
- Panel.SetSize(Width, Height);
- }
- else
- {
- `RTLOG("Couldn't find a " $ PanelName $ ", creating one!");
- BGPanel = Screen.Spawn(class'UIBGBox', Screen);
- BGPanel.InitBG(PanelName, X, Y, Width, Height);
- BGPanel.SetBGColorState(eUIState_Cash);
- BGPanel.AnimateIn(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement