Compare commits

..

No commits in common. "66df4c55dace3407e510cb7a1d2a0a3c7f82a7d8" and "1fd5c5c944af5209007e36912f9033ab020a9c6e" have entirely different histories.

5 changed files with 1 additions and 77 deletions

View File

@ -862,13 +862,6 @@ void CLayoutFrame::SetProtectFlag(uint32_t flag) {
this->m_flags &= ~0x800;
}
void CLayoutFrame::SetSize(float width, float height) {
this->m_flags &= ~0x8;
this->m_width = width;
this->m_height = height;
this->Resize(0);
}
void CLayoutFrame::SetWidth(float width) {
this->m_flags &= ~0x8;
this->m_width = width;

View File

@ -49,7 +49,6 @@ class CLayoutFrame {
virtual bool SetLayoutScale(float scale, bool force);
virtual void SetWidth(float width);
virtual void SetHeight(float height);
virtual void SetSize(float width, float height);
virtual float GetWidth();
virtual float GetHeight();
virtual void GetSize(float& width, float& height, int32_t a4);

View File

@ -219,28 +219,7 @@ int32_t CScriptRegion_SetHeight(lua_State* L) {
}
int32_t CScriptRegion_SetSize(lua_State* L) {
auto type = CScriptRegion::GetObjectType();
auto region = static_cast<CScriptRegion*>(FrameScript_GetObjectThis(L, type));
if (!region->ProtectedFunctionsAllowed()) {
// TODO disallowed logic
return 0;
}
if (!lua_isnumber(L, 2) || !lua_isnumber(L, 3)) {
luaL_error(L, "Usage: %s:SetSize(width, height)", region->GetDisplayName());
return 0;
}
auto ndcWidth = static_cast<float>(lua_tonumber(L, 2)) / (CoordinateGetAspectCompensation() * 1024.0f);
auto ddcWidth = NDCToDDCWidth(ndcWidth);
auto ndcHeight = static_cast<float>(lua_tonumber(L, 3)) / (CoordinateGetAspectCompensation() * 1024.0f);
auto ddcHeight = NDCToDDCWidth(ndcHeight);
region->SetSize(ddcWidth, ddcHeight);
return 0;
WHOA_UNIMPLEMENTED(0);
}
int32_t CScriptRegion_GetSize(lua_State* L) {

View File

@ -1,6 +1,5 @@
#include "ui/game/CGGameUI.hpp"
#include "client/Client.hpp"
#include "console/CVar.hpp"
#include "object/Client.hpp"
#include "ui/CScriptObject.hpp"
#include "ui/FrameXML.hpp"
@ -122,7 +121,6 @@ void CGGameUI::Initialize() {
LoadScriptFunctions();
ScriptEventsRegisterEvents();
CGGameUI::RegisterGameCVars();
// TODO
@ -234,47 +232,3 @@ void CGGameUI::RegisterFrameFactories() {
FrameXML_RegisterFactory("TabardModel", &CGTabardModelFrame::Create, false);
FrameXML_RegisterFactory("QuestPOIFrame", &CGQuestPOIFrame::Create, false);
}
void CGGameUI::RegisterGameCVars() {
// TODO
CVar::Register("enableCombatText", "Whether to show floating combat text", 0x10, "1", nullptr, GAME);
CVar::Register("combatTextFloatMode", "The combat text float mode", 0x10, "1", nullptr, GAME);
CVar::Register("fctCombatState", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctDodgeParryMiss", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctDamageReduction", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctRepChanges", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctReactives", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctFriendlyHealers", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctComboPoints", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctLowManaHealth", nullptr, 0x10, "1", nullptr, GAME);
CVar::Register("fctEnergyGains", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctPeriodicEnergyGains", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctHonorGains", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctAuras", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctAllSpellMechanics", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctSpellMechanics", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("fctSpellMechanicsOther", nullptr, 0x10, "0", nullptr, GAME);
CVar::Register("xpBarText", "Whether the XP bar shows the numeric experience value", 0x10, "0", nullptr, GAME);
CVar::Register("playerStatusText", "Whether the player portrait shows numeric health/mana values", 0x10, "0", nullptr, GAME);
CVar::Register("petStatusText", "Whether the pet portrait shows numeric health/mana values", 0x10, "0", nullptr, GAME);
CVar::Register("partyStatusText", "Whether the party portraits shows numeric health/mana values", 0x10, "0", nullptr, GAME);
CVar::Register("targetStatusText", "Whether the target portrait shows numeric health/mana values", 0x10, "0", nullptr, GAME);
CVar::Register("statusTextPercentage", "Whether numeric health/mana values are shown as raw values or percentages", 0x10, "0", nullptr, GAME);
CVar::Register("showPartyBackground", "Show a background behind party members", 0x10, "0", nullptr, GAME);
CVar::Register("partyBackgroundOpacity", "The opacity of the party background", 0x10, "0.5", nullptr, GAME);
CVar::Register("hidePartyInRaid", "Whether to hide the party UI while in a raid", 0x10, "0", nullptr, GAME);
CVar::Register("showPartyPets", "Whether to show pets in the party UI", 0x20, "1", nullptr, GAME);
CVar::Register("showRaidRange", "Show range indicator in raid UI", 0x20, "0", nullptr, GAME);
CVar::Register("showArenaEnemyFrames", "Show arena enemy frames while in an Arena", 0x20, "1", nullptr, GAME);
CVar::Register("showArenaEnemyCastbar", "Show the spell enemies are casting on the Arena Enemy frames", 0x20, "1", nullptr, GAME);
CVar::Register("showArenaEnemyPets", "Show the enemy team's pets on the ArenaEnemy frames", 0x20, "1", nullptr, GAME);
CVar::Register("fullSizeFocusFrame", "Increases the size of the focus frame to that of the target frame", 0x20, "0", nullptr, GAME);
// TODO
}

View File

@ -23,7 +23,6 @@ class CGGameUI {
static int32_t IsRaidMember(const WOWGUID& guid);
static int32_t IsRaidMemberOrPet(const WOWGUID& guid);
static void RegisterFrameFactories();
static void RegisterGameCVars();
private:
static WOWGUID s_currentObjectTrack;