Compare commits

..

1 Commits

Author SHA1 Message Date
Tristan 'Natrist' Cormier
61a8d73fb0
Merge 4a102c6ace into 91a4afd976 2026-01-30 09:45:05 -05:00
8 changed files with 3 additions and 93 deletions

View File

@ -98,21 +98,6 @@ enum TextureImageMode {
ImageMode_Desaturate = 1
};
enum TOOLTIP_ANCHORPOINT {
TOOLTIP_ANCHOR_LEFT = 0,
TOOLTIP_ANCHOR_RIGHT = 1,
TOOLTIP_ANCHOR_BOTTOMLEFT = 2,
TOOLTIP_ANCHOR_BOTTOM = 3,
TOOLTIP_ANCHOR_BOTTOMRIGHT = 4,
TOOLTIP_ANCHOR_TOPLEFT = 5,
TOOLTIP_ANCHOR_TOP = 6,
TOOLTIP_ANCHOR_TOPRIGHT = 7,
TOOLTIP_ANCHOR_CURSOR = 8,
TOOLTIP_ANCHOR_NONE = 9,
TOOLTIP_ANCHOR_PRESERVE = 10,
TOOLTIP_ANCHOR_CURSOR_RIGHT = 11,
};
struct FRAMEPRIORITY {
CSimpleFrame* frame;
uint32_t priority;

View File

@ -1,5 +1,4 @@
#include "ui/game/BattlefieldInfoScript.hpp"
#include "ui/game/CGBattlefieldInfo.hpp"
#include "ui/FrameScript.hpp"
#include "util/Unimplemented.hpp"
@ -106,9 +105,7 @@ int32_t Script_GetBattlefieldStatData(lua_State* L) {
}
int32_t Script_RequestBattlefieldPositions(lua_State* L) {
CGBattlefieldInfo::RequestPlayerPositions();
return 0;
WHOA_UNIMPLEMENTED(0);
}
int32_t Script_GetNumBattlefieldPositions(lua_State* L) {

View File

@ -1,5 +0,0 @@
#include "ui/game/CGBattlefieldInfo.hpp"
void CGBattlefieldInfo::RequestPlayerPositions() {
// TODO
}

View File

@ -1,10 +0,0 @@
#ifndef UI_GAME_C_G_BATTLEFIELD_INFO_HPP
#define UI_GAME_C_G_BATTLEFIELD_INFO_HPP
class CGBattlefieldInfo {
public:
// Static functions
static void RequestPlayerPositions();
};
#endif

View File

@ -35,10 +35,3 @@ CGTooltip::CGTooltip(CSimpleFrame* parent) : CSimpleFrame(parent) {
int32_t CGTooltip::GetScriptMetaTable() {
return CGTooltip::s_metatable;
}
bool CGTooltip::IsA(int32_t type) {
return type == CGTooltip::s_objectType
|| type == CSimpleFrame::s_objectType
|| type == CScriptRegion::s_objectType
|| type == CScriptObject::s_objectType;
}

View File

@ -16,14 +16,9 @@ class CGTooltip : public CSimpleFrame {
static void RegisterScriptMethods(lua_State* L);
// Member variables
CSimpleFrame* m_owner = nullptr;
TOOLTIP_ANCHORPOINT m_anchorPoint;
// TODO
C2Vector m_offset;
// TODO
// Virtual member functions
virtual bool IsA(int32_t type);
virtual int32_t GetScriptMetaTable();
// Member functions

View File

@ -1,7 +1,5 @@
#include "ui/game/CGTooltipScript.hpp"
#include "ui/game/CGTooltip.hpp"
#include "ui/FrameScript.hpp"
#include "util/Lua.hpp"
#include "util/Unimplemented.hpp"
namespace {
@ -27,35 +25,7 @@ int32_t CGTooltip_GetPadding(lua_State* L) {
}
int32_t CGTooltip_IsOwned(lua_State* L) {
auto type = CGTooltip::GetObjectType();
auto tooltip = static_cast<CGTooltip*>(FrameScript_GetObjectThis(L, type));
if (lua_type(L, 2) != LUA_TTABLE) {
luaL_error(L, "Usage: %s:IsOwned(frame)", tooltip->GetDisplayName());
return 0;
}
lua_rawgeti(L, 2, 0);
auto frame = static_cast<CSimpleFrame*>(lua_touserdata(L, -1));
lua_settop(L, -2);
if (!frame) {
luaL_error(L, "%s:IsOwned(): Couldn't find 'this' in frame object", tooltip->GetDisplayName());
return 0;
}
if (!frame->IsA(CSimpleFrame::GetObjectType())) {
luaL_error(L, "%s:IsOwned(): Wrong object type, expected frame", tooltip->GetDisplayName());
return 0;
}
if (tooltip->m_owner == frame) {
lua_pushnumber(L, 1.0);
} else {
lua_pushnil(L);
}
return 1;
WHOA_UNIMPLEMENTED(0);
}
int32_t CGTooltip_GetOwner(lua_State* L) {

View File

@ -218,22 +218,7 @@ int32_t CSimpleButton_SetFontString(lua_State* L) {
}
int32_t CSimpleButton_GetFontString(lua_State* L) {
auto type = CSimpleButton::GetObjectType();
auto button = static_cast<CSimpleButton*>(FrameScript_GetObjectThis(L, type));
auto text = button->m_text;
if (!text) {
lua_pushnil(L);
return 1;
}
if (!text->lua_registered) {
text->RegisterScriptObject(nullptr);
}
lua_rawgeti(L, LUA_REGISTRYINDEX, text->lua_objectRef);
return 1;
WHOA_UNIMPLEMENTED(0);
}
int32_t CSimpleButton_SetText(lua_State* L) {