change some variables type to remove warning logs
This commit is contained in:
parent
14378c4b86
commit
7555131ad0
@ -30,7 +30,7 @@ enum ESortColumn {
|
|||||||
|
|
||||||
|
|
||||||
bool menu_visibility = false;
|
bool menu_visibility = false;
|
||||||
int camerafocusindex = 0;
|
uint camerafocusindex = 0;
|
||||||
bool include_default_objects = false;
|
bool include_default_objects = false;
|
||||||
bool refreshobject;
|
bool refreshobject;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ void RefreshBlocks() {
|
|||||||
// Editor plugin API for GetVec3FromCoord function
|
// Editor plugin API for GetVec3FromCoord function
|
||||||
auto pluginmaptype = cast<CGameEditorPluginMapMapType>(cast<CGameCtnEditorFree>(GetApp().Editor).PluginMapType);
|
auto pluginmaptype = cast<CGameEditorPluginMapMapType>(cast<CGameCtnEditorFree>(GetApp().Editor).PluginMapType);
|
||||||
|
|
||||||
for(int i = 0; i < blocks.Length; i++) {
|
for(uint i = 0; i < blocks.Length; i++) {
|
||||||
int idifexist = -1;
|
int idifexist = -1;
|
||||||
string blockname;
|
string blockname;
|
||||||
blockname = blocks[i].BlockModel.IdName;
|
blockname = blocks[i].BlockModel.IdName;
|
||||||
@ -79,7 +79,7 @@ void RefreshBlocks() {
|
|||||||
if (include_default_objects || blockname.ToLower().SubStr(blockname.Length - 10, 10) == ".block.gbx") {
|
if (include_default_objects || blockname.ToLower().SubStr(blockname.Length - 10, 10) == ".block.gbx") {
|
||||||
vec3 pos;
|
vec3 pos;
|
||||||
if (blocks[i].CoordX != 4294967295 && blocks[i].CoordZ != 4294967295) { // Not placed in free mapping
|
if (blocks[i].CoordX != 4294967295 && blocks[i].CoordZ != 4294967295) { // Not placed in free mapping
|
||||||
if (pluginmaptype != null) { // Editor plugin is available
|
if (pluginmaptype !is null) { // Editor plugin is available
|
||||||
pos = pluginmaptype.GetVec3FromCoord(blocks[i].Coord);
|
pos = pluginmaptype.GetVec3FromCoord(blocks[i].Coord);
|
||||||
} else {
|
} else {
|
||||||
pos.x = blocks[i].CoordX * 32 + 16;
|
pos.x = blocks[i].CoordX * 32 + 16;
|
||||||
@ -118,7 +118,7 @@ void RefreshItems() {
|
|||||||
if (map !is null) {
|
if (map !is null) {
|
||||||
// Items
|
// Items
|
||||||
auto items = map.AnchoredObjects;
|
auto items = map.AnchoredObjects;
|
||||||
for(int i = 0; i < items.Length; i++) {
|
for(uint i = 0; i < items.Length; i++) {
|
||||||
int idifexist = -1;
|
int idifexist = -1;
|
||||||
string itemname = items[i].ItemModel.IdName;
|
string itemname = items[i].ItemModel.IdName;
|
||||||
if (include_default_objects || itemname.ToLower().SubStr(itemname.Length - 9, 9) == ".item.gbx") {
|
if (include_default_objects || itemname.ToLower().SubStr(itemname.Length - 9, 9) == ".item.gbx") {
|
||||||
@ -209,7 +209,7 @@ void GenerateRow(Objects@ object) {
|
|||||||
if (UI::Button(Icons::Search + "###" + object.name)) {
|
if (UI::Button(Icons::Search + "###" + object.name)) {
|
||||||
FocusCam(object.name);
|
FocusCam(object.name);
|
||||||
}
|
}
|
||||||
if (UI::IsItemHovered() && object.type == "Block" && cast<CGameEditorPluginMapMapType>(cast<CGameCtnEditorFree>(GetApp().Editor).PluginMapType) == null) infotext = "Editor plugins are disabled, the coordinates of the blocks are estimated and can be imprecise";
|
if (UI::IsItemHovered() && object.type == "Block" && cast<CGameEditorPluginMapMapType>(cast<CGameCtnEditorFree>(GetApp().Editor).PluginMapType) is null) infotext = "Editor plugins are disabled, the coordinates of the blocks are estimated and can be imprecise";
|
||||||
UI::SameLine();
|
UI::SameLine();
|
||||||
switch(object.trigger){
|
switch(object.trigger){
|
||||||
case CGameCtnBlockInfo::EWayPointType::Start:
|
case CGameCtnBlockInfo::EWayPointType::Start:
|
||||||
@ -326,11 +326,11 @@ void Render() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sortableobjects.Length > 0 ) {
|
if (sortableobjects.Length > 0 ) {
|
||||||
for(int i = 0; i < sortableobjects.Length; i++) {
|
for(uint i = 0; i < sortableobjects.Length; i++) {
|
||||||
GenerateRow(sortableobjects[i]);
|
GenerateRow(sortableobjects[i]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(int i = 0; i < objects.Length; i++) {
|
for(uint i = 0; i < objects.Length; i++) {
|
||||||
GenerateRow(objects[i]);
|
GenerateRow(objects[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ author = "Beu"
|
|||||||
category = "Map Editor"
|
category = "Map Editor"
|
||||||
|
|
||||||
siteid = 97
|
siteid = 97
|
||||||
version = "1.1"
|
version = "1.2"
|
||||||
|
|
||||||
blocks = [ "Plugin_Blocks&ItemsCounter" ]
|
blocks = [ "Plugin_Blocks&ItemsCounter" ]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user